]> granicus.if.org Git - php/commitdiff
better test cleanup
authorAnatol Belski <ab@php.net>
Mon, 29 Sep 2014 16:11:06 +0000 (18:11 +0200)
committerAnatol Belski <ab@php.net>
Mon, 29 Sep 2014 16:11:06 +0000 (18:11 +0200)
and even force the XFAIL to fail as it would take too long anyway, even if it passes

ext/standard/tests/streams/proc_open_bug51800.phpt
ext/standard/tests/streams/proc_open_bug51800_right.phpt

index 024d9cd6c69f7a20af900c13b34976de04e1dbca..53cafd85551833ebd2eaa21234e616c72d91ad00 100644 (file)
@@ -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"]=>
index bab37a8ba410260cc82cc9c2d39686b5b6ead1cf..b14fed2e5dfb026e93494e87816cef8df1906f70 100644 (file)
@@ -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"]=>