diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-11-03 19:41:21 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-11-03 19:41:21 +0000 |
commit | f0bb6dbac03b50177a433727e31a5b5b3ee80c17 (patch) | |
tree | c0537023f9d088d5bf74d01a09dfc83eb6156fd8 | |
parent | d6d261825b5d6f6376266e318d1039f10bc464c7 (diff) |
Keep each test's log in a separate file for later review.
-rwxr-xr-x | runtest.pl.in | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/runtest.pl.in b/runtest.pl.in index 01003c06..0d4381a6 100755 --- a/runtest.pl.in +++ b/runtest.pl.in @@ -86,13 +86,15 @@ sub runtest $exit_code = 2; return; } + + my $logfile = "test-$t.log"; # run it my $test_res = system("cd $test_mode/test/$t ; ./t 2>&1 " . - "| tee ../../../temp.runtest"); + "| tee ../../../$logfile"); # open test results - if(open RESULTS,'temp.runtest') + if(open RESULTS, $logfile) { my $last; while(<RESULTS>) @@ -102,7 +104,7 @@ sub runtest close RESULTS; chomp $last; - push @results,"$t: $last"; + push @results, "$t: $last"; if ($last ne "PASSED") { @@ -111,10 +113,11 @@ sub runtest } else { - push @results,"$t: output not found"; + push @results, + "$t: failed to open test log file: $logfile: $!"; } # delete test results - # unlink 'temp.runtest'; + # unlink $logfile; } |