Skip to content

Commit 76b2e5d

Browse files
committed
fix test for Windows and for parallel run
(cherry picked from commit d8202bf)
1 parent c12dc24 commit 76b2e5d

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

ext/opcache/tests/bug78185.phpt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,23 @@ opcache.file_cache={PWD}
77
opcache.file_cache_only=1
88
--FILE--
99
<?php
10-
foreach (glob(__DIR__ . '/*/' . __DIR__ . '/*.bin') as $p) {
10+
if (substr(PHP_OS, 0, 3) !== 'WIN') {
11+
$pattern = __DIR__ . '/*/' . __DIR__ . '/*78185.php.bin';
12+
} else {
13+
$pattern = __DIR__ . '/*/*/' . str_replace(':', '', __DIR__) . '/*78185.php.bin';
14+
}
15+
foreach (glob($pattern) as $p) {
1116
var_dump($p);
1217
}
1318
?>
1419
--CLEAN--
1520
<?php
16-
foreach (glob(__DIR__ . '/*/' . __DIR__ . '/*.bin') as $p) {
21+
if (substr(PHP_OS, 0, 3) !== 'WIN') {
22+
$pattern = __DIR__ . '/*/' . __DIR__ . '/*78185.php.bin';
23+
} else {
24+
$pattern = __DIR__ . '/*/*/' . str_replace(':', '', __DIR__) . '/*78185.php.bin';
25+
}
26+
foreach (glob($pattern) as $p) {
1727
unlink($p);
1828
$p = dirname($p);
1929
while(strlen($p) > strlen(__DIR__)) {

0 commit comments

Comments
 (0)