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

Patrick Jenkins pjenkins at apple.com
Thu Jul 27 13:29:04 CDT 2006



Changes in directory llvm/utils:

NewNightlyTest.pl updated: 1.29 -> 1.30
---
Log message:

Removed some clutter that was left over from development. 
Changed how changedir worked. Hopefully now when it fails it will tell us why.



---
Diffs of the changes:  (+39 -48)

 NewNightlyTest.pl |   87 ++++++++++++++++++++++++------------------------------
 1 files changed, 39 insertions(+), 48 deletions(-)


Index: llvm/utils/NewNightlyTest.pl
diff -u llvm/utils/NewNightlyTest.pl:1.29 llvm/utils/NewNightlyTest.pl:1.30
--- llvm/utils/NewNightlyTest.pl:1.29	Wed Jul 26 20:24:35 2006
+++ llvm/utils/NewNightlyTest.pl	Thu Jul 27 13:28:50 2006
@@ -302,7 +302,11 @@
     my ($dir,$name) = @_;
     chomp($dir);
     if ( $VERBOSE ) { print "Changing To: $name ($dir)\n"; }
-    chdir($dir) || (print "Cannot change directory to: $name ($dir) " && return -1);
+    $result = chdir($dir);
+    if(!$result){
+    	print "ERROR!!! Cannot change directory to: $name ($dir) because $!"; 
+    	return -1;
+    }
     return 0;
 }
 
@@ -777,57 +781,44 @@
 #
 ##############################################################
 sub TestDirectory {
-    my $SubDir = shift;
-    
-    ChangeDir( "projects/llvm-test/$SubDir", "Programs Test Subdirectory" ) || return ("", "");
-
-    my $ProgramTestLog = "$Prefix-$SubDir-ProgramTest.txt";
-    #my $ProgramTestLog = "$Prefix-MultiSource-ProgramTest.txt"; #CHANGE ME!
-    
-    # Run the programs tests... creating a report.nightly.csv file
-    if (!$NOTEST) {
-	print "$MAKECMD -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv "
-	    . "TEST=nightly > $ProgramTestLog 2>&1\n";
-	system "$MAKECMD -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv "
-	    . "TEST=nightly > $ProgramTestLog 2>&1";
-	$llcbeta_options=`$MAKECMD print-llcbeta-option`;
-    } 
+	my $SubDir = shift;
+	
+	ChangeDir( "projects/llvm-test/$SubDir", "Programs Test Subdirectory" ) || return ("", "");
+	
+	my $ProgramTestLog = "$Prefix-$SubDir-ProgramTest.txt";
+	
+	# Run the programs tests... creating a report.nightly.csv file
+	if (!$NOTEST) {
+		print "$MAKECMD -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv ".
+          "TEST=nightly > $ProgramTestLog 2>&1\n";
+		system "$MAKECMD -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv ".
+           "TEST=nightly > $ProgramTestLog 2>&1";
+	  $llcbeta_options=`$MAKECMD print-llcbeta-option`;
+	} 
     
-    my $ProgramsTable;
-    if (`grep '^$MAKECMD\[^:]: .*Error' $ProgramTestLog | wc -l` + 0){
-	$TestError = 1;
-	$ProgramsTable="Error running test $SubDir\n";
-	print "ERROR TESTING\n";
-    } elsif (`grep '^$MAKECMD\[^:]: .*No rule to make target' $ProgramTestLog | wc -l` + 0) {
-	$TestError = 1;
-	$ProgramsTable="Makefile error running tests $SubDir!\n";
-	print "ERROR TESTING\n";
-    } else {
-	$TestError = 0;
+  my $ProgramsTable;
+  if (`grep '^$MAKECMD\[^:]: .*Error' $ProgramTestLog | wc -l` + 0){
+    $TestError = 1;
+    $ProgramsTable="Error running test $SubDir\n";
+    print "ERROR TESTING\n";
+  } elsif (`grep '^$MAKECMD\[^:]: .*No rule to make target' $ProgramTestLog | wc -l` + 0) {
+    $TestError = 1;
+    $ProgramsTable="Makefile error running tests $SubDir!\n";
+    print "ERROR TESTING\n";
+  } else {
+    $TestError = 0;
+    #
+    # Create a list of the tests which were run...
+    #
+    system "egrep 'TEST-(PASS|FAIL)' < $ProgramTestLog ".
+           "| sort > $Prefix-multisourceprogramstable.txt";
+  }
+  $ProgramsTable = ReadFile "report.nightly.csv";
 
-	#
-	# Create a list of the tests which were run...
-	#
-	system "egrep 'TEST-(PASS|FAIL)' < $ProgramTestLog "
-	. "| sort > $Prefix-multisourceprogramstable.txt";
-    }
-    $ProgramsTable = ReadFile "report.nightly.csv";
-    
-    ChangeDir( "../../..", "Programs Test Parent Directory" );
-    return ($ProgramsTable, $llcbeta_options);
+  ChangeDir( "../../..", "Programs Test Parent Directory" );
+  return ($ProgramsTable, $llcbeta_options);
 }
 
-$patrickjenkins=1;
-if(!$patrickjenkins){
-    if ( $VERBOSE ) {
-        print "Modified Multisource Olden test stage\n";
-    }
-    ($MultiSourceProgramsTable, $multisource_llcbeta_options) = TestDirectory("MultiSource/");
-    ChangeDir( "../../..", "Programs Test Parent Directory" );
-    
-
-    WriteFile "$WebDir/multisourceprogramstable.txt", $MultiSourceProgramsTable;
-}
 if (!$BuildError && $patrickjenkins) {
     if ( $VERBOSE ) {
 	print "SingleSource TEST STAGE\n";






More information about the llvm-commits mailing list