com php-src: fix test for Windows and for parallel run: ext/opcache/tests/bug78185.phpt
| From: | Remi Collet | Date: | Thu, 20 Jun 2019 12:20:46 +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-106947@lists.php.net to get a copy of this message | ||
Commit: 76b2e5d16dee4050206b1730a8d5f8dc21bc3785
Author: Remi Collet <remi@php.net> Thu, 20 Jun 2019 11:58:32 +0200
Parents: c12dc24699ebc94ce206b195959e9eb04efc0ebf
Branches: PHP-7.2.20
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=76b2e5d16dee4050206b1730a8d5f8dc21bc3785
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__)) {