sub GetRegex { # (Regex with ()'s, value)
$_[1] =~ /$_[0]/m;
- return $1;
+ if (defined($1)) {
+ return $1;
+ }
+ return "?";
}
sub AddPreTag { # Add pre tags around nonempty list, or convert to "none"
my $NOCHECKOUT = 0;
my $NOREMOVE = 0;
my $NOTEST = 0;
+my $NORUNNINGTESTS = 0;
my $MAKEOPTS = "";
# Parse arguments...
last if /^--$/; # Stop processing arguments on --
# List command line options here...
- if (/^-nocheckout$/) { $NOCHECKOUT = 1; next; }
- if (/^-noremove$/) { $NOREMOVE = 1; next; }
- if (/^-notest$/) { $NOTEST = 1; next; }
- if (/^-parallel$/) { $MAKEOPTS = "-j2 -l3.0"; next; }
+ if (/^-nocheckout$/) { $NOCHECKOUT = 1; next; }
+ if (/^-noremove$/) { $NOREMOVE = 1; next; }
+ if (/^-notest$/) { $NOTEST = 1; $NORUNNINGTESTS = 1; next; }
+ if (/^-norunningtests$/) { $NORUNNINGTESTS = 1; next; }
+ if (/^-parallel$/) { $MAKEOPTS = "-j2 -l3.0"; next; }
print "Unknown option: $_ : ignoring!\n";
}
# If we built the tree successfully, runs of the Olden suite with
# LARGE_PROBLEM_SIZE on so that we can get some "running" statistics.
if ($BuildError eq "") {
- my ($NatTime, $CBETime, $LLCTime, $JITTime, $OptTime, $BytecodeSize,
+ my ($NATTime, $CBETime, $LLCTime, $JITTime, $OptTime, $BytecodeSize,
$MachCodeSize) = ("","","","","","","");
- if (!$NOTEST) {
+ if (!$NORUNNINGTESTS) {
chdir "test/Programs/MultiSource/Olden" or die "Olden tests moved?";
# Clean out previous results...
# Now we know we have $Prefix-Olden-tests.txt as the raw output file. Split
# it up into records and read the useful information.
- my @Records = split />>> ========= /, ReadFile "$Prefix-Olden-tests.txt.gz";
+ my @Records = split />>> ========= /, ReadFile "$Prefix-Olden-tests.txt";
shift @Records; # Delete the first (garbage) record
# Loop over all of the records, summarizing them into rows for the running
# totals file.
my $WallTimeRE = "[A-Za-z0-9.: ]+\\(([0-9.]+) wall clock";
foreach $Rec (@Records) {
- my $rNATTime = GetRegex "TEST-RESULT-nat-time: real\s*([.0-9m]+)", $Rec;
- my $rCBETime = GetRegex "TEST-RESULT-cbe-time: real\s*([.0-9m]+)", $Rec;
- my $rLLCTime = GetRegex "TEST-RESULT-llc-time: real\s*([.0-9m]+)", $Rec;
- my $rJITTime = GetRegex "TEST-RESULT-jit-time: real\s*([.0-9m]+)", $Rec;
+ my $rNATTime = GetRegex 'TEST-RESULT-nat-time: real\s*([.0-9m]+)', $Rec;
+ my $rCBETime = GetRegex 'TEST-RESULT-cbe-time: real\s*([.0-9m]+)', $Rec;
+ my $rLLCTime = GetRegex 'TEST-RESULT-llc-time: real\s*([.0-9m]+)', $Rec;
+ my $rJITTime = GetRegex 'TEST-RESULT-jit-time: real\s*([.0-9m]+)', $Rec;
my $rOptTime = GetRegex "TEST-RESULT-compile: $WallTimeRE", $Rec;
my $rBytecodeSize = GetRegex 'TEST-RESULT-compile: *([0-9]+)', $Rec;
my $rMachCodeSize = GetRegex 'TEST-RESULT-jit-machcode: *([0-9]+).*bytes of machine code', $Rec;
$LLCTime .= " " . FormatTime($rLLCTime);
$JITTime .= " " . FormatTime($rJITTime);
$OptTime .= " $rOptTime";
- $BytecodeSize .= " $BytecodeSize";
- $MachCodeSize .= " $MachCodeSize";
+ $BytecodeSize .= " $rBytecodeSize";
+ $MachCodeSize .= " $rMachCodeSize";
}
# Now that we have all of the numbers we want, add them to the running totals
# files.
- AddRecord($NatTime, "running_Olden_nat_time.txt");
+ AddRecord($NATTime, "running_Olden_nat_time.txt");
AddRecord($CBETime, "running_Olden_cbe_time.txt");
AddRecord($LLCTime, "running_Olden_llc_time.txt");
AddRecord($JITTime, "running_Olden_jit_time.txt");
AddRecord($OptTime, "running_Olden_opt_time.txt");
AddRecord($BytecodeSize, "running_Olden_bytecode.txt");
AddRecord($MachCodeSize, "running_Olden_machcode.txt");
+
+ system "gzip -f $Prefix-Olden-tests.txt";
}
close FILE;
}
push @Records, "$DATE: $Val";
- WriteFile $Filename, (join "\n", @Records) . "\n";
+ WriteFile "$WebDir/$Filename", (join "\n", @Records) . "\n";
return @Records;
}