diff options
author | Patrick Jenkins <pjenkins@apple.com> | 2006-07-27 01:03:46 +0000 |
---|---|---|
committer | Patrick Jenkins <pjenkins@apple.com> | 2006-07-27 01:03:46 +0000 |
commit | 0f3e0b0292f9919a6d8718c2b01c014ee7c26920 (patch) | |
tree | d59c1702aedba3e15d830b2c9db0a6d2eaad75af | |
parent | 2c3e9bab6fa809b5c505c6f5d4fafa6ce6caa84c (diff) | |
download | llvm-0f3e0b0292f9919a6d8718c2b01c014ee7c26920.zip llvm-0f3e0b0292f9919a6d8718c2b01c014ee7c26920.tar.gz llvm-0f3e0b0292f9919a6d8718c2b01c014ee7c26920.tar.bz2 |
This change will allow support for SunOS to the testing script. It adds a check to see if we're running on SunOS and if so, then uses gmake instead of make.
llvm-svn: 29316
-rwxr-xr-x | llvm/utils/NewNightlyTest.pl | 56 |
1 files changed, 39 insertions, 17 deletions
diff --git a/llvm/utils/NewNightlyTest.pl b/llvm/utils/NewNightlyTest.pl index 1beca6d..b050ddf 100755 --- a/llvm/utils/NewNightlyTest.pl +++ b/llvm/utils/NewNightlyTest.pl @@ -178,7 +178,13 @@ if ($CONFIGUREARGS !~ /--disable-jit/) { $CONFIGUREARGS .= " --enable-jit"; } -die "Must specify 0 or 3 options!" if (@ARGV != 0 and @ARGV != 3); + +if (@ARGV != 0 and @ARGV != 3){ + foreach $x (@ARGV){ + print "$x\n"; + } + print "Must specify 0 or 3 options!"; +} if (@ARGV == 3) { $CVSRootDir = $ARGV[0]; @@ -186,6 +192,13 @@ if (@ARGV == 3) { $WebDir = $ARGV[2]; } +if($CVSRootDir eq "" or + $BuildDir eq "" or + $WebDir eq ""){ + die("please specify a cvs root directory, a build directory, and a ". + "web directory"); + } + if($nickname eq ""){ die ("Please invoke NewNightlyTest.pl with command line option \"-nickname <nickname>\""); } @@ -193,6 +206,15 @@ if($BUILDTYPE ne "releaese"){ $BUILDTYPE = "debug"; } +#FIXME: this is a hack for SunOS, there must be a better way +if(`uname` eq "SunOS"){ + $MAKECMD = "gmake"; +} +else { + $MAKECMD="make"; +} + + ############################################################## # #define the file names we'll use @@ -596,11 +618,11 @@ if (!$NOCHECKOUT && !$NOBUILD) { system "(time -p $NICE ./configure $CONFIGUREARGS $EXTRAFLAGS) > $BuildLog 2>&1"; if ( $VERBOSE ) { - print "BUILD STAGE:\n"; - print "(time -p $NICE make $MAKEOPTS) >> $BuildLog 2>&1\n"; + print "BUILD STAGE:\n"; + print "(time -p $NICE $MAKECMD $MAKEOPTS) >> $BuildLog 2>&1\n"; } # Build the entire tree, capturing the output into $BuildLog - system "(time -p $NICE make $MAKEOPTS) >> $BuildLog 2>&1"; + system "(time -p $NICE $MAKECMD $MAKEOPTS) >> $BuildLog 2>&1"; } @@ -637,8 +659,8 @@ if($NOBUILD){ $BuildStatus = "Skipped by user"; $BuildError = 1; } -elsif (`grep '^make[^:]*: .*Error' $BuildLog | wc -l` + 0 || - `grep '^make: \*\*\*.*Stop.' $BuildLog | wc -l`+0) { +elsif (`grep '^$MAKECMD\[^:]*: .*Error' $BuildLog | wc -l` + 0 || + `grep '^$MAKECMD: \*\*\*.*Stop.' $BuildLog | wc -l`+0) { $BuildStatus = "Error: compilation aborted"; $BuildError = 1; print "\n***ERROR BUILDING TREE\n\n"; @@ -683,13 +705,13 @@ my $dejagnu_output = "$DejagnuTestsLog"; if(!$NODEJAGNU) { if($VERBOSE) { - print "DEJAGNU FEATURE/REGRESSION TEST STAGE:\n"; - print "(time -p make $MAKEOPTS check) > $dejagnu_output 2>&1\n"; + print "DEJAGNU FEATURE/REGRESSION TEST STAGE:\n"; + print "(time -p $MAKECMD $MAKEOPTS check) > $dejagnu_output 2>&1\n"; } #Run the feature and regression tests, results are put into testrun.sum #Full log in testrun.log - system "(time -p make $MAKEOPTS check) > $dejagnu_output 2>&1"; + system "(time -p $MAKECMD $MAKEOPTS check) > $dejagnu_output 2>&1"; #Copy the testrun.log and testrun.sum to our webdir CopyFile("test/testrun.log", $DejagnuLog); @@ -766,19 +788,19 @@ sub TestDirectory { # Run the programs tests... creating a report.nightly.csv file if (!$NOTEST) { - print "make -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv " + print "$MAKECMD -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv " . "TEST=nightly > $ProgramTestLog 2>&1\n"; - system "make -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv " + system "$MAKECMD -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv " . "TEST=nightly > $ProgramTestLog 2>&1"; - $llcbeta_options=`make print-llcbeta-option`; + $llcbeta_options=`$MAKECMD print-llcbeta-option`; } my $ProgramsTable; - if (`grep '^make[^:]: .*Error' $ProgramTestLog | wc -l` + 0){ + if (`grep '^$MAKECMD\[^:]: .*Error' $ProgramTestLog | wc -l` + 0){ $TestError = 1; $ProgramsTable="Error running test $SubDir\n"; print "ERROR TESTING\n"; - } elsif (`grep '^make[^:]: .*No rule to make target' $ProgramTestLog | wc -l` + 0) { + } 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"; @@ -925,13 +947,13 @@ if (!$BuildError) { "Olden Test Directory"); # Clean out previous results... - system "$NICE make $MAKEOPTS clean > /dev/null 2>&1"; + system "$NICE $MAKECMD $MAKEOPTS clean > /dev/null 2>&1"; # Run the nightly test in this directory, with LARGE_PROBLEM_SIZE and # GET_STABLE_NUMBERS enabled! - if( $VERBOSE ) { print "make -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv.out TEST=nightly " . + if( $VERBOSE ) { print "$MAKECMD -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv.out TEST=nightly " . " LARGE_PROBLEM_SIZE=1 GET_STABLE_NUMBERS=1 > /dev/null 2>&1\n"; } - system "make -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv.out TEST=nightly " . + system "$MAKECMD -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv.out TEST=nightly " . " LARGE_PROBLEM_SIZE=1 GET_STABLE_NUMBERS=1 > /dev/null 2>&1"; system "cp report.nightly.csv $OldenTestsLog"; } #else { |