summaryrefslogtreecommitdiff
path: root/lib/sbin/RunTestUtils.pl
diff options
context:
space:
mode:
authorschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2007-01-30 19:54:28 +0000
committerschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2007-01-30 19:54:28 +0000
commitc4609dafe2fc93ae396cb9b3673cdc6dec4db988 (patch)
treea03b03f41995da5dda75c6ddc6dc2fc0e76cda09 /lib/sbin/RunTestUtils.pl
parent516417664b2d6511b08a1c57499d7a6a3fad52a5 (diff)
Change layout of test suite results:
- Print all file names beginning at the same column, followed by a colon - Be consistent about inserting empty lines - Ensure that a final newline character is added git-svn-id: http://svn.cactuscode.org/flesh/trunk@4405 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/RunTestUtils.pl')
-rw-r--r--lib/sbin/RunTestUtils.pl20
1 files changed, 13 insertions, 7 deletions
diff --git a/lib/sbin/RunTestUtils.pl b/lib/sbin/RunTestUtils.pl
index e54d5b14..6413ae3a 100644
--- a/lib/sbin/RunTestUtils.pl
+++ b/lib/sbin/RunTestUtils.pl
@@ -1240,21 +1240,22 @@ sub ReportOnTest
my @log = ();
# Different lines in files
+ push (@log, '');
foreach $file (split(' ',$testdata->{"$thorn $test DATAFILES"}))
{
my $key = "$thorn $test $file";
next unless ($rundata->{"$key NFAILWEAK"} > 0);
$rundata->{"$thorn $test NFAILWEAK"}++;
- push (@log, '');
+ # push (@log, '');
if ($rundata->{"$key NFAILSTRONG"} == 0)
{
- push (@log, " - $file: differences below tolerance on $rundata->{\"$key NFAILWEAK\"} lines");
+ push (@log, " $file: differences below tolerance on $rundata->{\"$key NFAILWEAK\"} lines");
}
else
{
$rundata->{"$thorn $test NFAILSTRONG"}++;
- push (@log, " - $file: substantial differences!");
+ push (@log, " $file: substantial differences");
my $tmp = $rundata->{"$key NNAN"};
push (@log, " caught $tmp NaNs in new $file") if $tmp;
$tmp = $rundata->{"$key NNANNOTFOUND"};
@@ -1264,7 +1265,7 @@ sub ReportOnTest
$tmp = $rundata->{"$key NINFNOTFOUND"};
push (@log, " did not reproduce $tmp Infs from old $file") if $tmp;
$tmp = $rundata->{"$key NFAILSTRONG"};
- push (@log, " significant differences on $tmp (out of $rundata->{\"$key NUMLINES\"}) lines!");
+ push (@log, " significant differences on $tmp (out of $rundata->{\"$key NUMLINES\"}) lines");
my $maxabsdiff = $rundata->{"$key MAXABSDIFF"};
my $maxreldiff = $rundata->{"$key MAXRELDIFF"};
@@ -1287,12 +1288,13 @@ sub ReportOnTest
# Look for files created by test not in archive
# (Note this is not so bad)
+ push (@log, '');
foreach $file (split (" ",$rundata->{"$thorn $test TESTFILES"}))
{
$myfile = quotemeta($file);
if ($testdata->{"$thorn $test DATAFILES"} !~ m:\b$myfile\b:)
{
- push (@log, " $file not in thorn archive");
+ push (@log, " $file: not in thorn archive");
$rundata->{"$thorn $test NFILEEXTRA"}++;
$rundata->{"$thorn $test FILEEXTRA"} .= " $file";
}
@@ -1300,6 +1302,7 @@ sub ReportOnTest
# Look for files in archive which are not created in test
# (Note this is bad)
+ push (@log, '');
my %filesmissing = ();
if ($rundata->{"$thorn $test NTESTFILES"})
{
@@ -1308,7 +1311,7 @@ sub ReportOnTest
$myfile = quotemeta($file);
if ($rundata->{"$thorn $test TESTFILES"} !~ m:\b$myfile\b:)
{
- push (@log, " $file not created in test");
+ push (@log, " $file: not created in test");
$filesmissing{$file} = 1;
}
}
@@ -1322,12 +1325,15 @@ sub ReportOnTest
}
$rundata->{"$thorn $test FILEMISSING"} = \%filesmissing;
+ # Ensure final newline character
+ push (@log, '');
+
# write diffs to STDOUT and logfile
if (@log)
{
print join ("\n", @log);
- print LOG join ("\n", @log);
+ # print LOG join ("\n", @log);
my $logfile = $testdata->{"$thorn $test TESTRUNDIR"} . "/$test.diffs";
open (LOG, "> $logfile") or die "Couldn't open logfile '$logfile'";
print LOG join ("\n", @log);