com php-src: fix test for Windows and for parallel run: ext/opcache/tests/bug78185.phpt

From: Date: Thu, 20 Jun 2019 09:58:32 +0000
Subject: com php-src: fix test for Windows and for parallel run: ext/opcache/tests/bug78185.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-106941@lists.php.net to get a copy of this message
Commit: d8202bf9177cdbcb9b87586580dbcd6bb94f0de4 Author: Remi Collet <remi@php.net> Thu, 20 Jun 2019 11:58:32 +0200 Parents: b3cfeda3c783d681452bfa80543c469dee92a5f8 Branches: PHP-7.2 PHP-7.3 PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d8202bf9177cdbcb9b87586580dbcd6bb94f0de4 Log: fix test for Windows and for parallel run Changed paths: M ext/opcache/tests/bug78185.phpt Diff: diff --git a/ext/opcache/tests/bug78185.phpt b/ext/opcache/tests/bug78185.phpt index 4be8431..1723a16 100644 --- a/ext/opcache/tests/bug78185.phpt +++ b/ext/opcache/tests/bug78185.phpt @@ -7,13 +7,23 @@ opcache.file_cache={PWD} opcache.file_cache_only=1 --FILE-- <?php -foreach (glob(__DIR__ . '/*/' . __DIR__ . '/*.bin') as $p) { +if (substr(PHP_OS, 0, 3) !== 'WIN') { + $pattern = __DIR__ . '/*/' . __DIR__ . '/*78185.php.bin'; +} else { + $pattern = __DIR__ . '/*/*/' . str_replace(':', '', __DIR__) . '/*78185.php.bin'; +} +foreach (glob($pattern) as $p) { var_dump($p); } ?> --CLEAN-- <?php -foreach (glob(__DIR__ . '/*/' . __DIR__ . '/*.bin') as $p) { +if (substr(PHP_OS, 0, 3) !== 'WIN') { + $pattern = __DIR__ . '/*/' . __DIR__ . '/*78185.php.bin'; +} else { + $pattern = __DIR__ . '/*/*/' . str_replace(':', '', __DIR__) . '/*78185.php.bin'; +} +foreach (glob($pattern) as $p) { unlink($p); $p = dirname($p); while(strlen($p) > strlen(__DIR__)) {

« previous php.cvs (#106941) next »