[llvm-commits] CVS: llvm/utils/NightlyTest.pl

Chris Lattner lattner at cs.uiuc.edu
Thu Mar 10 08:27:05 PST 2005



Changes in directory llvm/utils:

NightlyTest.pl updated: 1.90 -> 1.91
---
Log message:

Improve formatting of the sent mail for the dj test results.


---
Diffs of the changes:  (+15 -4)

 NightlyTest.pl |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)


Index: llvm/utils/NightlyTest.pl
diff -u llvm/utils/NightlyTest.pl:1.90 llvm/utils/NightlyTest.pl:1.91
--- llvm/utils/NightlyTest.pl:1.90	Sun Feb 13 10:08:30 2005
+++ llvm/utils/NightlyTest.pl	Thu Mar 10 10:26:50 2005
@@ -198,9 +198,11 @@
   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 @@
         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 @@
   CopyFile("test/testrun.sum", $DejagnuSum);
 
   $DejagnuTestResults = GetDejagnuTestResults($DejagnuSum, $DejagnuLog);
-  print $DejagnuTestResults;
 
 } else {
   $DejagnuTestResults = "Skipped by user choice.";






More information about the llvm-commits mailing list