diff --git a/tests/TestCase.php b/tests/TestCase.php index 748a608a..22252347 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -59,7 +59,7 @@ protected function mockAdapter(LoopInterface $loop = null) public function setUp() { - $this->tmpDir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . uniqid('react-filesystem-tests-') . DIRECTORY_SEPARATOR; + $this->tmpDir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'react-filesystem-tests' . DIRECTORY_SEPARATOR . uniqid('', true) . DIRECTORY_SEPARATOR; mkdir($this->tmpDir, 0777, true); $this->startTime = time(); } diff --git a/travis-init.sh b/travis-init.sh index 1d338e48..485ebd98 100755 --- a/travis-init.sh +++ b/travis-init.sh @@ -1,5 +1,8 @@ #!/bin/bash +mkdir `php -r "echo sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'react-filesystem-tests' . DIRECTORY_SEPARATOR;"` +chmod 0777 -Rfv `php -r "echo sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'react-filesystem-tests' . DIRECTORY_SEPARATOR;"` + if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then # install 'eio' PHP extension (does not support nightly) if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]]; then