summaryrefslogtreecommitdiff
path: root/run-tests.php
diff options
context:
space:
mode:
authorNuno Lopes <nlopess@php.net>2006-09-14 16:58:52 +0000
committerNuno Lopes <nlopess@php.net>2006-09-14 16:58:52 +0000
commit4a162b71a22107fea2e5894ef475e89d18d020ef (patch)
tree166228c4fbf768edc0b7ea51c35d501f1dcdfe97 /run-tests.php
parent7a5306598aa3f4ae4c5cc803a035702fb23f8e3f (diff)
downloadphp-git-4a162b71a22107fea2e5894ef475e89d18d020ef.tar.gz
add --STDIN-- support
Diffstat (limited to 'run-tests.php')
-rwxr-xr-xrun-tests.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/run-tests.php b/run-tests.php
index a48ee69f2e..cacf1760c8 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -837,7 +837,7 @@ function error_report($testname, $logname, $tested)
}
}
-function system_with_timeout($commandline, $env = null)
+function system_with_timeout($commandline, $env = null, $stdin = null)
{
global $leak_check;
@@ -852,6 +852,9 @@ function system_with_timeout($commandline, $env = null)
if (!$proc)
return false;
+ if (is_string($stdin)) {
+ fwrite($pipes[0], $stdin);
+ }
fclose($pipes[0]);
while (true) {
@@ -1347,7 +1350,7 @@ SCRIPT_FILENAME = " . $env['SCRIPT_FILENAME'] . "
COMMAND $cmd
";
- $out = system_with_timeout($cmd, $env);
+ $out = system_with_timeout($cmd, $env, isset($section_text['STDIN']) ? $section_text['STDIN'] : null);
if (array_key_exists('CLEAN', $section_text) && (!$no_clean || $cfg['keep']['clean'])) {
if (trim($section_text['CLEAN'])) {