aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-02-28 20:30:20 +0000
committerChris Lattner <sabre@nondot.org>2003-02-28 20:30:20 +0000
commitec0e374ba7ac48a5e720161d22d5c59119e33d6a (patch)
treef64b70c92e0f04c836bb86ba2c17440dc7d5d6fc /utils
parent915e030edf157d703e7876f5033cdbc0f982c69a (diff)
downloadexternal_llvm-ec0e374ba7ac48a5e720161d22d5c59119e33d6a.zip
external_llvm-ec0e374ba7ac48a5e720161d22d5c59119e33d6a.tar.gz
external_llvm-ec0e374ba7ac48a5e720161d22d5c59119e33d6a.tar.bz2
* Don't run tests if compilation failed
* Don't summarize tests if testing failed git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rwxr-xr-xutils/NightlyTest.pl99
1 files changed, 58 insertions, 41 deletions
diff --git a/utils/NightlyTest.pl b/utils/NightlyTest.pl
index 12ef6dd..39dca2c 100755
--- a/utils/NightlyTest.pl
+++ b/utils/NightlyTest.pl
@@ -262,60 +262,77 @@ my $AddedFilesList = AddPreTag join "\n", keys %AddedFiles;
my $ModifiedFilesList = AddPreTag join "\n", keys %ModifiedFiles;
my $RemovedFilesList = AddPreTag join "\n", keys %RemovedFiles;
-#
-# Run the nightly programs tests...
-#
-chdir "test/Programs" or die "Could not change into programs testdir!";
+my $TestError = 1;
+my $ProgramsTable;
-# Run the programs tests... creating a report.nightly.html file
-if (!$NOTEST) {
- system "gmake $MAKEOPTS report.nightly.html TEST=nightly "
- . "RUNTIMELIMIT=300 > $Prefix-ProgramTest.txt 2>&1";
-} else {
- system "gunzip $Prefix-ProgramTest.txt.gz";
-}
+# If we build the tree successfully, the nightly programs tests...
+if ($BuildError eq "") {
+ chdir "test/Programs" or die "Could not change into programs testdir!";
-my $ProgramsTable = ReadFile "report.nightly.html";
+ # Run the programs tests... creating a report.nightly.html file
+ if (!$NOTEST) {
+ system "gmake $MAKEOPTS report.nightly.html TEST=nightly "
+ . "RUNTIMELIMIT=300 > $Prefix-ProgramTest.txt 2>&1";
+ } else {
+ system "gunzip $Prefix-ProgramTest.txt.gz";
+ }
-#
-# Create a list of the tests which were run...
-#
-system "grep -E 'TEST-(PASS|FAIL)' < $Prefix-ProgramTest.txt "
- . "| sort > $Prefix-Tests.txt";
+ if (`grep '^gmake: .*Error' $Prefix-ProgramTest.txt | wc -l` + 0) {
+ $TestError = 1;
+ $ProgramsTable = "<h2>Error running tests!</h2>";
+ } else {
+ $TestError = 0;
+ $ProgramsTable = ReadFile "report.nightly.html";
+
+ #
+ # Create a list of the tests which were run...
+ #
+ system "grep -E 'TEST-(PASS|FAIL)' < $Prefix-ProgramTest.txt "
+ . "| sort > $Prefix-Tests.txt";
+ }
-# Compress the test output
-system "gzip $Prefix-ProgramTest.txt";
+ # Compress the test output
+ system "gzip $Prefix-ProgramTest.txt";
+}
-my ($RTestsAdded, $RTestsRemoved) = DiffFiles "-Tests.txt";
+my ($TestsAdded, $TestsRemoved, $TestsFixed, $TestsBroken) = ("","","","");
-my @RawTestsAddedArray = split '\n', $RTestsAdded;
-my @RawTestsRemovedArray = split '\n', $RTestsRemoved;
+if ($TestError) {
+ $TestsAdded = "<b>error testing</b><br>";
+ $TestsRemoved = "<b>error testing</b><br>";
+ $TestsFixed = "<b>error testing</b><br>";
+ $TestsBroken = "<b>error testing</b><br>";
+} else {
+ my ($RTestsAdded, $RTestsRemoved) = DiffFiles "-Tests.txt";
-my %OldTests = map {GetRegex('TEST-....: (.+)', $_)=>$_} @RawTestsRemovedArray;
-my %NewTests = map {GetRegex('TEST-....: (.+)', $_)=>$_} @RawTestsAddedArray;
+ my @RawTestsAddedArray = split '\n', $RTestsAdded;
+ my @RawTestsRemovedArray = split '\n', $RTestsRemoved;
-my ($TestsAdded, $TestsRemoved, $TestsFixed, $TestsBroken) = ("","","","");
+ my %OldTests = map {GetRegex('TEST-....: (.+)', $_)=>$_}
+ @RawTestsRemovedArray;
+ my %NewTests = map {GetRegex('TEST-....: (.+)', $_)=>$_}
+ @RawTestsAddedArray;
-foreach $Test (keys %NewTests) {
- if (!exists $OldTests{$Test}) { # TestAdded if in New but not old
- $TestsAdded = "$TestsAdded$Test\n";
- } else {
- if ($OldTests{$Test} =~ /TEST-PASS/) { # Was the old one a pass?
- $TestsBroken = "$TestsBroken$Test\n"; # New one must be a failure
+ foreach $Test (keys %NewTests) {
+ if (!exists $OldTests{$Test}) { # TestAdded if in New but not old
+ $TestsAdded = "$TestsAdded$Test\n";
} else {
- $TestsFixed = "$TestsFixed$Test\n"; # No, new one is a pass.
+ if ($OldTests{$Test} =~ /TEST-PASS/) { # Was the old one a pass?
+ $TestsBroken = "$TestsBroken$Test\n"; # New one must be a failure
+ } else {
+ $TestsFixed = "$TestsFixed$Test\n"; # No, new one is a pass.
+ }
}
}
-}
-foreach $Test (keys %OldTests) { # TestRemoved if in Old but not New
- $TestsRemoved = "$TestsRemoved$Test\n" if (!exists $NewTests{$Test});
-}
-
-$TestsAdded = AddPreTag $TestsAdded;
-$TestsRemoved = AddPreTag $TestsRemoved;
-$TestsFixed = AddPreTag $TestsFixed;
-$TestsBroken = AddPreTag $TestsBroken;
+ foreach $Test (keys %OldTests) { # TestRemoved if in Old but not New
+ $TestsRemoved = "$TestsRemoved$Test\n" if (!exists $NewTests{$Test});
+ }
+ $TestsAdded = AddPreTag $TestsAdded;
+ $TestsRemoved = AddPreTag $TestsRemoved;
+ $TestsFixed = AddPreTag $TestsFixed;
+ $TestsBroken = AddPreTag $TestsBroken;
+}
#
# Get a list of the previous days that we can link to...