diff options
author | Paul Smith <psmith@gnu.org> | 1999-09-15 22:23:35 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 1999-09-15 22:23:35 +0000 |
commit | c8003673857919d2283e16c829325c9f14e10dfe (patch) | |
tree | ea63faf55b4f28c561444bc732c246b5345b17dc /tests/run_make_tests.pl | |
parent | 0d366b668244112846554c42045ff1d9956276ed (diff) | |
download | gunmake-c8003673857919d2283e16c829325c9f14e10dfe.tar.gz |
* Cleanup the test suite.
Diffstat (limited to 'tests/run_make_tests.pl')
-rwxr-xr-x | tests/run_make_tests.pl | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/tests/run_make_tests.pl b/tests/run_make_tests.pl index 56902ca..484dbe1 100755 --- a/tests/run_make_tests.pl +++ b/tests/run_make_tests.pl @@ -101,18 +101,16 @@ sub print_help } sub get_this_pwd { - if ($vos) - { - $delete_command = "delete_file"; - $__pwd = `++(current_dir)`; - } - else - { - $delete_command = "rm"; - chop ($__pwd = `pwd`); - } - - return $__pwd; + if ($vos) { + $delete_command = "delete_file"; + $__pwd = `++(current_dir)`; + } + else { + $delete_command = "rm"; + chop ($__pwd = `pwd`); + } + + return $__pwd; } sub set_defaults @@ -141,8 +139,8 @@ sub set_more_defaults $string = `$make_path -v -f /dev/null 2> /dev/null`; - $string =~ s/[,\n].*/\n/s; - $testee_version = $string; + $string =~ /^(GNU Make [^,\n]*)/; + $testee_version = "$1\n"; $string = `sh -c "$make_path -f /dev/null 2>&1"`; if ($string =~ /(.*): \*\*\* No targets\. Stop\./) { @@ -172,7 +170,8 @@ sub set_more_defaults # Get Purify log info--if any. - ($pure_log = $ENV{PURIFYOPTIONS}) =~ s,.*-logfile=([^ ]+) .*,\1,; + $ENV{PURIFYOPTIONS} =~ /.*-logfile=([^ ]+)/; + $pure_log = $1 || ''; $pure_log =~ s/%v/$make_name/; $purify_errors = 0; @@ -187,17 +186,18 @@ sub set_more_defaults sub setup_for_test { - $makefile = &get_tmpfile; - if (-f $makefile) - { - unlink $makefile; - } - - # Get rid of any Purify logs. - ($pure_testname = $testname) =~ tr,/,_,; - $pure_testname = "$pure_log.$pure_testname"; - system("rm -f $pure_testname*"); - print("Purify testfiles are: $pure_testname*\n") if $debug; + $makefile = &get_tmpfile; + if (-f $makefile) { + unlink $makefile; + } + + # Get rid of any Purify logs. + if ($pure_log) { + ($pure_testname = $testname) =~ tr,/,_,; + $pure_testname = "$pure_log.$pure_testname"; + system("rm -f $pure_testname*"); + print("Purify testfiles are: $pure_testname*\n") if $debug; + } } exit !&toplevel; |