summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhaas <rhaas@17b73243-c579-4c4c-a9d2-2d5706c11dac>2014-01-25 06:10:10 +0000
committerrhaas <rhaas@17b73243-c579-4c4c-a9d2-2d5706c11dac>2014-01-25 06:10:10 +0000
commit467d12807e87b2ace36966d805fe79c221b9529e (patch)
tree553b4aaa55cd65d3ec9d33c72cbdeccdda34a912
parent4010a3e819f7a5c06970bc0f566b76059eaab1cb (diff)
make room for file names when printing tolerances
git-svn-id: http://svn.cactuscode.org/flesh/trunk@5072 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r--lib/sbin/RunTestUtils.pl17
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/sbin/RunTestUtils.pl b/lib/sbin/RunTestUtils.pl
index d97dd8b9..26930ff3 100644
--- a/lib/sbin/RunTestUtils.pl
+++ b/lib/sbin/RunTestUtils.pl
@@ -854,7 +854,7 @@ sub PrintDataBase
sub PrintToleranceTable
{
my($test,$thorn,$testdata,$runconfig) = @_;
- my($fileabstol,$filereltol);
+ my($fileabstol,$filereltol,$maxfilenamelen);
# Get default tolerances for the test
if (defined($runconfig{"$thorn $test ABSTOL"}->{".*"}))
@@ -882,15 +882,22 @@ sub PrintToleranceTable
{
$testreltol=$runconfig{"RELTOL"};
}
-
+
+ # longest file name for table alignment
+ $maxfilenamelen = length("(.*)");
+ foreach $file (split(" ",$testdata->{"$thorn $test DATAFILES"}))
+ {
+ $maxfilenamelen = length($file) if ($maxfilenamelen < length($file));
+ }
+
# Print test's default tolerances and any deviations
print "------------------------------------------------------------------------\n\n";
print " Test $thorn: $test \n";
print " \"$testdata->{\"$thorn $test DESC\"}\"\n";
- print " File\t\tAbs Tol\t\tRel Tol\n";
+ print " File"," "x($maxfilenamelen-4),"\tAbs Tol\t\tRel Tol\n";
print " --------------------------------------------------------------------\n";
- print " (.*)\t\t$testabstol\t\t$testreltol\n";
+ print " (.*)"," "x($maxfilenamelen-4),"\t$testabstol\t\t$testreltol\n";
foreach $file (split(" ",$testdata->{"$thorn $test DATAFILES"}))
{
($fileabstol, $filereltol)=&GetFileTolerances($test,$thorn,\%runconfig,$file);
@@ -898,7 +905,7 @@ sub PrintToleranceTable
if ( $filereltol == $testreltol ) { $filereltol="--"; }
if ( $fileabstol ne "--" || $filereltol ne "--" )
{
- print " $file\t\t$fileabstol\t\t$filereltol\n";
+ print " $file"," "x($maxfilenamelen-length($file)),"\t$fileabstol\t\t$filereltol\n";
}
}
print "\n";