Skip to content

Commit 55e7459

Browse files
committed
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: relax test on travis
2 parents b62fb3a + b013368 commit 55e7459

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

ext/standard/tests/streams/proc_open_bug69900.phpt

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Bug #69900 Commandline input/output weird behaviour with STDIO
66
error_reporting(E_ALL);
77

88
$fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test69900.php";
9+
$max_ms = ((bool)getenv('TRAVIS')) ? 3 : 1;
910

1011
$test_content = '<?php
1112
@@ -33,7 +34,7 @@ for($i = 0; $i < 10; $i++){
3334
$t1 = microtime(1);
3435

3536
echo $s;
36-
echo "fgets() took ", (($t1 - $t0)*1000 > 1 ? 'more' : 'less'), " than 1 ms\n";
37+
echo "fgets() took ", (($t1 - $t0)*1000 > $max_ms ? 'more' : 'less'), " than $max_ms ms\n";
3738
}
3839

3940
fclose($pipes[0]);
@@ -48,25 +49,25 @@ proc_close($process);
4849
$fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test69900.php";
4950
@unlink($fl);
5051
?>
51-
--EXPECT--
52+
--EXPECTF--
5253
hello0
53-
fgets() took more than 1 ms
54+
fgets() took more than %d ms
5455
hello1
55-
fgets() took less than 1 ms
56+
fgets() took less than %d ms
5657
hello2
57-
fgets() took less than 1 ms
58+
fgets() took less than %d ms
5859
hello3
59-
fgets() took less than 1 ms
60+
fgets() took less than %d ms
6061
hello4
61-
fgets() took less than 1 ms
62+
fgets() took less than %d ms
6263
hello5
63-
fgets() took less than 1 ms
64+
fgets() took less than %d ms
6465
hello6
65-
fgets() took less than 1 ms
66+
fgets() took less than %d ms
6667
hello7
67-
fgets() took less than 1 ms
68+
fgets() took less than %d ms
6869
hello8
69-
fgets() took less than 1 ms
70+
fgets() took less than %d ms
7071
hello9
71-
fgets() took less than 1 ms
72+
fgets() took less than %d ms
7273
===DONE===

0 commit comments

Comments
 (0)