summaryrefslogtreecommitdiff
path: root/lib/sbin/RunTestUtils.pl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sbin/RunTestUtils.pl')
-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";