summaryrefslogtreecommitdiff
path: root/tests/run_make_tests.pl
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>1999-09-15 22:23:35 +0000
committerPaul Smith <psmith@gnu.org>1999-09-15 22:23:35 +0000
commitc8003673857919d2283e16c829325c9f14e10dfe (patch)
treeea63faf55b4f28c561444bc732c246b5345b17dc /tests/run_make_tests.pl
parent0d366b668244112846554c42045ff1d9956276ed (diff)
downloadgunmake-c8003673857919d2283e16c829325c9f14e10dfe.tar.gz
* Cleanup the test suite.
Diffstat (limited to 'tests/run_make_tests.pl')
-rwxr-xr-xtests/run_make_tests.pl52
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;