Merge branch '2.3' into 2.7
* 2.3: [ci] Force update of ./phpunit deps [Process] Don't catch RuntimeException when it complicates tests debugging [appveyor] Workaround transient segfault when APCu is enabled
This commit is contained in:
commit
60b02fcc97
|
@ -39,7 +39,7 @@ before_install:
|
||||||
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then phpenv config-rm xdebug.ini; fi;
|
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then phpenv config-rm xdebug.ini; fi;
|
||||||
- if [[ "$TRAVIS_PHP_VERSION" = 5.* ]]; then echo "extension = mongo.so" >> $INI_FILE; fi;
|
- if [[ "$TRAVIS_PHP_VERSION" = 5.* ]]; then echo "extension = mongo.so" >> $INI_FILE; fi;
|
||||||
- if [[ "$TRAVIS_PHP_VERSION" = 5.* ]]; then echo "extension = memcache.so" >> $INI_FILE; fi;
|
- if [[ "$TRAVIS_PHP_VERSION" = 5.* ]]; then echo "extension = memcache.so" >> $INI_FILE; fi;
|
||||||
- if [[ "$TRAVIS_PHP_VERSION" = 5.* ]]; then (echo yes | pecl install -f apcu-4.0.7 && echo "apc.enable_cli = 1" >> $INI_FILE) || echo "Let's continue without apcu extension"; fi;
|
- if [[ "$TRAVIS_PHP_VERSION" = 5.* ]]; then (echo yes | pecl install -f apcu-4.0.8 && echo "apc.enable_cli = 1" >> $INI_FILE) || echo "Let's continue without apcu extension"; fi;
|
||||||
- if [[ "$TRAVIS_PHP_VERSION" = 5.* ]]; then pecl install -f memcached-2.1.0 || echo "Let's continue without memcached extension"; fi;
|
- if [[ "$TRAVIS_PHP_VERSION" = 5.* ]]; then pecl install -f memcached-2.1.0 || echo "Let's continue without memcached extension"; fi;
|
||||||
- if [[ "$TRAVIS_PHP_VERSION" = 5.* ]] && [ "$deps" = "no" ]; then (cd src/Symfony/Component/Debug/Resources/ext && phpize && ./configure && make && echo "extension = $(pwd)/modules/symfony_debug.so" >> $INI_FILE); fi;
|
- if [[ "$TRAVIS_PHP_VERSION" = 5.* ]] && [ "$deps" = "no" ]; then (cd src/Symfony/Component/Debug/Resources/ext && phpize && ./configure && make && echo "extension = $(pwd)/modules/symfony_debug.so" >> $INI_FILE); fi;
|
||||||
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then php -i; else hhvm --php -r 'print_r($_SERVER);print_r(ini_get_all());'; fi;
|
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then php -i; else hhvm --php -r 'print_r($_SERVER);print_r(ini_get_all());'; fi;
|
||||||
|
|
|
@ -26,8 +26,8 @@ install:
|
||||||
- IF %PHP%==1 cd ext
|
- IF %PHP%==1 cd ext
|
||||||
- IF %PHP%==1 appveyor DownloadFile http://nebm.ist.utl.pt/~glopes/misc/intl_win/php_intl-3.0.0-5.3-nts-vc9-x86.zip
|
- IF %PHP%==1 appveyor DownloadFile http://nebm.ist.utl.pt/~glopes/misc/intl_win/php_intl-3.0.0-5.3-nts-vc9-x86.zip
|
||||||
- IF %PHP%==1 7z x php_intl-3.0.0-5.3-nts-vc9-x86.zip -y >nul
|
- IF %PHP%==1 7z x php_intl-3.0.0-5.3-nts-vc9-x86.zip -y >nul
|
||||||
- IF %PHP%==1 appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/apcu/4.0.7/php_apcu-4.0.7-5.3-nts-vc9-x86.zip
|
- IF %PHP%==1 appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/apcu/4.0.8/php_apcu-4.0.8-5.3-nts-vc9-x86.zip
|
||||||
- IF %PHP%==1 7z x php_apcu-4.0.7-5.3-nts-vc9-x86.zip -y >nul
|
- IF %PHP%==1 7z x php_apcu-4.0.8-5.3-nts-vc9-x86.zip -y >nul
|
||||||
- IF %PHP%==1 appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/memcache/3.0.8/php_memcache-3.0.8-5.3-nts-vc9-x86.zip
|
- IF %PHP%==1 appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/memcache/3.0.8/php_memcache-3.0.8-5.3-nts-vc9-x86.zip
|
||||||
- IF %PHP%==1 7z x php_memcache-3.0.8-5.3-nts-vc9-x86.zip -y >nul
|
- IF %PHP%==1 7z x php_memcache-3.0.8-5.3-nts-vc9-x86.zip -y >nul
|
||||||
- IF %PHP%==1 del /Q *.zip
|
- IF %PHP%==1 del /Q *.zip
|
||||||
|
|
5
phpunit
5
phpunit
|
@ -11,7 +11,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Please update when phpunit needs to be reinstalled with fresh deps:
|
// Please update when phpunit needs to be reinstalled with fresh deps:
|
||||||
// Cache-Id-Version: 2015-11-18 14:14 UTC
|
// Cache-Id-Version: 2015-11-28 09:05 UTC
|
||||||
|
|
||||||
use Symfony\Component\Process\ProcessUtils;
|
use Symfony\Component\Process\ProcessUtils;
|
||||||
|
|
||||||
|
@ -164,7 +164,8 @@ if (isset($argv[1]) && 'symfony' === $argv[1]) {
|
||||||
unlink($file);
|
unlink($file);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($procStatus) {
|
// Fail on any individual component failures but ignore STATUS_STACK_BUFFER_OVERRUN (-1073740791) on Windows when APCu is enabled
|
||||||
|
if ($procStatus && ('\\' !== DIRECTORY_SEPARATOR || !extension_loaded('apcu') || !ini_get('apc.enable_cli') || -1073740791 !== $procStatus)) {
|
||||||
$exit = 1;
|
$exit = 1;
|
||||||
echo "\033[41mKO\033[0m $component\n\n";
|
echo "\033[41mKO\033[0m $component\n\n";
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -152,46 +152,37 @@ class SimpleProcessTest extends AbstractProcessTest
|
||||||
|
|
||||||
public function testStopTerminatesProcessCleanly()
|
public function testStopTerminatesProcessCleanly()
|
||||||
{
|
{
|
||||||
try {
|
$process = $this->getProcess(self::$phpBin.' -r "echo \'foo\'; sleep(1); echo \'bar\';"');
|
||||||
$process = $this->getProcess(self::$phpBin.' -r "echo \'foo\'; sleep(1); echo \'bar\';"');
|
$process->run(function () use ($process) {
|
||||||
$process->run(function () use ($process) {
|
$process->stop();
|
||||||
$process->stop();
|
});
|
||||||
});
|
$this->assertTrue(true, 'A call to stop() is not expected to cause wait() to throw a RuntimeException');
|
||||||
} catch (\RuntimeException $e) {
|
|
||||||
$this->fail('A call to stop() is not expected to cause wait() to throw a RuntimeException');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testKillSignalTerminatesProcessCleanly()
|
public function testKillSignalTerminatesProcessCleanly()
|
||||||
{
|
{
|
||||||
$this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. The process can not be signaled.');
|
$this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. The process can not be signaled.');
|
||||||
|
|
||||||
try {
|
$process = $this->getProcess(self::$phpBin.' -r "echo \'foo\'; sleep(1); echo \'bar\';"');
|
||||||
$process = $this->getProcess(self::$phpBin.' -r "echo \'foo\'; sleep(1); echo \'bar\';"');
|
$process->run(function () use ($process) {
|
||||||
$process->run(function () use ($process) {
|
if ($process->isRunning()) {
|
||||||
if ($process->isRunning()) {
|
$process->signal(defined('SIGKILL') ? SIGKILL : 9);
|
||||||
$process->signal(defined('SIGKILL') ? SIGKILL : 9);
|
}
|
||||||
}
|
});
|
||||||
});
|
$this->assertTrue(true, 'A call to signal() is not expected to cause wait() to throw a RuntimeException');
|
||||||
} catch (\RuntimeException $e) {
|
|
||||||
$this->fail('A call to signal() is not expected to cause wait() to throw a RuntimeException');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testTermSignalTerminatesProcessCleanly()
|
public function testTermSignalTerminatesProcessCleanly()
|
||||||
{
|
{
|
||||||
$this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. The process can not be signaled.');
|
$this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. The process can not be signaled.');
|
||||||
|
|
||||||
try {
|
$process = $this->getProcess(self::$phpBin.' -r "echo \'foo\'; sleep(1); echo \'bar\';"');
|
||||||
$process = $this->getProcess(self::$phpBin.' -r "echo \'foo\'; sleep(1); echo \'bar\';"');
|
$process->run(function () use ($process) {
|
||||||
$process->run(function () use ($process) {
|
if ($process->isRunning()) {
|
||||||
if ($process->isRunning()) {
|
$process->signal(defined('SIGTERM') ? SIGTERM : 15);
|
||||||
$process->signal(defined('SIGTERM') ? SIGTERM : 15);
|
}
|
||||||
}
|
});
|
||||||
});
|
$this->assertTrue(true, 'A call to signal() is not expected to cause wait() to throw a RuntimeException');
|
||||||
} catch (\RuntimeException $e) {
|
|
||||||
$this->fail('A call to signal() is not expected to cause wait() to throw a RuntimeException');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testStopWithTimeoutIsActuallyWorking()
|
public function testStopWithTimeoutIsActuallyWorking()
|
||||||
|
|
Reference in New Issue