Improve formatting of the sent mail for the dj test results.
authorChris Lattner <sabre@nondot.org>
Thu, 10 Mar 2005 16:26:50 +0000 (16:26 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 10 Mar 2005 16:26:50 +0000 (16:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20537 91177308-0d34-0410-b5e6-96231b3b80d8

utils/NightlyTest.pl

index 9bbbf49b14176b2176c1be1313b8456700dfee8b..fe036bc3423485326eaea67b92ed50e6665a47ca 100755 (executable)
@@ -198,9 +198,11 @@ sub GetDejagnuTestResults { # (filename, log)
   my @lines;
   my $firstline;
   $/ = "\n"; #Make sure we're going line at a time.
+
+  print "Dejagnu test results:\n";
+
   if (open SRCHFILE, $filename) {
     # Process test results
-    push(@lines,"<h3>UNEXPECTED TEST RESULTS</h3><ol><li>\n");
     my $first_list = 1;
     my $should_break = 1;
     my $nocopy = 0;
@@ -211,20 +213,30 @@ sub GetDejagnuTestResults { # (filename, log)
         if ( m/^XPASS:/ || m/^FAIL:/ ) {
           $nocopy = 0;
           if ( $first_list ) {
+            push(@lines,"<h3>UNEXPECTED TEST RESULTS</h3><ol><li>\n");
             $first_list = 0;
             $should_break = 1;
             push(@lines,"<b>$_</b><br/>\n");
+            print "  $_\n";
           } else {
             push(@lines,"</li><li><b>$_</b><br/>\n");
+            print "  $_\n";
           }
         } elsif ( m/Summary/ ) {
-          if ( $first_list ) { push(@lines,"<b>PERFECT!</b>"); }
-          push(@lines,"</li></ol><h3>STATISTICS</h3><pre>\n");
+          if ( $first_list ) {
+           push(@lines,"<b>PERFECT!</b>"); 
+           print "  PERFECT!\n";
+         } else {
+           push(@lines, "</li></ol>\n");
+         }
+          push(@lines,"<h3>STATISTICS</h3><pre>\n");
+         print "\nSTATISTICS:\n";
           $should_break = 0;
           $nocopy = 0;
           $readingsum = 1;
         } elsif ( $readingsum ) {
           push(@lines,"$_\n");
+         print "$_\n";
         }
       }
     }
@@ -446,7 +458,6 @@ if(!$NODEJAGNU) {
   CopyFile("test/testrun.sum", $DejagnuSum);
 
   $DejagnuTestResults = GetDejagnuTestResults($DejagnuSum, $DejagnuLog);
-  print $DejagnuTestResults;
 
 } else {
   $DejagnuTestResults = "Skipped by user choice.";