mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
NNT: Sink code for running nightly test into subroutine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84492 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3431123f36
commit
4a338bf227
@ -649,50 +649,57 @@ sub TestDirectory {
|
|||||||
# Calling sub TestDirectory
|
# Calling sub TestDirectory
|
||||||
#
|
#
|
||||||
##############################################################
|
##############################################################
|
||||||
if (!$BuildError) {
|
sub RunNightlyTest() {
|
||||||
($SingleSourceProgramsTable, $llcbeta_options) = TestDirectory("SingleSource");
|
if (!$BuildError) {
|
||||||
WriteFile "$Prefix-SingleSource-Performance.txt", $SingleSourceProgramsTable;
|
($SSProgs, $llcbeta_options) = TestDirectory("SingleSource");
|
||||||
($MultiSourceProgramsTable, $llcbeta_options) = TestDirectory("MultiSource");
|
WriteFile "$Prefix-SingleSource-Performance.txt", $SSProgs;
|
||||||
WriteFile "$Prefix-MultiSource-Performance.txt", $MultiSourceProgramsTable;
|
($MSProgs, $llcbeta_options) = TestDirectory("MultiSource");
|
||||||
if ( ! $NOEXTERNALS ) {
|
WriteFile "$Prefix-MultiSource-Performance.txt", $MSProgs;
|
||||||
($ExternalProgramsTable, $llcbeta_options) = TestDirectory("External");
|
if ( ! $NOEXTERNALS ) {
|
||||||
WriteFile "$Prefix-External-Performance.txt", $ExternalProgramsTable;
|
($ExtProgs, $llcbeta_options) = TestDirectory("External");
|
||||||
system "cat $Prefix-SingleSource-Tests.txt " .
|
WriteFile "$Prefix-External-Performance.txt", $ExtProgs;
|
||||||
"$Prefix-MultiSource-Tests.txt ".
|
system "cat $Prefix-SingleSource-Tests.txt " .
|
||||||
"$Prefix-External-Tests.txt | sort > $Prefix-Tests.txt";
|
"$Prefix-MultiSource-Tests.txt ".
|
||||||
system "cat $Prefix-SingleSource-Performance.txt " .
|
"$Prefix-External-Tests.txt | sort > $Prefix-Tests.txt";
|
||||||
"$Prefix-MultiSource-Performance.txt ".
|
system "cat $Prefix-SingleSource-Performance.txt " .
|
||||||
"$Prefix-External-Performance.txt | sort > $Prefix-Performance.txt";
|
"$Prefix-MultiSource-Performance.txt ".
|
||||||
} else {
|
"$Prefix-External-Performance.txt | sort > $Prefix-Performance.txt";
|
||||||
$ExternalProgramsTable = "External TEST STAGE SKIPPED\n";
|
} else {
|
||||||
if ( $VERBOSE ) {
|
$ExtProgs = "External TEST STAGE SKIPPED\n";
|
||||||
print "External TEST STAGE SKIPPED\n";
|
if ( $VERBOSE ) {
|
||||||
|
print "External TEST STAGE SKIPPED\n";
|
||||||
|
}
|
||||||
|
system "cat $Prefix-SingleSource-Tests.txt " .
|
||||||
|
"$Prefix-MultiSource-Tests.txt ".
|
||||||
|
" | sort > $Prefix-Tests.txt";
|
||||||
|
system "cat $Prefix-SingleSource-Performance.txt " .
|
||||||
|
"$Prefix-MultiSource-Performance.txt ".
|
||||||
|
" | sort > $Prefix-Performance.txt";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Compile passes, fails, xfails.
|
||||||
|
my @TestSuiteResultLines = split "\n", (ReadFile "$Prefix-Tests.txt");
|
||||||
|
my ($Passes, $Fails, $XFails) = "";
|
||||||
|
|
||||||
|
for ($x=0; $x < @TestSuiteResultLines; $x++) {
|
||||||
|
if (@TestSuiteResultLines[$x] =~ m/^PASS:/) {
|
||||||
|
$Passes .= "$TestSuiteResultLines[$x]\n";
|
||||||
|
}
|
||||||
|
elsif (@TestSuiteResultLines[$x] =~ m/^FAIL:/) {
|
||||||
|
$Fails .= "$TestSuiteResultLines[$x]\n";
|
||||||
|
}
|
||||||
|
elsif (@TestSuiteResultLines[$x] =~ m/^XFAIL:/) {
|
||||||
|
$XFails .= "$TestSuiteResultLines[$x]\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
system "cat $Prefix-SingleSource-Tests.txt " .
|
|
||||||
"$Prefix-MultiSource-Tests.txt ".
|
|
||||||
" | sort > $Prefix-Tests.txt";
|
|
||||||
system "cat $Prefix-SingleSource-Performance.txt " .
|
|
||||||
"$Prefix-MultiSource-Performance.txt ".
|
|
||||||
" | sort > $Prefix-Performance.txt";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Compile passes, fails, xfails.
|
return ($SSProgs, $MSProgs, $ExtProgs, $Passes, $Fails, $XFails)
|
||||||
my @TestSuiteResultLines = split "\n", (ReadFile "$Prefix-Tests.txt");
|
|
||||||
my ($passes, $fails, $xfails) = "";
|
|
||||||
|
|
||||||
for ($x=0; $x < @TestSuiteResultLines; $x++) {
|
|
||||||
if (@TestSuiteResultLines[$x] =~ m/^PASS:/) {
|
|
||||||
$passes .= "$TestSuiteResultLines[$x]\n";
|
|
||||||
}
|
|
||||||
elsif (@TestSuiteResultLines[$x] =~ m/^FAIL:/) {
|
|
||||||
$fails .= "$TestSuiteResultLines[$x]\n";
|
|
||||||
}
|
|
||||||
elsif (@TestSuiteResultLines[$x] =~ m/^XFAIL:/) {
|
|
||||||
$xfails .= "$TestSuiteResultLines[$x]\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my ($SingleSourceProgramsTable, $MultiSourceProgramsTable, $ExternalProgramsTable,
|
||||||
|
$passes, $fails, $xfails) = RunNightlyTest();
|
||||||
|
|
||||||
##############################################################
|
##############################################################
|
||||||
#
|
#
|
||||||
# Getting end timestamp
|
# Getting end timestamp
|
||||||
|
Loading…
Reference in New Issue
Block a user