com php-src: better test cleanup: ext/standard/tests/streams/pr oc_open_bug51800.phpt ext/standard/tests/stre ams/proc_open_bug51800_right.phpt
| From: | Anatol Belski | Date: | Mon, 29 Sep 2014 16:11:06 +0000 |
| Subject: | com php-src: better test cleanup: ext/standard/tests/streams/pr oc_open_bug51800.phpt ext/standard/tests/stre ams/proc_open_bug51800_right.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-82012@lists.php.net to get a copy of this message | ||
Commit: 91d3cd85593a19ff6ab3c334f74198472788021d
Author: Anatol Belski <ab@php.net> Mon, 29 Sep 2014 18:11:06 +0200
Parents: 46aa2c396bf32b81c76ed2330e8e116eef8886a8
Branches: PHP-5.5 PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=91d3cd85593a19ff6ab3c334f74198472788021d
Log:
better test cleanup
and even force the XFAIL to fail as it would take too long anyway, even if it passes
Changed paths:
M ext/standard/tests/streams/proc_open_bug51800.phpt
M ext/standard/tests/streams/proc_open_bug51800_right.phpt
Diff:
diff --git a/ext/standard/tests/streams/proc_open_bug51800..phpt
b/ext/standard/tests/streams/proc_open_bug51800.phpt
index 024d9cd...53cafd8 100644
--- a/ext/standard/tests/streams/proc_open_bug51800.phpt
+++ b/ext/standard/tests/streams/proc_open_bug51800.phpt
@@ -2,6 +2,7 @@
Bug #51800 proc_open on Windows hangs forever
--SKIPIF--
<?php
+ echo 'skip expected to fail or take too long';
if (getenv("SKIP_SLOW_TESTS")) {
die("skip slow test");
}
@@ -17,7 +18,7 @@ so then the pipe buffer is emptied more often and the child has chance to contin
write. The behaviour might look some better if write/read in a separate thread, however
this is much more resource greedy and complexer to integrate into the user script. */
-$callee = dirname(__FILE__) . "/process" . md5(uniqid()) . ".php";
+$callee = dirname(__FILE__) . "/process_proc_open_bug51800.php";
$php = PHP_BINARY;
$cmd = "$php $callee";
@@ -72,10 +73,13 @@ var_dump(array(
"stderr" => $stderr,
), strlen($stdout), strlen($stderr));
-unlink($callee);
-
?>
===DONE===
+--CLEAN--
+<?php
+$callee = dirname(__FILE__) . "/process_proc_open_bug51800.php";
+unlink($callee);
+?>
--EXPECTF--
array(3) {
["status"]=>
diff --git a/ext/standard/tests/streams/proc_open_bug51800_right.phpt
b/ext/standard/tests/streams/proc_open_bug51800_right.phpt
index bab37a8..b14fed2 100644
--- a/ext/standard/tests/streams/proc_open_bug51800_right.phpt
+++ b/ext/standard/tests/streams/proc_open_bug51800_right.phpt
@@ -2,7 +2,7 @@
Bug #51800 proc_open on Windows hangs forever, the right way to do it
--FILE--
<?php
-$callee = dirname(__FILE__) . "/process" . md5(uniqid()) . ".php";
+$callee = dirname(__FILE__) . "/process_proc_open_bug51800_right.php";
$php = PHP_BINARY;
$cmd = "$php $callee";
@@ -56,10 +56,13 @@ var_dump(array(
"stderr" => $stderr,
), strlen($stdout), strlen($stderr));
-unlink($callee);
-
?>
===DONE===
+--CLEAN--
+<?php
+$callee = dirname(__FILE__) . "/process_proc_open_bug51800_right.php";
+unlink($callee);
+?>
--EXPECTF--
array(3) {
["status"]=>