From 453d06218206fd95bd2c27afe29894ad6c7ac376 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 10 Mar 2005 16:26:50 +0000 Subject: [PATCH] Improve formatting of the sent mail for the dj test results. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20537 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/NightlyTest.pl | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/utils/NightlyTest.pl b/utils/NightlyTest.pl index 9bbbf49b141..fe036bc3423 100755 --- a/utils/NightlyTest.pl +++ b/utils/NightlyTest.pl @@ -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,"

UNEXPECTED TEST RESULTS

  1. \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,"

    UNEXPECTED TEST RESULTS

    1. \n"); $first_list = 0; $should_break = 1; push(@lines,"$_
      \n"); + print " $_\n"; } else { push(@lines,"
    2. $_
      \n"); + print " $_\n"; } } elsif ( m/Summary/ ) { - if ( $first_list ) { push(@lines,"PERFECT!"); } - push(@lines,"

    STATISTICS

    \n");
    +          if ( $first_list ) {
    +	    push(@lines,"PERFECT!"); 
    +	    print "  PERFECT!\n";
    +	  } else {
    +	    push(@lines, "
\n"); + } + push(@lines,"

STATISTICS

\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.";