From: Ilia Alshanetsky Date: Sun, 5 Feb 2006 17:33:11 +0000 (+0000) Subject: Simplify test code X-Git-Tag: php-5.1.3RC1~152 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=64972c02de4ab001655905b2c69e295f599356a1;p=php Simplify test code --- diff --git a/run-tests.php b/run-tests.php index 3b03a0eb09..3f711047cf 100755 --- a/run-tests.php +++ b/run-tests.php @@ -1028,17 +1028,19 @@ TEST $file $temp_dir = str_replace($temp_source, $temp_target, $temp_dir); } - $diff_filename = $temp_dir . DIRECTORY_SEPARATOR . basename($file,'phpt').'diff'; - $log_filename = $temp_dir . DIRECTORY_SEPARATOR . basename($file,'phpt').'log'; - $exp_filename = $temp_dir . DIRECTORY_SEPARATOR . basename($file,'phpt').'exp'; - $output_filename = $temp_dir . DIRECTORY_SEPARATOR . basename($file,'phpt').'out'; - $memcheck_filename = $temp_dir . DIRECTORY_SEPARATOR . basename($file,'phpt').'mem'; - $temp_file = $temp_dir . DIRECTORY_SEPARATOR . basename($file,'phpt').'php'; - $test_file = $test_dir . DIRECTORY_SEPARATOR . basename($file,'phpt').'php'; - $temp_skipif = $temp_dir . DIRECTORY_SEPARATOR . basename($file,'phpt').'skip.php'; - $test_skipif = $test_dir . DIRECTORY_SEPARATOR . basename($file,'phpt').'skip.php'; - $temp_clean = $temp_dir . DIRECTORY_SEPARATOR . basename($file,'phpt').'clean.php'; - $test_clean = $test_dir . DIRECTORY_SEPARATOR . basename($file,'phpt').'clean.php'; + $main_file_name = basename($file,'phpt'); + + $diff_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'diff'; + $log_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'log'; + $exp_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'exp'; + $output_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'out'; + $memcheck_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'mem'; + $temp_file = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'php'; + $test_file = $test_dir . DIRECTORY_SEPARATOR . $main_file_name.'php'; + $temp_skipif = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'skip.php'; + $test_skipif = $test_dir . DIRECTORY_SEPARATOR . $main_file_name.'skip.php'; + $temp_clean = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'clean.php'; + $test_clean = $test_dir . DIRECTORY_SEPARATOR . $main_file_name.'clean.php'; $tmp_post = $temp_dir . DIRECTORY_SEPARATOR . uniqid('/phpt.'); $tmp_relative_file = str_replace(dirname(__FILE__).DIRECTORY_SEPARATOR, '', $test_file) . 't';