minor #17189 [Process] Fix running tests on HHVM>=3.8 (nicolas-grekas)

This PR was merged into the 2.3 branch.

Discussion
----------

[Process] Fix running tests on HHVM>=3.8

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

open_basedir works correctly since hhvm 3.8

Commits
-------

a47208b [Process] Fix running tests on HHVM>=3.8
This commit is contained in:
Nicolas Grekas 2015-12-30 19:21:38 +01:00
commit 5ff87136d6
2 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@ services: mongodb
before_install:
- if [[ ! $deps && ! $TRAVIS_PHP_VERSION = ${MIN_PHP%.*} && $TRAVIS_PHP_VERSION != hhvm && $TRAVIS_PULL_REQUEST != false ]]; then deps=skip; fi;
- if [[ ! $deps && ! -d php-$MIN_PHP/sapi ]]; then wget http://museum.php.net/php5/php-$MIN_PHP.tar.bz2 -O - | tar -xj; (cd php-$MIN_PHP; ./configure --enable-sigchild --enable-pcntl; make -j2); fi;
- if [[ ! $deps && $TRAVIS_PHP_VERSION = ${MIN_PHP%.*} && ! -d php-$MIN_PHP/sapi ]]; then wget http://museum.php.net/php5/php-$MIN_PHP.tar.bz2 -O - | tar -xj; (cd php-$MIN_PHP; ./configure --enable-sigchild --enable-pcntl; make -j2); fi;
- if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; else INI_FILE=/etc/hhvm/php.ini; fi;
- echo memory_limit = -1 >> $INI_FILE
- echo session.gc_probability = 0 >> $INI_FILE

View File

@ -99,7 +99,7 @@ class ExecutableFinderTest extends \PHPUnit_Framework_TestCase
$this->markTestSkipped('Cannot test when open_basedir is set');
}
$this->iniSet('open_basedir', dirname(PHP_BINARY).(!defined('HHVM_VERSION') ? PATH_SEPARATOR.'/' : ''));
$this->iniSet('open_basedir', dirname(PHP_BINARY).(!defined('HHVM_VERSION') || HHVM_VERSION_ID >= 30800 ? PATH_SEPARATOR.'/' : ''));
$finder = new ExecutableFinder();
$result = $finder->find($this->getPhpBinaryName());
@ -120,7 +120,7 @@ class ExecutableFinderTest extends \PHPUnit_Framework_TestCase
}
$this->setPath('');
$this->iniSet('open_basedir', PHP_BINARY.(!defined('HHVM_VERSION') ? PATH_SEPARATOR.'/' : ''));
$this->iniSet('open_basedir', PHP_BINARY.(!defined('HHVM_VERSION') || HHVM_VERSION_ID >= 30800 ? PATH_SEPARATOR.'/' : ''));
$finder = new ExecutableFinder();
$result = $finder->find($this->getPhpBinaryName(), false);