helly Sun Mar 28 18:04:53 2004 EDT
Modified files:
/php-src run-tests.php
Log:
Add ability to pass -n to the executed php
http://cvs.php.net/diff.php/php-src/run-tests.php?r1=1.190&r2=1.191&ty=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.190 php-src/run-tests.php:1.191
--- php-src/run-tests.php:1.190 Sun Mar 28 09:12:14 2004
+++ php-src/run-tests.php Sun Mar 28 18:04:53 2004
@@ -213,6 +213,8 @@
// If parameters given assume they represent selected tests to run.
$failed_tests_file= false;
+$pass_option_n = false;
+$pass_options = '';
if (isset($argc) && $argc > 1) {
for ($i=1; $i<$argc; $i++) {
if (substr($argv[$i],0,1) == '-') {
@@ -234,6 +236,12 @@
case 'a':
$failed_tests_file = fopen($argv[++$i], 'a+t');
break;
+ case 'n':
+ if (!$pass_option_n) {
+ $pass_options .= ' -n';
+ }
+ $pass_option_n = true;
+ break;
default:
echo "Illegal switch specified!\n";
case "h":
@@ -255,6 +263,8 @@
-a <file> Same as -w but append rather then truncating <file>.
+ -n Pass -n option to the php binary.
+
-h <file> This Help.
HELP;
@@ -638,7 +648,7 @@
function run_test($php, $file, $test_cnt, $test_idx)
{
- global $log_format, $info_params, $ini_overwrites, $cwd, $PHP_FAILED_TESTS;
+ global $log_format, $info_params, $ini_overwrites, $cwd, $PHP_FAILED_TESTS,
$pass_options;
if (DETAILED) echo "
=================
@@ -804,7 +814,7 @@
putenv("CONTENT_TYPE=application/x-www-form-urlencoded");
putenv("CONTENT_LENGTH=$content_length");
- $cmd = "$php$ini_settings -f $tmp_file 2>&1 < $tmp_post";
+ $cmd = "$php$pass_options$ini_settings -f $tmp_file 2>&1 < $tmp_post";
} else {
@@ -812,7 +822,7 @@
putenv("CONTENT_TYPE=");
putenv("CONTENT_LENGTH=");
- $cmd = "$php$ini_settings -f $tmp_file$args 2>&1";
+ $cmd = "$php$pass_options$ini_settings -f $tmp_file$args 2>&1";
}
if (DETAILED) echo "
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php