From: Daniel Dunbar Date: Mon, 19 Oct 2009 09:18:24 +0000 (+0000) Subject: Regroup NewNightlyTest.pl options X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=4628e5e1204a06eefef5ca1430217998c8a8e851;p=oota-llvm.git Regroup NewNightlyTest.pl options git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84476 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/NewNightlyTest.pl b/utils/NewNightlyTest.pl index 477df8fc12e..7331069e32e 100755 --- a/utils/NewNightlyTest.pl +++ b/utils/NewNightlyTest.pl @@ -15,19 +15,52 @@ use Socket; # Syntax: NightlyTest.pl [OPTIONS] [CVSROOT BUILDDIR WEBDIR] # where # OPTIONS may include one or more of the following: +# +# MAIN OPTIONS: +# -config LLVMPATH If specified, use an existing LLVM build and only run and +# report the test information. The LLVMCONFIG argument should +# be the path to the llvm-config executable in the LLVM build. +# This should be the first argument if given. NOT YET +# IMPLEMENTED. +# -nickname NAME The NAME argument specifieds the nickname this script +# will submit to the nightlytest results repository. +# -submit-server Specifies a server to submit the test results too. If this +# option is not specified it defaults to +# llvm.org. This is basically just the address of the +# webserver +# -submit-script Specifies which script to call on the submit server. If +# this option is not specified it defaults to +# /nightlytest/NightlyTestAccept.php. This is basically +# everything after the www.yourserver.org. +# -submit-aux If specified, an auxiliary script to run in addition to the +# normal submit script. The script will be passed the path to +# the "sentdata.txt" file as its sole argument. +# -nosubmit Do not report the test results back to a submit server. +# +# +# BUILD OPTIONS (not used with -config): # -nocheckout Do not create, checkout, update, or configure # the source tree. # -noremove Do not remove the BUILDDIR after it has been built. # -noremoveresults Do not remove the WEBDIR after it has been built. # -nobuild Do not build llvm. If tests are enabled perform them # on the llvm build specified in the build directory -# -notest Do not even attempt to run the test programs. -# -nodejagnu Do not run feature or regression tests -# -parallel Run parallel jobs with GNU Make (see -parallel-jobs). -# -parallel-jobs The number of parallel Make jobs to use (default is two). -# -with-clang Checkout Clang source into tools/clang. # -release Build an LLVM Release version # -release-asserts Build an LLVM ReleaseAsserts version +# -disable-bindings Disable building LLVM bindings. +# -cvstag Check out a specific CVS tag to build LLVM (useful for +# testing release branches) +# -usecvs Check code out from the (old) CVS Repository instead of from +# the standard Subversion repository. +# -with-clang Checkout Clang source into tools/clang. +# -compileflags Next argument specifies extra options passed to make when +# building LLVM. +# -use-gmake Use gmake instead of the default make command to build +# llvm and run tests. +# +# TESTING OPTIONS: +# -notest Do not even attempt to run the test programs. +# -nodejagnu Do not run feature or regression tests # -enable-llcbeta Enable testing of beta features in llc. # -enable-lli Enable testing of lli (interpreter) features, default is off # -disable-pic Disable building with Position Independent Code. @@ -35,19 +68,25 @@ use Socket; # -disable-jit Disable JIT tests in the nightly tester. # -disable-cbe Disable C backend tests in the nightly tester. # -disable-lto Disable link time optimization. -# -disable-bindings Disable building LLVM bindings. +# -test-cflags Next argument specifies that C compilation options that +# override the default when running the testsuite. +# -test-cxxflags Next argument specifies that C++ compilation options that +# override the default when running the testsuite. +# -extraflags Next argument specifies extra options that are passed to +# compile the tests. +# -noexternals Do not run the external tests (for cases where povray +# or SPEC are not installed) +# -with-externals Specify a directory where the external tests are located. +# +# OTHER OPTIONS: +# -parallel Run parallel jobs with GNU Make (see -parallel-jobs). +# -parallel-jobs The number of parallel Make jobs to use (default is two). # -verbose Turn on some debug output # -debug Print information useful only to maintainers of this script. # -nice Checkout/Configure/Build with "nice" to reduce impact # on busy servers. # -f2c Next argument specifies path to F2C utility -# -nickname The next argument specifieds the nickname this script -# will submit to the nightlytest results repository. # -gccpath Path to gcc/g++ used to build LLVM -# -cvstag Check out a specific CVS tag to build LLVM (useful for -# testing release branches) -# -usecvs Check code out from the (old) CVS Repository instead of from -# the standard Subversion repository. # -target Specify the target triplet # -cflags Next argument specifies that C compilation options that # override the default. @@ -55,33 +94,6 @@ use Socket; # override the default. # -ldflags Next argument specifies that linker options that override # the default. -# -test-cflags Next argument specifies that C compilation options that -# override the default when running the testsuite. -# -test-cxxflags Next argument specifies that C++ compilation options that -# override the default when running the testsuite. -# -compileflags Next argument specifies extra options passed to make when -# building LLVM. -# -use-gmake Use gmake instead of the default make command to build -# llvm and run tests. -# -# ---------------- Options to configure llvm-test ---------------------------- -# -extraflags Next argument specifies extra options that are passed to -# compile the tests. -# -noexternals Do not run the external tests (for cases where povray -# 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 -# option is not specified it defaults to -# llvm.org. This is basically just the address of the -# webserver -# -submit-script Specifies which script to call on the submit server. If -# this option is not specified it defaults to -# /nightlytest/NightlyTestAccept.php. This is basically -# everything after the www.yourserver.org. -# -submit-aux If specified, an auxiliary script to run in addition to the -# normal submit script. The script will be passed the path to -# the "sentdata.txt" file as its sole argument. -# -nosubmit Do not report the test results back to a submit server. # # CVSROOT is the CVS repository from which the tree will be checked out, # specified either in the full :method:user@host:/dir syntax, or @@ -133,6 +145,7 @@ my $DATE = sprintf "%4d-%02d-%02d_%02d-%02d", $TIME[5]+1900, $TIME[4]+1, $TIME[3 # Parse arguments... # ############################################################## +$CONFIG_PATH=""; $CONFIGUREARGS=""; $nickname=""; $NOTEST=0; @@ -150,6 +163,7 @@ while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) { last if /^--$/; # Stop processing arguments on -- # List command line options here... + if (/^-config$/) { $CONFIG_PATH = "$ARGV[0]"; shift; next; } if (/^-nocheckout$/) { $NOCHECKOUT = 1; next; } if (/^-nocvsstats$/) { $NOCVSSTATS = 1; next; } if (/^-noremove$/) { $NOREMOVE = 1; next; } @@ -222,6 +236,10 @@ while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) { print "Unknown option: $_ : ignoring!\n"; } +if (!($CONFIG_PATH eq "")) { + die "error: -config mode is not yet implemented,"; +} + if ($ENV{'LLVMGCCDIR'}) { $CONFIGUREARGS .= " --with-llvmgccdir=" . $ENV{'LLVMGCCDIR'}; $LLVMGCCPATH = $ENV{'LLVMGCCDIR'} . '/bin'; @@ -265,7 +283,7 @@ if ($BUILDTYPE ne "release" && $BUILDTYPE ne "release-asserts") { ############################################################## # -#define the file names we'll use +# Define the file names we'll use # ############################################################## my $Prefix = "$WebDir/$DATE"; @@ -303,6 +321,7 @@ if ($VERBOSE) { # Helper functions # ############################################################## + sub GetDir { my $Suffix = shift; opendir DH, $WebDir; @@ -499,10 +518,10 @@ sub GetDejagnuTestResults { # (filename, log) # to our central server via the post method # #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -sub SendData{ +sub SendData { $host = $_[0]; $file = $_[1]; - $variables=$_[2]; + $variables = $_[2]; # Write out the "...-sentdata.txt" file. @@ -517,7 +536,7 @@ sub SendData{ system "$SUBMITAUX \"$Prefix-sentdata.txt\""; } - if (!$SUBMIT) { + if (!$SUBMIT) { return "Skipped standard submit.\n"; } @@ -531,9 +550,9 @@ sub SendData{ } # Send the data to the server. - # + # # FIXME: This code should be more robust? - + $port=80; $socketaddr= sockaddr_in $port, inet_aton $host or die "Bad hostname\n"; socket SOCK, PF_INET, SOCK_STREAM, getprotobyname('tcp') or