From d0d04a61ec307bcb3444c782c7cc19ef1c6d2aaf Mon Sep 17 00:00:00 2001 From: William King Date: Mon, 11 Oct 1999 20:45:42 +0000 Subject: [PATCH] UNRESOLVED results now display in yellow fixed problem with test case output affecting html formatting host name now follows OS identifier in 'host' column of status display --- bin/tests/b9tsummary.pl | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/bin/tests/b9tsummary.pl b/bin/tests/b9tsummary.pl index 00e9073f30..a05c0fbcab 100755 --- a/bin/tests/b9tsummary.pl +++ b/bin/tests/b9tsummary.pl @@ -76,6 +76,12 @@ $WktpFile = ".wktp"; $RxFile = ".b9trx"; +# +# name of the host specific file containing +# output of `uname -a` +# + +$UnameFile = "uname"; # number of fatal build problems $Nfbp = 0; @@ -189,14 +195,28 @@ close(DEBUG) if ($Debug); sub doHost { local($hostpath) = @_; local($entry, $prob, $line, $bstatus, $tstatus); - local(@junk, $junk, $hostid, $bcolor, $tcolor); + local(@junk, $junk, $hostid, $hostname, $bcolor, $tcolor); local(%buildprobs, %testprobs); local($severity, $filename, $linenumber, $message, $lastfilename); @junk = split(/\//, $hostpath); $hostid = $junk[$#junk]; - print DEBUG "Host: $hostid\n" if ($Debug); + # + # get the host name + # + + $hostname = "n/a"; + if ((-r "$hostpath/$UnameFile") && (-s _)) { + open(XXX, "< $hostpath/$UnameFile"); + $junk = ; + close(XXX); + @junk = split(/\s/, $junk); + $hostname = $junk[1]; + $hostname =~ s/\..*//; + } + + print DEBUG "Host: $hostid, Hostname: $hostname\n" if ($Debug); # # scan the build and test results files for problems @@ -249,10 +269,10 @@ sub doHost { $tcolor = "black"; } - printf(DEBUG "Host %s STATUS: bstatus %s, tstatus %s, badtest %d, reason %s\n", $hostid, $bstatus, $tstatus, $BadTest, $BadTestReason) if ($Debug); + printf(DEBUG "Host %s(%s) STATUS: bstatus %s, tstatus %s, badtest %d, reason %s\n", $hostid, $hostname, $bstatus, $tstatus, $BadTest, $BadTestReason) if ($Debug); printf("\t\n"); - printf("\t\t%s\n", $hostid); + printf("\t\t%s %s\n", $hostid, $hostname); if ($bstatus =~ /none/) { printf("\t\t%s\n", $bstatus); printf("\t\t \n"); @@ -371,7 +391,8 @@ sub buildCheck { # ignore it if its in the well known build problems list if (defined($wkbp{"$filename:$linenumber"})) { print DEBUG "IGNORED\n" if ($Debug); - next; + # by convention, ignore all severity 0 problems + $severity = 0; } } else { @@ -491,6 +512,8 @@ sub testCheck { $BadTestReason = "I$."; } $ininfo = 1; + s//\>/g; printf(YYY "%s\n
\n", $_); next; } @@ -511,7 +534,9 @@ sub testCheck { else { $probs{"$funcname:$anum"} = $result; ++$Nftp; - s/(FAIL|UNRESOLVED|UNITIATED)/$1<\/FONT>/; + s/(FAIL|UNITIATED)/$1<\/FONT>/; + s/(UNRESOLVED)/$1<\/FONT>/; + } } elsif ($result =~ /PASS|UNTESTED/) { @@ -558,6 +583,9 @@ sub wbpf { if ($severity >= $HaltLevel) { printf(XXX "%s\n
\n", $message); } + elsif ($severity == 0) { + printf(XXX "%s\n
\n", $message); + } else { printf(XXX "%s\n
\n", $message); }