summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2017-07-28 00:27:11 +0200
committerAnatol Belski <ab@php.net>2017-07-28 00:27:11 +0200
commitb01336814d17544a4f16784d5bb041ae068486d6 (patch)
treef5faa4c53c951cb3d614d0944e68256530dfada2
parent34e5d3a87d0b0a01578754b646f50d01a087ba7c (diff)
downloadphp-git-b01336814d17544a4f16784d5bb041ae068486d6.tar.gz
relax test on travis
-rw-r--r--ext/standard/tests/streams/proc_open_bug69900.phpt25
1 files changed, 13 insertions, 12 deletions
diff --git a/ext/standard/tests/streams/proc_open_bug69900.phpt b/ext/standard/tests/streams/proc_open_bug69900.phpt
index 86e323eb05..76c8ff4a17 100644
--- a/ext/standard/tests/streams/proc_open_bug69900.phpt
+++ b/ext/standard/tests/streams/proc_open_bug69900.phpt
@@ -6,6 +6,7 @@ Bug #69900 Commandline input/output weird behaviour with STDIO
error_reporting(E_ALL);
$fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test69900.php";
+$max_ms = ((bool)getenv('TRAVIS')) ? 3 : 1;
$test_content = '<?php
@@ -33,7 +34,7 @@ for($i = 0; $i < 10; $i++){
$t1 = microtime(1);
echo $s;
- echo "fgets() took ", (($t1 - $t0)*1000 > 1 ? 'more' : 'less'), " than 1 ms\n";
+ echo "fgets() took ", (($t1 - $t0)*1000 > $max_ms ? 'more' : 'less'), " than $max_ms ms\n";
}
fclose($pipes[0]);
@@ -48,25 +49,25 @@ proc_close($process);
$fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test69900.php";
@unlink($fl);
?>
---EXPECT--
+--EXPECTF--
hello0
-fgets() took more than 1 ms
+fgets() took more than %d ms
hello1
-fgets() took less than 1 ms
+fgets() took less than %d ms
hello2
-fgets() took less than 1 ms
+fgets() took less than %d ms
hello3
-fgets() took less than 1 ms
+fgets() took less than %d ms
hello4
-fgets() took less than 1 ms
+fgets() took less than %d ms
hello5
-fgets() took less than 1 ms
+fgets() took less than %d ms
hello6
-fgets() took less than 1 ms
+fgets() took less than %d ms
hello7
-fgets() took less than 1 ms
+fgets() took less than %d ms
hello8
-fgets() took less than 1 ms
+fgets() took less than %d ms
hello9
-fgets() took less than 1 ms
+fgets() took less than %d ms
===DONE===