From 3fdab070a9418425d9db8c9e738920097dda30d9 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Wed, 7 Feb 2007 11:31:22 +0000 Subject: [PATCH] MFH: use getenv() instead of _ENV enable multiple error reporting on the same test --- run-tests.php | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/run-tests.php b/run-tests.php index b7c164aa0f..7cd7f52a7c 100755 --- a/run-tests.php +++ b/run-tests.php @@ -700,8 +700,8 @@ if ($just_save_results || !getenv('NO_INTERACTION')) { if (substr(PHP_OS, 0, 3) != "WIN") { /* If PHP_AUTOCONF is set, use it; otherwise, use 'autoconf'. */ - if (!empty($_ENV['PHP_AUTOCONF'])) { - $autoconf = shell_exec($_ENV['PHP_AUTOCONF'] . ' --version'); + if (getenv('PHP_AUTOCONF')) { + $autoconf = shell_exec(getenv('PHP_AUTOCONF') . ' --version'); } else { $autoconf = shell_exec('autoconf --version'); } @@ -1511,11 +1511,13 @@ COMMAND $cmd } if ($leaked) { - $restype = 'LEAK'; - } else if ($warn) { - $restype = 'WARN'; - } else { - $restype = 'FAIL'; + $restype[] = 'LEAK'; + } + if ($warn) { + $restype[] = 'WARN'; + } + if (!$passed) { + $restype[] = 'FAIL'; } if (!$passed) { @@ -1547,21 +1549,23 @@ $output } } - show_result($restype, $tested, $tested_file, $info, $temp_filenames); + show_result(implode('&', $restype), $tested, $tested_file, $info, $temp_filenames); - $PHP_FAILED_TESTS[$restype.'ED'][] = array ( + foreach ($restype as $type) { + $PHP_FAILED_TESTS[$type.'ED'][] = array ( 'name' => $file, 'test_name' => (is_array($IN_REDIRECT) ? $IN_REDIRECT['via'] : '') . $tested . " [$tested_file]", 'output' => $output_filename, 'diff' => $diff_filename, 'info' => $info, ); + } if (isset($old_php)) { $php = $old_php; } - return $restype.'ED'; + return $restype[0].'ED'; } function comp_line($l1,$l2,$is_reg) -- 2.50.1