summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemi Collet <remi@php.net>2019-06-20 11:58:32 +0200
committerRemi Collet <remi@php.net>2019-06-20 14:20:46 +0200
commit76b2e5d16dee4050206b1730a8d5f8dc21bc3785 (patch)
treebb1376caaf791f65e56f295b29aceeef4afb437e
parentc12dc24699ebc94ce206b195959e9eb04efc0ebf (diff)
downloadphp-git-76b2e5d16dee4050206b1730a8d5f8dc21bc3785.tar.gz
fix test for Windows and for parallel run
(cherry picked from commit d8202bf9177cdbcb9b87586580dbcd6bb94f0de4)
-rw-r--r--ext/opcache/tests/bug78185.phpt14
1 files changed, 12 insertions, 2 deletions
diff --git a/ext/opcache/tests/bug78185.phpt b/ext/opcache/tests/bug78185.phpt
index 4be8431641..1723a16474 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__)) {