aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2003-07-07 21:27:40 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2003-07-07 21:27:40 +0000
commit1b36689f03fbff6ba0c5d892e60240da9f5e4544 (patch)
treef3d151a0f4d451ad4a8433acc3fa1aa6c675d7a1 /utils
parent3cbfd77e257dc98db28fa4cf811955b858af66fe (diff)
downloadexternal_llvm-1b36689f03fbff6ba0c5d892e60240da9f5e4544.zip
external_llvm-1b36689f03fbff6ba0c5d892e60240da9f5e4544.tar.gz
external_llvm-1b36689f03fbff6ba0c5d892e60240da9f5e4544.tar.bz2
* Made $Template refer to a path relative to the checked-out tree
* Made error messages print out what directory failed chdir() * Put quotes around search arguments to grep * Use `egrep' instead of `grep -e' because they are equivalent but `grep' does not have the `-e' option on Sparc/Solaris * Added `--enable-jit' to the ./configure command because both X86 and Sparc have JITs and we want them to be tested * Fixed the regular expressions parsing the changes in CVS which were causing the script to die git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7118 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rwxr-xr-xutils/NightlyTest.pl25
1 files changed, 11 insertions, 14 deletions
diff --git a/utils/NightlyTest.pl b/utils/NightlyTest.pl
index af46bf0..5f77da9 100755
--- a/utils/NightlyTest.pl
+++ b/utils/NightlyTest.pl
@@ -98,15 +98,13 @@ while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) {
die "Must specify 0 or 3 options!" if (@ARGV != 0 and @ARGV != 3);
-# FIXME: This should just be utils/...
-my $Template = "$HOME/llvm/utils/NightlyTestTemplate.html";
-
if (@ARGV == 3) {
$CVSRootDir = $ARGV[0];
$BuildDir = $ARGV[1];
$WebDir = $ARGV[2];
}
+my $Template = "$BuildDir/llvm/utils/NightlyTestTemplate.html";
my $Prefix = "$WebDir/$DATE";
if (0) {
@@ -121,9 +119,9 @@ if (0) {
# Create the CVS repository directory
#
if (!$NOCHECKOUT) {
- mkdir $BuildDir or die "Could not create CVS checkout directory!";
+ mkdir $BuildDir or die "Could not create CVS checkout directory $BuildDir!";
}
-chdir $BuildDir or die "Could not change to CVS checkout directory!";
+chdir $BuildDir or die "Could not change to CVS checkout directory $BuildDir!";
#
@@ -145,7 +143,7 @@ my $TemplateContents = ReadFile $Template;
# Get some static statistics about the current state of CVS
#
my $CVSCheckoutTime = GetRegex "([0-9.]+)", `grep '^real' $Prefix-CVS-Log.txt`;
-my $NumFilesInCVS = `grep ^U $Prefix-CVS-Log.txt | wc -l` + 0;
+my $NumFilesInCVS = `grep '^U' $Prefix-CVS-Log.txt | wc -l` + 0;
my $NumDirsInCVS = `grep '^cvs checkout' $Prefix-CVS-Log.txt | wc -l` + 0;
$LOC = GetRegex "([0-9]+) +total", `wc -l \`utils/getsrcs.sh\` | grep total`;
@@ -153,7 +151,7 @@ $LOC = GetRegex "([0-9]+) +total", `wc -l \`utils/getsrcs.sh\` | grep total`;
# Build the entire tree, saving build messages to the build log
#
if (!$NOCHECKOUT) {
- system "(time -p ./configure) > $Prefix-Build-Log.txt 2>&1";
+ system "(time -p ./configure --enable-jit) > $Prefix-Build-Log.txt 2>&1";
# Change the Makefile.config to not strip executables...
system "echo 'KEEP_SYMBOLS := 1' >> Makefile.config";
@@ -183,7 +181,7 @@ if (`grep '^gmake: .*Error' $Prefix-Build-Log.txt | wc -l` + 0) {
#
# Get warnings from the build
#
-my @Warn = split "\n", `grep -E 'warning:|Entering dir' $Prefix-Build-Log.txt`;
+my @Warn = split "\n", `egrep 'warning:|Entering dir' $Prefix-Build-Log.txt`;
my @Warnings;
my $CurDir = "";
@@ -216,19 +214,18 @@ $WarningsRemoved = AddPreTag $WarningsRemoved;
# Extract some information from the CVS history... use a hash so no duplicate
# stuff is stored.
-my (%AddedFiles, %ModifiedFiles, %RemovedFiles,
- %UsersCommitted, %UsersUpdated);
+my (%AddedFiles, %ModifiedFiles, %RemovedFiles, %UsersCommitted, %UsersUpdated);
my $DateRE = "[-:0-9 ]+\\+[0-9]+";
# Loop over every record from the CVS history, filling in the hashes.
foreach $File (@CVSHistory) {
my ($Type, $Date, $UID, $Rev, $Filename);
- if ($File =~ /([AMRUGC])\s($DateRE)\s([^\s].......) (.[0-9.]*)\s+([^\s]+)\s+([^\s]+)/) {
+ if ($File =~ /([AMRUGC]) ($DateRE) ([^ ]+) +([0-9\.]+) +([^ ]+) +([^ ]+)/) {
($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, $4, "$6/$5");
- } elsif ($File =~ /([W])\s($DateRE)\s([^\s]+) +([^\s]+)\s+([^\s]+)/) {
+ } elsif ($File =~ /([W]) ($DateRE) ([^ ]+) +([^ ]+) +([^ ]+)/) {
($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, $4, "$6/$5");
- } elsif ($File =~ /([O]) ($DateRE) ([^ ]+) +([^\s]+)/) {
+ } elsif ($File =~ /([O]) ($DateRE) ([^ ]+) +([^ ]+)/) {
($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, "", "$4/");
} else {
print "UNMATCHABLE: $File\n";
@@ -286,7 +283,7 @@ if ($BuildError eq "") {
#
# Create a list of the tests which were run...
#
- system "grep -E 'TEST-(PASS|FAIL)' < $Prefix-ProgramTest.txt "
+ system "egrep 'TEST-(PASS|FAIL)' < $Prefix-ProgramTest.txt "
. "| sort > $Prefix-Tests.txt";
}