com php-src: fix test for Windows and for parallel run: ext/opcache/tests/bug78185.phpt
| From: | Christoph Michael Becker | Date: | Thu, 20 Jun 2019 10:24:16 +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-106942@lists.php.net to get a copy of this message | ||
Commit: 0e7490f49e2d1a55f86927cdf5818cacea4e220b
Author: Remi Collet <remi@php.net> Thu, 20 Jun 2019 11:58:32 +0200
Committer: Christoph M. Becker <cmbecker69@gmx.de> Thu, 20 Jun 2019 12:24:16 +0200
Parents: 4f40d81b8d32575d4ddf30109eb05d2b093b6301
Branches: PHP-7.3.7
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0e7490f49e2d1a55f86927cdf5818cacea4e220b
Log:
fix test for Windows and for parallel run
(cherry picked from commit d8202bf9177cdbcb9b87586580dbcd6bb94f0de4)
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__)) {