#
# Synopsis: Perform a series of tests which are designed to be run nightly.
# This is used to keep track of the status of the LLVM tree, tracking
#
# Synopsis: Perform a series of tests which are designed to be run nightly.
# This is used to keep track of the status of the LLVM tree, tracking
# to llvm.org where it is placed into the nightlytestresults database.
#
# Modified heavily by Patrick Jenkins, July 2006
# to llvm.org where it is placed into the nightlytestresults database.
#
# Modified heavily by Patrick Jenkins, July 2006
# or SPEC are not installed)
# -with-externals Specify a directory where the external tests are located.
# -submit-server Specifies a server to submit the test results too. If this
# or SPEC are not installed)
# -with-externals Specify a directory where the external tests are located.
# -submit-server Specifies a server to submit the test results too. If this
# webserver
# -submit-script Specifies which script to call on the submit server. If
# this option is not specified it defaults to
# webserver
# -submit-script Specifies which script to call on the submit server. If
# this option is not specified it defaults to
# everything after the www.yourserver.org.
# -nosubmit Do not report the test results back to a submit server.
#
# everything after the www.yourserver.org.
# -nosubmit Do not report the test results back to a submit server.
#
"OPTIMIZE_OPTION=-O2"; $BUILDTYPE="release"; next;}
if (/^-release-asserts$/){ $MAKEOPTS = "$MAKEOPTS ENABLE_OPTIMIZED=1 ".
"DISABLE_ASSERTIONS=1 ".
"OPTIMIZE_OPTION=-O2"; $BUILDTYPE="release"; next;}
if (/^-release-asserts$/){ $MAKEOPTS = "$MAKEOPTS ENABLE_OPTIMIZED=1 ".
"DISABLE_ASSERTIONS=1 ".
$BUILDTYPE="release-asserts"; next;}
if (/^-enable-llcbeta$/) { $PROGTESTOPTS .= " ENABLE_LLCBETA=1"; next; }
if (/^-enable-lli$/) { $PROGTESTOPTS .= " ENABLE_LLI=1";
$BUILDTYPE="release-asserts"; next;}
if (/^-enable-llcbeta$/) { $PROGTESTOPTS .= " ENABLE_LLCBETA=1"; next; }
if (/^-enable-lli$/) { $PROGTESTOPTS .= " ENABLE_LLI=1";
if (/^-disable-jit$/) { $PROGTESTOPTS .= " DISABLE_JIT=1";
$CONFIGUREARGS .= " --disable-jit"; next; }
if (/^-disable-cbe$/) { $PROGTESTOPTS .= " DISABLE_CBE=1"; next; }
if (/^-disable-jit$/) { $PROGTESTOPTS .= " DISABLE_JIT=1";
$CONFIGUREARGS .= " --disable-jit"; next; }
if (/^-disable-cbe$/) { $PROGTESTOPTS .= " DISABLE_CBE=1"; next; }
if (/^-verbose$/) { $VERBOSE = 1; next; }
if (/^-debug$/) { $DEBUG = 1; next; }
if (/^-nice$/) { $NICE = "nice "; next; }
if (/^-verbose$/) { $VERBOSE = 1; next; }
if (/^-debug$/) { $DEBUG = 1; next; }
if (/^-nice$/) { $NICE = "nice "; next; }
shift; next; }
if (/^-submit-server/) { $SUBMITSERVER = "$ARGV[0]"; shift; next; }
if (/^-submit-script/) { $SUBMITSCRIPT = "$ARGV[0]"; shift; next; }
if (/^-nosubmit$/) { $SUBMIT = 0; next; }
shift; next; }
if (/^-submit-server/) { $SUBMITSERVER = "$ARGV[0]"; shift; next; }
if (/^-submit-script/) { $SUBMITSCRIPT = "$ARGV[0]"; shift; next; }
if (/^-nosubmit$/) { $SUBMIT = 0; next; }
- if (/^-nickname$/) { $nickname = "$ARGV[0]"; shift; next; }
- if (/^-gccpath/) { $CONFIGUREARGS .=
- " CC=$ARGV[0]/gcc CXX=$ARGV[0]/g++";
+ if (/^-nickname$/) { $nickname = "$ARGV[0]"; shift; next; }
+ if (/^-gccpath/) { $CONFIGUREARGS .=
+ " CC=$ARGV[0]/gcc CXX=$ARGV[0]/g++";
shift; next; }
if (/^-compileflags/) { $MAKEOPTS = "$MAKEOPTS $ARGV[0]"; shift; next; }
if (/^-use-gmake/) { $MAKECMD = "gmake"; shift; next; }
shift; next; }
if (/^-compileflags/) { $MAKEOPTS = "$MAKEOPTS $ARGV[0]"; shift; next; }
if (/^-use-gmake/) { $MAKECMD = "gmake"; shift; next; }
" --with-extra-options=\'$ARGV[0]\'"; shift; next;}
if (/^-noexternals$/) { $NOEXTERNALS = 1; next; }
if (/^-nodejagnu$/) { $NODEJAGNU = 1; next; }
" --with-extra-options=\'$ARGV[0]\'"; shift; next;}
if (/^-noexternals$/) { $NOEXTERNALS = 1; next; }
if (/^-nodejagnu$/) { $NODEJAGNU = 1; next; }
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub GetRegex { # (Regex with ()'s, value)
$_[1] =~ /$_[0]/m;
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub GetRegex { # (Regex with ()'s, value)
$_[1] =~ /$_[0]/m;
- socket SOCK, PF_INET, SOCK_STREAM, getprotobyname('tcp') or
+ socket SOCK, PF_INET, SOCK_STREAM, getprotobyname('tcp') or
die "Bad socket\n";
connect SOCK, $socketaddr or die "Bad connection\n";
select((select(SOCK), $| = 1)[0]);
die "Bad socket\n";
connect SOCK, $socketaddr or die "Bad connection\n";
select((select(SOCK), $| = 1)[0]);
$sentdata.= "$x => $value\n";
}
WriteFile "$Prefix-sentdata.txt", $sentdata;
$sentdata.= "$x => $value\n";
}
WriteFile "$Prefix-sentdata.txt", $sentdata;
if ($Filename =~ /^llvm/) {
if ($Type eq 'M') { # Modified
$ModifiedFiles{$Filename} = 1;
if ($Filename =~ /^llvm/) {
if ($Type eq 'M') { # Modified
$ModifiedFiles{$Filename} = 1;
if ( $VERBOSE );
ChangeDir( "$BuildDir/llvm", "Build Directory" );
$afiles.= `find utils/ -iname '*.a' -ls`;
if ( $VERBOSE );
ChangeDir( "$BuildDir/llvm", "Build Directory" );
$afiles.= `find utils/ -iname '*.a' -ls`;
$ofiles.= `find utils/ -iname '*.o' -ls`;
$ofiles.= `find lib/ -iname '*.o' -ls`;
$ofiles.= `find tools/ -iname '*.o' -ls`;
$ofiles.= `find utils/ -iname '*.o' -ls`;
$ofiles.= `find lib/ -iname '*.o' -ls`;
$ofiles.= `find tools/ -iname '*.o' -ls`;
my $DejangnuTestResults=""; # String containing the results of the dejagnu
my $dejagnu_output = "$DejagnuTestsLog";
if (!$NODEJAGNU) {
my $DejangnuTestResults=""; # String containing the results of the dejagnu
my $dejagnu_output = "$DejagnuTestsLog";
if (!$NODEJAGNU) {
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 $MAKECMD $MAKEOPTS check) > $dejagnu_output 2>&1";
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 $MAKECMD $MAKEOPTS check) > $dejagnu_output 2>&1";
#Copy the testrun.log and testrun.sum to our webdir
CopyFile("test/testrun.log", $DejagnuLog);
CopyFile("test/testrun.sum", $DejagnuSum);
#Copy the testrun.log and testrun.sum to our webdir
CopyFile("test/testrun.log", $DejagnuLog);
CopyFile("test/testrun.sum", $DejagnuSum);
my $DejagnuTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$dejagnu_output";
my $DejagnuTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$dejagnu_output";
$DejagnuTime = $DejagnuTimeU+$DejagnuTimeS; # DejagnuTime = User+System
my $DejagnuTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$dejagnu_output";
my $DejagnuTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$dejagnu_output";
$DejagnuTime = $DejagnuTimeU+$DejagnuTimeS; # DejagnuTime = User+System
-$DejagnuWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$dejagnu_output";
-$DejagnuTestResults =
+$DejagnuWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$dejagnu_output";
+$DejagnuTestResults =
"Dejagnu skipped by user choice." unless $DejagnuTestResults;
$DejagnuTime = "0.0" unless $DejagnuTime;
$DejagnuWallTime = "0.0" unless $DejagnuWallTime;
"Dejagnu skipped by user choice." unless $DejagnuTestResults;
$DejagnuTime = "0.0" unless $DejagnuTime;
$DejagnuWallTime = "0.0" unless $DejagnuWallTime;
}
system "$MAKECMD -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv ".
"TEST=nightly > $ProgramTestLog 2>&1";
$llcbeta_options=`$MAKECMD print-llcbeta-option`;
}
system "$MAKECMD -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv ".
"TEST=nightly > $ProgramTestLog 2>&1";
$llcbeta_options=`$MAKECMD print-llcbeta-option`;
TestDirectory("SingleSource");
WriteFile "$Prefix-SingleSource-Performance.txt", $SingleSourceProgramsTable;
if ( $VERBOSE ) {
TestDirectory("SingleSource");
WriteFile "$Prefix-SingleSource-Performance.txt", $SingleSourceProgramsTable;
if ( $VERBOSE ) {
}
($ExternalProgramsTable, $llcbeta_options) = TestDirectory("External");
WriteFile "$Prefix-External-Performance.txt", $ExternalProgramsTable;
}
($ExternalProgramsTable, $llcbeta_options) = TestDirectory("External");
WriteFile "$Prefix-External-Performance.txt", $ExternalProgramsTable;
"$Prefix-MultiSource-Performance.txt ".
"$Prefix-External-Performance.txt | sort > $Prefix-Performance.txt";
} else {
"$Prefix-MultiSource-Performance.txt ".
"$Prefix-External-Performance.txt | sort > $Prefix-Performance.txt";
} else {
"$Prefix-MultiSource-Performance.txt ".
" | sort > $Prefix-Performance.txt";
}
##############################################################
#
"$Prefix-MultiSource-Performance.txt ".
" | sort > $Prefix-Performance.txt";
}
##############################################################
#
# Run the nightly test in this directory, with LARGE_PROBLEM_SIZE and
# GET_STABLE_NUMBERS enabled!
# Run the nightly test in this directory, with LARGE_PROBLEM_SIZE and
# GET_STABLE_NUMBERS enabled!
print "$MAKECMD -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv.out " .
"TEST=nightly LARGE_PROBLEM_SIZE=1 GET_STABLE_NUMBERS=1 " .
print "$MAKECMD -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv.out " .
"TEST=nightly LARGE_PROBLEM_SIZE=1 GET_STABLE_NUMBERS=1 " .
}
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";
}
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";
##############################################################
if ( $VERBOSE ) { print "PREPARING LOGS TO BE SENT TO SERVER\n"; }
##############################################################
if ( $VERBOSE ) { print "PREPARING LOGS TO BE SENT TO SERVER\n"; }