Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 1 | #!/usr/bin/perl |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 2 | use POSIX qw(strftime); |
| 3 | use File::Copy; |
Bob Wilson | 6dc11b4 | 2009-06-19 17:19:38 +0000 | [diff] [blame] | 4 | use File::Find; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 5 | use Socket; |
| 6 | |
| 7 | # |
| 8 | # Program: NewNightlyTest.pl |
| 9 | # |
| 10 | # Synopsis: Perform a series of tests which are designed to be run nightly. |
| 11 | # This is used to keep track of the status of the LLVM tree, tracking |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 12 | # regressions and performance changes. Submits this information |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 13 | # to llvm.org where it is placed into the nightlytestresults database. |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 14 | # |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 15 | # Syntax: NightlyTest.pl [OPTIONS] [CVSROOT BUILDDIR WEBDIR] |
| 16 | # where |
| 17 | # OPTIONS may include one or more of the following: |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 18 | # |
Daniel Dunbar | 4628e5e | 2009-10-19 09:18:24 +0000 | [diff] [blame] | 19 | # MAIN OPTIONS: |
| 20 | # -config LLVMPATH If specified, use an existing LLVM build and only run and |
| 21 | # report the test information. The LLVMCONFIG argument should |
| 22 | # be the path to the llvm-config executable in the LLVM build. |
| 23 | # This should be the first argument if given. NOT YET |
| 24 | # IMPLEMENTED. |
| 25 | # -nickname NAME The NAME argument specifieds the nickname this script |
| 26 | # will submit to the nightlytest results repository. |
Patrick Jenkins | 0e9402f | 2006-08-11 23:02:09 +0000 | [diff] [blame] | 27 | # -submit-server Specifies a server to submit the test results too. If this |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 28 | # option is not specified it defaults to |
| 29 | # llvm.org. This is basically just the address of the |
Patrick Jenkins | 0e9402f | 2006-08-11 23:02:09 +0000 | [diff] [blame] | 30 | # webserver |
| 31 | # -submit-script Specifies which script to call on the submit server. If |
| 32 | # this option is not specified it defaults to |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 33 | # /nightlytest/NightlyTestAccept.php. This is basically |
Patrick Jenkins | 0e9402f | 2006-08-11 23:02:09 +0000 | [diff] [blame] | 34 | # everything after the www.yourserver.org. |
Daniel Dunbar | cd3f999 | 2009-05-18 23:24:26 +0000 | [diff] [blame] | 35 | # -submit-aux If specified, an auxiliary script to run in addition to the |
| 36 | # normal submit script. The script will be passed the path to |
| 37 | # the "sentdata.txt" file as its sole argument. |
Tanya Lattner | c161188 | 2008-03-10 07:28:08 +0000 | [diff] [blame] | 38 | # -nosubmit Do not report the test results back to a submit server. |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 39 | # |
Daniel Dunbar | 4628e5e | 2009-10-19 09:18:24 +0000 | [diff] [blame] | 40 | # |
| 41 | # BUILD OPTIONS (not used with -config): |
| 42 | # -nocheckout Do not create, checkout, update, or configure |
| 43 | # the source tree. |
| 44 | # -noremove Do not remove the BUILDDIR after it has been built. |
| 45 | # -noremoveresults Do not remove the WEBDIR after it has been built. |
| 46 | # -nobuild Do not build llvm. If tests are enabled perform them |
| 47 | # on the llvm build specified in the build directory |
| 48 | # -release Build an LLVM Release version |
| 49 | # -release-asserts Build an LLVM ReleaseAsserts version |
| 50 | # -disable-bindings Disable building LLVM bindings. |
Daniel Dunbar | 4628e5e | 2009-10-19 09:18:24 +0000 | [diff] [blame] | 51 | # -with-clang Checkout Clang source into tools/clang. |
| 52 | # -compileflags Next argument specifies extra options passed to make when |
| 53 | # building LLVM. |
| 54 | # -use-gmake Use gmake instead of the default make command to build |
| 55 | # llvm and run tests. |
| 56 | # |
| 57 | # TESTING OPTIONS: |
| 58 | # -notest Do not even attempt to run the test programs. |
| 59 | # -nodejagnu Do not run feature or regression tests |
| 60 | # -enable-llcbeta Enable testing of beta features in llc. |
| 61 | # -enable-lli Enable testing of lli (interpreter) features, default is off |
| 62 | # -disable-pic Disable building with Position Independent Code. |
| 63 | # -disable-llc Disable LLC tests in the nightly tester. |
| 64 | # -disable-jit Disable JIT tests in the nightly tester. |
| 65 | # -disable-cbe Disable C backend tests in the nightly tester. |
| 66 | # -disable-lto Disable link time optimization. |
| 67 | # -test-cflags Next argument specifies that C compilation options that |
| 68 | # override the default when running the testsuite. |
| 69 | # -test-cxxflags Next argument specifies that C++ compilation options that |
| 70 | # override the default when running the testsuite. |
| 71 | # -extraflags Next argument specifies extra options that are passed to |
| 72 | # compile the tests. |
| 73 | # -noexternals Do not run the external tests (for cases where povray |
| 74 | # or SPEC are not installed) |
| 75 | # -with-externals Specify a directory where the external tests are located. |
| 76 | # |
| 77 | # OTHER OPTIONS: |
| 78 | # -parallel Run parallel jobs with GNU Make (see -parallel-jobs). |
| 79 | # -parallel-jobs The number of parallel Make jobs to use (default is two). |
| 80 | # -verbose Turn on some debug output |
Daniel Dunbar | 4628e5e | 2009-10-19 09:18:24 +0000 | [diff] [blame] | 81 | # -nice Checkout/Configure/Build with "nice" to reduce impact |
| 82 | # on busy servers. |
| 83 | # -f2c Next argument specifies path to F2C utility |
| 84 | # -gccpath Path to gcc/g++ used to build LLVM |
| 85 | # -target Specify the target triplet |
| 86 | # -cflags Next argument specifies that C compilation options that |
| 87 | # override the default. |
| 88 | # -cxxflags Next argument specifies that C++ compilation options that |
| 89 | # override the default. |
| 90 | # -ldflags Next argument specifies that linker options that override |
| 91 | # the default. |
| 92 | # |
Daniel Dunbar | 2e10794 | 2009-10-19 09:18:54 +0000 | [diff] [blame] | 93 | # CVSROOT is ignored, it is passed for backwards compatibility. |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 94 | # BUILDDIR is the directory where sources for this test run will be checked out |
| 95 | # AND objects for this test run will be built. This directory MUST NOT |
Daniel Dunbar | 2e10794 | 2009-10-19 09:18:54 +0000 | [diff] [blame] | 96 | # exist before the script is run; it will be created by the svn checkout |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 97 | # process and erased (unless -noremove is specified; see above.) |
| 98 | # WEBDIR is the directory into which the test results web page will be written, |
| 99 | # AND in which the "index.html" is assumed to be a symlink to the most recent |
| 100 | # copy of the results. This directory will be created if it does not exist. |
| 101 | # LLVMGCCDIR is the directory in which the LLVM GCC Front End is installed |
| 102 | # to. This is the same as you would have for a normal LLVM build. |
| 103 | # |
| 104 | ############################################################## |
| 105 | # |
| 106 | # Getting environment variables |
| 107 | # |
| 108 | ############################################################## |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 109 | my $HOME = $ENV{'HOME'}; |
Reid Spencer | 99e865a | 2007-04-07 04:41:16 +0000 | [diff] [blame] | 110 | my $SVNURL = $ENV{"SVNURL"}; |
Duncan Sands | 45db29c | 2009-06-12 13:02:52 +0000 | [diff] [blame] | 111 | $SVNURL = 'http://llvm.org/svn/llvm-project' unless $SVNURL; |
Evan Cheng | 53df0a2 | 2009-06-18 21:39:50 +0000 | [diff] [blame] | 112 | my $TestSVNURL = $ENV{"TestSVNURL"}; |
Evan Cheng | e11c4db | 2009-07-14 06:23:41 +0000 | [diff] [blame] | 113 | $TestSVNURL = 'http://llvm.org/svn/llvm-project' unless $TestSVNURL; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 114 | my $BuildDir = $ENV{'BUILDDIR'}; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 115 | $BuildDir = "$HOME/buildtest" unless $BuildDir; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 116 | my $WebDir = $ENV{'WEBDIR'}; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 117 | $WebDir = "$HOME/cvs/testresults-X86" unless $WebDir; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 118 | |
Daniel Dunbar | 2f90daf | 2009-06-26 01:53:05 +0000 | [diff] [blame] | 119 | my $LLVMSrcDir = $ENV{'LLVMSRCDIR'}; |
| 120 | $LLVMSrcDir = "$BuildDir/llvm" unless $LLVMSrcDir; |
| 121 | my $LLVMObjDir = $ENV{'LLVMOBJDIR'}; |
| 122 | $LLVMObjDir = "$BuildDir/llvm" unless $LLVMObjDir; |
| 123 | my $LLVMTestDir = $ENV{'LLVMTESTDIR'}; |
| 124 | $LLVMTestDir = "$BuildDir/llvm/projects/llvm-test" unless $LLVMTestDir; |
| 125 | |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 126 | ############################################################## |
| 127 | # |
| 128 | # Calculate the date prefix... |
| 129 | # |
| 130 | ############################################################## |
| 131 | @TIME = localtime; |
Daniel Dunbar | 42cdc38 | 2009-07-01 14:52:59 +0000 | [diff] [blame] | 132 | my $DATE = sprintf "%4d-%02d-%02d_%02d-%02d", $TIME[5]+1900, $TIME[4]+1, $TIME[3], $TIME[1], $TIME[0]; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 133 | |
| 134 | ############################################################## |
| 135 | # |
| 136 | # Parse arguments... |
| 137 | # |
| 138 | ############################################################## |
Daniel Dunbar | 4628e5e | 2009-10-19 09:18:24 +0000 | [diff] [blame] | 139 | $CONFIG_PATH=""; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 140 | $CONFIGUREARGS=""; |
Patrick Jenkins | 49717a4 | 2006-07-21 01:39:42 +0000 | [diff] [blame] | 141 | $nickname=""; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 142 | $NOTEST=0; |
Patrick Jenkins | 1cd4691 | 2006-07-27 01:17:17 +0000 | [diff] [blame] | 143 | $MAKECMD="make"; |
Patrick Jenkins | 0e9402f | 2006-08-11 23:02:09 +0000 | [diff] [blame] | 144 | $SUBMITSERVER = "llvm.org"; |
Jim Laskey | 6d8a1b7 | 2006-09-15 17:03:36 +0000 | [diff] [blame] | 145 | $SUBMITSCRIPT = "/nightlytest/NightlyTestAccept.php"; |
Daniel Dunbar | cd3f999 | 2009-05-18 23:24:26 +0000 | [diff] [blame] | 146 | $SUBMITAUX=""; |
Tanya Lattner | c161188 | 2008-03-10 07:28:08 +0000 | [diff] [blame] | 147 | $SUBMIT = 1; |
Daniel Dunbar | 056dbd0 | 2009-05-28 22:45:24 +0000 | [diff] [blame] | 148 | $PARALLELJOBS = "2"; |
Bill Wendling | 49e3182 | 2009-07-16 22:59:17 +0000 | [diff] [blame] | 149 | my $TESTFLAGS=""; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 150 | |
| 151 | while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) { |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 152 | shift; |
| 153 | last if /^--$/; # Stop processing arguments on -- |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 154 | |
| 155 | # List command line options here... |
Daniel Dunbar | 4628e5e | 2009-10-19 09:18:24 +0000 | [diff] [blame] | 156 | if (/^-config$/) { $CONFIG_PATH = "$ARGV[0]"; shift; next; } |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 157 | if (/^-nocheckout$/) { $NOCHECKOUT = 1; next; } |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 158 | if (/^-noremove$/) { $NOREMOVE = 1; next; } |
Daniel Dunbar | 0c39e38 | 2009-07-13 22:17:49 +0000 | [diff] [blame] | 159 | if (/^-noremoveatend$/) { $NOREMOVEATEND = 1; next; } |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 160 | if (/^-noremoveresults$/){ $NOREMOVERESULTS = 1; next; } |
Daniel Dunbar | f5a5950 | 2009-06-02 21:14:15 +0000 | [diff] [blame] | 161 | if (/^-notest$/) { $NOTEST = 1; next; } |
| 162 | if (/^-norunningtests$/) { next; } # Backward compatibility, ignored. |
Daniel Dunbar | 056dbd0 | 2009-05-28 22:45:24 +0000 | [diff] [blame] | 163 | if (/^-parallel-jobs$/) { $PARALLELJOBS = "$ARGV[0]"; shift; next;} |
| 164 | if (/^-parallel$/) { $MAKEOPTS = "$MAKEOPTS -j$PARALLELJOBS -l3.0"; next; } |
Duncan Sands | 45db29c | 2009-06-12 13:02:52 +0000 | [diff] [blame] | 165 | if (/^-with-clang$/) { $WITHCLANG = 1; next; } |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 166 | if (/^-release$/) { $MAKEOPTS = "$MAKEOPTS ENABLE_OPTIMIZED=1 ". |
| 167 | "OPTIMIZE_OPTION=-O2"; $BUILDTYPE="release"; next;} |
Jim Laskey | 27b8ba0 | 2006-09-28 17:49:20 +0000 | [diff] [blame] | 168 | if (/^-release-asserts$/){ $MAKEOPTS = "$MAKEOPTS ENABLE_OPTIMIZED=1 ". |
Dan Gohman | c6e2241 | 2008-10-30 01:08:03 +0000 | [diff] [blame] | 169 | "DISABLE_ASSERTIONS=1 ". |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 170 | "OPTIMIZE_OPTION=-O2"; |
Reid Spencer | 93c456c | 2006-10-19 15:24:04 +0000 | [diff] [blame] | 171 | $BUILDTYPE="release-asserts"; next;} |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 172 | if (/^-enable-llcbeta$/) { $PROGTESTOPTS .= " ENABLE_LLCBETA=1"; next; } |
Duncan Sands | 45db29c | 2009-06-12 13:02:52 +0000 | [diff] [blame] | 173 | if (/^-disable-pic$/) { $CONFIGUREARGS .= " --enable-pic=no"; next; } |
Reid Spencer | 2bae1f5 | 2006-11-24 20:34:16 +0000 | [diff] [blame] | 174 | if (/^-enable-lli$/) { $PROGTESTOPTS .= " ENABLE_LLI=1"; |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 175 | $CONFIGUREARGS .= " --enable-lli"; next; } |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 176 | if (/^-disable-llc$/) { $PROGTESTOPTS .= " DISABLE_LLC=1"; |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 177 | $CONFIGUREARGS .= " --disable-llc_diffs"; next; } |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 178 | if (/^-disable-jit$/) { $PROGTESTOPTS .= " DISABLE_JIT=1"; |
| 179 | $CONFIGUREARGS .= " --disable-jit"; next; } |
Daniel Dunbar | 111def8 | 2009-03-10 19:33:13 +0000 | [diff] [blame] | 180 | if (/^-disable-bindings$/) { $CONFIGUREARGS .= " --disable-bindings"; next; } |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 181 | if (/^-disable-cbe$/) { $PROGTESTOPTS .= " DISABLE_CBE=1"; next; } |
Evan Cheng | e04c90b | 2008-01-12 04:27:18 +0000 | [diff] [blame] | 182 | if (/^-disable-lto$/) { $PROGTESTOPTS .= " DISABLE_LTO=1"; next; } |
Evan Cheng | 3d64f1c | 2008-01-14 17:58:03 +0000 | [diff] [blame] | 183 | if (/^-test-opts$/) { $PROGTESTOPTS .= " $ARGV[0]"; shift; next; } |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 184 | if (/^-verbose$/) { $VERBOSE = 1; next; } |
Daniel Dunbar | 2f90daf | 2009-06-26 01:53:05 +0000 | [diff] [blame] | 185 | if (/^-teelogs$/) { $TEELOGS = 1; next; } |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 186 | if (/^-nice$/) { $NICE = "nice "; next; } |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 187 | if (/^-f2c$/) { $CONFIGUREARGS .= " --with-f2c=$ARGV[0]"; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 188 | shift; next; } |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 189 | if (/^-with-externals$/) { $CONFIGUREARGS .= " --with-externals=$ARGV[0]"; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 190 | shift; next; } |
Daniel Dunbar | ff79ef4 | 2009-07-13 22:31:58 +0000 | [diff] [blame] | 191 | if (/^-configure-args$/) { $CONFIGUREARGS .= " $ARGV[0]"; |
| 192 | shift; next; } |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 193 | if (/^-submit-server/) { $SUBMITSERVER = "$ARGV[0]"; shift; next; } |
| 194 | if (/^-submit-script/) { $SUBMITSCRIPT = "$ARGV[0]"; shift; next; } |
Daniel Dunbar | cd3f999 | 2009-05-18 23:24:26 +0000 | [diff] [blame] | 195 | if (/^-submit-aux/) { $SUBMITAUX = "$ARGV[0]"; shift; next; } |
Tanya Lattner | c161188 | 2008-03-10 07:28:08 +0000 | [diff] [blame] | 196 | if (/^-nosubmit$/) { $SUBMIT = 0; next; } |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 197 | if (/^-nickname$/) { $nickname = "$ARGV[0]"; shift; next; } |
| 198 | if (/^-gccpath/) { $CONFIGUREARGS .= |
| 199 | " CC=$ARGV[0]/gcc CXX=$ARGV[0]/g++"; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 200 | $GCCPATH=$ARGV[0]; shift; next; } |
| 201 | else { $GCCPATH=""; } |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 202 | if (/^-target/) { $CONFIGUREARGS .= " --target=$ARGV[0]"; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 203 | shift; next; } |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 204 | if (/^-cflags/) { $MAKEOPTS = "$MAKEOPTS C.Flags=\'$ARGV[0]\'"; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 205 | shift; next; } |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 206 | if (/^-cxxflags/) { $MAKEOPTS = "$MAKEOPTS CXX.Flags=\'$ARGV[0]\'"; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 207 | shift; next; } |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 208 | if (/^-ldflags/) { $MAKEOPTS = "$MAKEOPTS LD.Flags=\'$ARGV[0]\'"; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 209 | shift; next; } |
Bill Wendling | 49e3182 | 2009-07-16 22:59:17 +0000 | [diff] [blame] | 210 | if (/^-test-cflags/) { $TESTFLAGS = "$TESTFLAGS CFLAGS=\'$ARGV[0]\'"; |
| 211 | shift; next; } |
| 212 | if (/^-test-cxxflags/) { $TESTFLAGS = "$TESTFLAGS CXXFLAGS=\'$ARGV[0]\'"; |
| 213 | shift; next; } |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 214 | if (/^-compileflags/) { $MAKEOPTS = "$MAKEOPTS $ARGV[0]"; shift; next; } |
| 215 | if (/^-use-gmake/) { $MAKECMD = "gmake"; shift; next; } |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 216 | if (/^-extraflags/) { $CONFIGUREARGS .= |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 217 | " --with-extra-options=\'$ARGV[0]\'"; shift; next;} |
| 218 | if (/^-noexternals$/) { $NOEXTERNALS = 1; next; } |
| 219 | if (/^-nodejagnu$/) { $NODEJAGNU = 1; next; } |
| 220 | if (/^-nobuild$/) { $NOBUILD = 1; next; } |
| 221 | print "Unknown option: $_ : ignoring!\n"; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 222 | } |
| 223 | |
Daniel Dunbar | 4628e5e | 2009-10-19 09:18:24 +0000 | [diff] [blame] | 224 | if (!($CONFIG_PATH eq "")) { |
| 225 | die "error: -config mode is not yet implemented,"; |
| 226 | } |
| 227 | |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 228 | if ($ENV{'LLVMGCCDIR'}) { |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 229 | $CONFIGUREARGS .= " --with-llvmgccdir=" . $ENV{'LLVMGCCDIR'}; |
Bob Wilson | 85cdfad | 2009-03-12 19:47:24 +0000 | [diff] [blame] | 230 | $LLVMGCCPATH = $ENV{'LLVMGCCDIR'} . '/bin'; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 231 | } |
Tanya Lattner | 849c9a2 | 2007-04-13 04:36:48 +0000 | [diff] [blame] | 232 | else { |
| 233 | $LLVMGCCPATH = ""; |
| 234 | } |
| 235 | |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 236 | if ($CONFIGUREARGS !~ /--disable-jit/) { |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 237 | $CONFIGUREARGS .= " --enable-jit"; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 238 | } |
| 239 | |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 240 | if (@ARGV != 0 and @ARGV != 3 and $VERBOSE) { |
| 241 | foreach $x (@ARGV) { |
| 242 | print "$x\n"; |
| 243 | } |
| 244 | print "Must specify 0 or 3 options!"; |
Patrick Jenkins | f58473f | 2006-07-27 01:03:46 +0000 | [diff] [blame] | 245 | } |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 246 | |
| 247 | if (@ARGV == 3) { |
Daniel Dunbar | 2e10794 | 2009-10-19 09:18:54 +0000 | [diff] [blame] | 248 | # ARGV[0] used to be the CVS root, ignored for backward compatibility. |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 249 | $BuildDir = $ARGV[1]; |
| 250 | $WebDir = $ARGV[2]; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 251 | } |
| 252 | |
Daniel Dunbar | 2e10794 | 2009-10-19 09:18:54 +0000 | [diff] [blame] | 253 | if ($BuildDir eq "" or |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 254 | $WebDir eq "") { |
Daniel Dunbar | 2e10794 | 2009-10-19 09:18:54 +0000 | [diff] [blame] | 255 | die("please specify a build directory, and a web directory"); |
Patrick Jenkins | f58473f | 2006-07-27 01:03:46 +0000 | [diff] [blame] | 256 | } |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 257 | |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 258 | if ($nickname eq "") { |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 259 | die ("Please invoke NewNightlyTest.pl with command line option " . |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 260 | "\"-nickname <nickname>\""); |
Patrick Jenkins | 514e258 | 2006-07-20 22:28:43 +0000 | [diff] [blame] | 261 | } |
Patrick Jenkins | 1cd4691 | 2006-07-27 01:17:17 +0000 | [diff] [blame] | 262 | |
Jim Laskey | 27b8ba0 | 2006-09-28 17:49:20 +0000 | [diff] [blame] | 263 | if ($BUILDTYPE ne "release" && $BUILDTYPE ne "release-asserts") { |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 264 | $BUILDTYPE = "debug"; |
Patrick Jenkins | 26ba609 | 2006-07-23 22:57:28 +0000 | [diff] [blame] | 265 | } |
Patrick Jenkins | 514e258 | 2006-07-20 22:28:43 +0000 | [diff] [blame] | 266 | |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 267 | ############################################################## |
| 268 | # |
Daniel Dunbar | 4628e5e | 2009-10-19 09:18:24 +0000 | [diff] [blame] | 269 | # Define the file names we'll use |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 270 | # |
| 271 | ############################################################## |
| 272 | my $Prefix = "$WebDir/$DATE"; |
| 273 | my $BuildLog = "$Prefix-Build-Log.txt"; |
Reid Spencer | 99e865a | 2007-04-07 04:41:16 +0000 | [diff] [blame] | 274 | my $COLog = "$Prefix-CVS-Log.txt"; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 275 | my $SingleSourceLog = "$Prefix-SingleSource-ProgramTest.txt.gz"; |
| 276 | my $MultiSourceLog = "$Prefix-MultiSource-ProgramTest.txt.gz"; |
Patrick Jenkins | 26ba609 | 2006-07-23 22:57:28 +0000 | [diff] [blame] | 277 | my $ExternalLog = "$Prefix-External-ProgramTest.txt.gz"; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 278 | my $DejagnuLog = "$Prefix-Dejagnu-testrun.log"; |
| 279 | my $DejagnuSum = "$Prefix-Dejagnu-testrun.sum"; |
| 280 | my $DejagnuTestsLog = "$Prefix-DejagnuTests-Log.txt"; |
| 281 | if (! -d $WebDir) { |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 282 | mkdir $WebDir, 0777; |
Patrick Jenkins | 0313775 | 2006-08-21 20:45:57 +0000 | [diff] [blame] | 283 | if($VERBOSE){ |
| 284 | warn "$WebDir did not exist; creating it.\n"; |
| 285 | } |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 286 | } |
| 287 | |
| 288 | if ($VERBOSE) { |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 289 | print "INITIALIZED\n"; |
Daniel Dunbar | ad83e7f | 2009-10-19 09:18:46 +0000 | [diff] [blame] | 290 | print "SVN URL = $SVNURL\n"; |
Reid Spencer | 99e865a | 2007-04-07 04:41:16 +0000 | [diff] [blame] | 291 | print "COLog = $COLog\n"; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 292 | print "BuildDir = $BuildDir\n"; |
| 293 | print "WebDir = $WebDir\n"; |
| 294 | print "Prefix = $Prefix\n"; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 295 | print "BuildLog = $BuildLog\n"; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 296 | } |
| 297 | |
| 298 | ############################################################## |
| 299 | # |
| 300 | # Helper functions |
| 301 | # |
| 302 | ############################################################## |
Daniel Dunbar | 4628e5e | 2009-10-19 09:18:24 +0000 | [diff] [blame] | 303 | |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 304 | sub GetDir { |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 305 | my $Suffix = shift; |
| 306 | opendir DH, $WebDir; |
| 307 | my @Result = reverse sort grep !/$DATE/, grep /[-0-9]+$Suffix/, readdir DH; |
| 308 | closedir DH; |
| 309 | return @Result; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 310 | } |
| 311 | |
Daniel Dunbar | 2f90daf | 2009-06-26 01:53:05 +0000 | [diff] [blame] | 312 | sub RunLoggedCommand { |
| 313 | my $Command = shift; |
| 314 | my $Log = shift; |
Daniel Dunbar | fc0fc3a | 2009-06-26 02:30:49 +0000 | [diff] [blame] | 315 | my $Title = shift; |
Daniel Dunbar | 2f90daf | 2009-06-26 01:53:05 +0000 | [diff] [blame] | 316 | if ($TEELOGS) { |
Daniel Dunbar | fc0fc3a | 2009-06-26 02:30:49 +0000 | [diff] [blame] | 317 | if ($VERBOSE) { |
| 318 | print "$Title\n"; |
| 319 | print "$Command 2>&1 | tee $Log\n"; |
| 320 | } |
Daniel Dunbar | 2f90daf | 2009-06-26 01:53:05 +0000 | [diff] [blame] | 321 | system "$Command 2>&1 | tee $Log"; |
| 322 | } else { |
Daniel Dunbar | fc0fc3a | 2009-06-26 02:30:49 +0000 | [diff] [blame] | 323 | if ($VERBOSE) { |
| 324 | print "$Title\n"; |
| 325 | print "$Command 2>&1 > $Log\n"; |
| 326 | } |
Daniel Dunbar | 2f90daf | 2009-06-26 01:53:05 +0000 | [diff] [blame] | 327 | system "$Command 2>&1 > $Log"; |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | sub RunAppendingLoggedCommand { |
| 332 | my $Command = shift; |
| 333 | my $Log = shift; |
Daniel Dunbar | fc0fc3a | 2009-06-26 02:30:49 +0000 | [diff] [blame] | 334 | my $Title = shift; |
Daniel Dunbar | 2f90daf | 2009-06-26 01:53:05 +0000 | [diff] [blame] | 335 | if ($TEELOGS) { |
Daniel Dunbar | fc0fc3a | 2009-06-26 02:30:49 +0000 | [diff] [blame] | 336 | if ($VERBOSE) { |
| 337 | print "$Title\n"; |
| 338 | print "$Command 2>&1 | tee -a $Log\n"; |
| 339 | } |
Daniel Dunbar | 2f90daf | 2009-06-26 01:53:05 +0000 | [diff] [blame] | 340 | system "$Command 2>&1 | tee -a $Log"; |
| 341 | } else { |
Daniel Dunbar | fc0fc3a | 2009-06-26 02:30:49 +0000 | [diff] [blame] | 342 | if ($VERBOSE) { |
| 343 | print "$Title\n"; |
| 344 | print "$Command 2>&1 > $Log\n"; |
| 345 | } |
| 346 | system "$Command 2>&1 >> $Log"; |
Daniel Dunbar | 2f90daf | 2009-06-26 01:53:05 +0000 | [diff] [blame] | 347 | } |
| 348 | } |
| 349 | |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 350 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 351 | # |
| 352 | # DiffFiles - Diff the current version of the file against the last version of |
| 353 | # the file, reporting things added and removed. This is used to report, for |
| 354 | # example, added and removed warnings. This returns a pair (added, removed) |
| 355 | # |
| 356 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 357 | sub DiffFiles { |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 358 | my $Suffix = shift; |
| 359 | my @Others = GetDir $Suffix; |
| 360 | if (@Others == 0) { # No other files? We added all entries... |
| 361 | return (`cat $WebDir/$DATE$Suffix`, ""); |
| 362 | } |
| 363 | # Diff the files now... |
| 364 | my @Diffs = split "\n", `diff $WebDir/$DATE$Suffix $WebDir/$Others[0]`; |
| 365 | my $Added = join "\n", grep /^</, @Diffs; |
| 366 | my $Removed = join "\n", grep /^>/, @Diffs; |
| 367 | $Added =~ s/^< //gm; |
| 368 | $Removed =~ s/^> //gm; |
| 369 | return ($Added, $Removed); |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 370 | } |
| 371 | |
| 372 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 373 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 374 | sub GetRegex { # (Regex with ()'s, value) |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 375 | $_[1] =~ /$_[0]/m; |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 376 | return $1 |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 377 | if (defined($1)); |
| 378 | return "0"; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 379 | } |
| 380 | |
| 381 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 382 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 383 | sub GetRegexNum { |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 384 | my ($Regex, $Num, $Regex2, $File) = @_; |
| 385 | my @Items = split "\n", `grep '$Regex' $File`; |
| 386 | return GetRegex $Regex2, $Items[$Num]; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 387 | } |
| 388 | |
| 389 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 390 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 391 | sub ChangeDir { # directory, logical name |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 392 | my ($dir,$name) = @_; |
| 393 | chomp($dir); |
| 394 | if ( $VERBOSE ) { print "Changing To: $name ($dir)\n"; } |
| 395 | $result = chdir($dir); |
| 396 | if (!$result) { |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 397 | print "ERROR!!! Cannot change directory to: $name ($dir) because $!"; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 398 | return false; |
| 399 | } |
| 400 | return true; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 401 | } |
| 402 | |
| 403 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 404 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 405 | sub ReadFile { |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 406 | if (open (FILE, $_[0])) { |
| 407 | undef $/; |
| 408 | my $Ret = <FILE>; |
| 409 | close FILE; |
| 410 | $/ = '\n'; |
| 411 | return $Ret; |
| 412 | } else { |
| 413 | print "Could not open file '$_[0]' for reading!\n"; |
| 414 | return ""; |
| 415 | } |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 416 | } |
| 417 | |
| 418 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 419 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 420 | sub WriteFile { # (filename, contents) |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 421 | open (FILE, ">$_[0]") or die "Could not open file '$_[0]' for writing!\n"; |
| 422 | print FILE $_[1]; |
| 423 | close FILE; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 424 | } |
| 425 | |
| 426 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 427 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 428 | sub CopyFile { #filename, newfile |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 429 | my ($file, $newfile) = @_; |
| 430 | chomp($file); |
| 431 | if ($VERBOSE) { print "Copying $file to $newfile\n"; } |
| 432 | copy($file, $newfile); |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 433 | } |
| 434 | |
| 435 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 436 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 437 | sub AddRecord { |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 438 | my ($Val, $Filename,$WebDir) = @_; |
| 439 | my @Records; |
| 440 | if (open FILE, "$WebDir/$Filename") { |
| 441 | @Records = grep !/$DATE/, split "\n", <FILE>; |
| 442 | close FILE; |
| 443 | } |
| 444 | push @Records, "$DATE: $Val"; |
| 445 | WriteFile "$WebDir/$Filename", (join "\n", @Records) . "\n"; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 446 | } |
| 447 | |
| 448 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 449 | # |
| 450 | # FormatTime - Convert a time from 1m23.45 into 83.45 |
| 451 | # |
| 452 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 453 | sub FormatTime { |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 454 | my $Time = shift; |
| 455 | if ($Time =~ m/([0-9]+)m([0-9.]+)/) { |
| 456 | $Time = sprintf("%7.4f", $1*60.0+$2); |
| 457 | } |
| 458 | return $Time; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 459 | } |
| 460 | |
| 461 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Patrick Jenkins | b9c65eb | 2006-08-18 18:00:21 +0000 | [diff] [blame] | 462 | # |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 463 | # This function is meant to read in the dejagnu sum file and |
Patrick Jenkins | b9c65eb | 2006-08-18 18:00:21 +0000 | [diff] [blame] | 464 | # return a string with only the results (i.e. PASS/FAIL/XPASS/ |
| 465 | # XFAIL). |
| 466 | # |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 467 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 468 | sub GetDejagnuTestResults { # (filename, log) |
Patrick Jenkins | b9c65eb | 2006-08-18 18:00:21 +0000 | [diff] [blame] | 469 | my ($filename, $DejagnuLog) = @_; |
| 470 | my @lines; |
| 471 | $/ = "\n"; #Make sure we're going line at a time. |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 472 | |
Patrick Jenkins | b9c65eb | 2006-08-18 18:00:21 +0000 | [diff] [blame] | 473 | if( $VERBOSE) { print "DEJAGNU TEST RESULTS:\n"; } |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 474 | |
Patrick Jenkins | b9c65eb | 2006-08-18 18:00:21 +0000 | [diff] [blame] | 475 | if (open SRCHFILE, $filename) { |
| 476 | # Process test results |
| 477 | while ( <SRCHFILE> ) { |
| 478 | if ( length($_) > 1 ) { |
| 479 | chomp($_); |
Jim Laskey | 01d7bcf | 2006-09-20 09:20:22 +0000 | [diff] [blame] | 480 | if ( m/^(PASS|XPASS|FAIL|XFAIL): .*\/llvm\/test\/(.*)$/ ) { |
| 481 | push(@lines, "$1: test/$2"); |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 482 | } |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 483 | } |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 484 | } |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 485 | } |
Patrick Jenkins | b9c65eb | 2006-08-18 18:00:21 +0000 | [diff] [blame] | 486 | close SRCHFILE; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 487 | |
Patrick Jenkins | b9c65eb | 2006-08-18 18:00:21 +0000 | [diff] [blame] | 488 | my $content = join("\n", @lines); |
| 489 | return $content; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 490 | } |
| 491 | |
| 492 | |
Patrick Jenkins | b9c65eb | 2006-08-18 18:00:21 +0000 | [diff] [blame] | 493 | |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 494 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 495 | # |
| 496 | # This function acts as a mini web browswer submitting data |
| 497 | # to our central server via the post method |
| 498 | # |
| 499 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Daniel Dunbar | 4628e5e | 2009-10-19 09:18:24 +0000 | [diff] [blame] | 500 | sub SendData { |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 501 | $host = $_[0]; |
| 502 | $file = $_[1]; |
Daniel Dunbar | 4628e5e | 2009-10-19 09:18:24 +0000 | [diff] [blame] | 503 | $variables = $_[2]; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 504 | |
Daniel Dunbar | 94a37a4 | 2009-05-28 18:31:40 +0000 | [diff] [blame] | 505 | # Write out the "...-sentdata.txt" file. |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 506 | |
Daniel Dunbar | 94a37a4 | 2009-05-28 18:31:40 +0000 | [diff] [blame] | 507 | my $sentdata=""; |
| 508 | foreach $x (keys (%$variables)){ |
| 509 | $value = $variables->{$x}; |
| 510 | $sentdata.= "$x => $value\n"; |
| 511 | } |
| 512 | WriteFile "$Prefix-sentdata.txt", $sentdata; |
| 513 | |
| 514 | if (!($SUBMITAUX eq "")) { |
Daniel Dunbar | f7f02a9 | 2009-06-26 22:33:28 +0000 | [diff] [blame] | 515 | system "$SUBMITAUX \"$Prefix-sentdata.txt\""; |
| 516 | } |
| 517 | |
Daniel Dunbar | 4628e5e | 2009-10-19 09:18:24 +0000 | [diff] [blame] | 518 | if (!$SUBMIT) { |
Daniel Dunbar | f7f02a9 | 2009-06-26 22:33:28 +0000 | [diff] [blame] | 519 | return "Skipped standard submit.\n"; |
Daniel Dunbar | 94a37a4 | 2009-05-28 18:31:40 +0000 | [diff] [blame] | 520 | } |
| 521 | |
| 522 | # Create the content to send to the server. |
| 523 | |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 524 | my $content; |
| 525 | foreach $key (keys (%$variables)){ |
| 526 | $value = $variables->{$key}; |
| 527 | $value =~ s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg; |
| 528 | $content .= "$key=$value&"; |
| 529 | } |
| 530 | |
Daniel Dunbar | 94a37a4 | 2009-05-28 18:31:40 +0000 | [diff] [blame] | 531 | # Send the data to the server. |
Daniel Dunbar | 4628e5e | 2009-10-19 09:18:24 +0000 | [diff] [blame] | 532 | # |
Daniel Dunbar | 94a37a4 | 2009-05-28 18:31:40 +0000 | [diff] [blame] | 533 | # FIXME: This code should be more robust? |
Daniel Dunbar | 4628e5e | 2009-10-19 09:18:24 +0000 | [diff] [blame] | 534 | |
Daniel Dunbar | 94a37a4 | 2009-05-28 18:31:40 +0000 | [diff] [blame] | 535 | $port=80; |
| 536 | $socketaddr= sockaddr_in $port, inet_aton $host or die "Bad hostname\n"; |
| 537 | socket SOCK, PF_INET, SOCK_STREAM, getprotobyname('tcp') or |
| 538 | die "Bad socket\n"; |
| 539 | connect SOCK, $socketaddr or die "Bad connection\n"; |
| 540 | select((select(SOCK), $| = 1)[0]); |
| 541 | |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 542 | $length = length($content); |
| 543 | |
| 544 | my $send= "POST $file HTTP/1.0\n"; |
Lauro Ramos Venancio | 4604023 | 2007-05-03 14:05:07 +0000 | [diff] [blame] | 545 | $send.= "Host: $host\n"; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 546 | $send.= "Content-Type: application/x-www-form-urlencoded\n"; |
| 547 | $send.= "Content-length: $length\n\n"; |
| 548 | $send.= "$content"; |
| 549 | |
Patrick Jenkins | e8501eb | 2006-08-07 01:54:37 +0000 | [diff] [blame] | 550 | print SOCK $send; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 551 | my $result; |
| 552 | while(<SOCK>){ |
| 553 | $result .= $_; |
| 554 | } |
| 555 | close(SOCK); |
| 556 | |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 557 | return $result; |
| 558 | } |
| 559 | |
Patrick Jenkins | 215b48f | 2006-07-07 18:50:51 +0000 | [diff] [blame] | 560 | ############################################################## |
| 561 | # |
| 562 | # Getting Start timestamp |
| 563 | # |
| 564 | ############################################################## |
Patrick Jenkins | b67e118 | 2006-07-21 21:43:09 +0000 | [diff] [blame] | 565 | $starttime = `date "+20%y-%m-%d %H:%M:%S"`; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 566 | |
| 567 | ############################################################## |
| 568 | # |
Daniel Dunbar | 2e10794 | 2009-10-19 09:18:54 +0000 | [diff] [blame] | 569 | # Create the source repository directory |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 570 | # |
| 571 | ############################################################## |
| 572 | if (!$NOCHECKOUT) { |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 573 | if (-d $BuildDir) { |
| 574 | if (!$NOREMOVE) { |
| 575 | if ( $VERBOSE ) { |
| 576 | print "Build directory exists! Removing it\n"; |
| 577 | } |
| 578 | system "rm -rf $BuildDir"; |
Reid Spencer | 99e865a | 2007-04-07 04:41:16 +0000 | [diff] [blame] | 579 | mkdir $BuildDir or die "Could not create checkout directory $BuildDir!"; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 580 | } else { |
Jim Laskey | 6d8a1b7 | 2006-09-15 17:03:36 +0000 | [diff] [blame] | 581 | if ( $VERBOSE ) { |
| 582 | print "Build directory exists!\n"; |
| 583 | } |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 584 | } |
Jim Laskey | 6d8a1b7 | 2006-09-15 17:03:36 +0000 | [diff] [blame] | 585 | } else { |
Reid Spencer | 99e865a | 2007-04-07 04:41:16 +0000 | [diff] [blame] | 586 | mkdir $BuildDir or die "Could not create checkout directory $BuildDir!"; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 587 | } |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 588 | } |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 589 | |
| 590 | |
| 591 | ############################################################## |
| 592 | # |
Daniel Dunbar | 2e10794 | 2009-10-19 09:18:54 +0000 | [diff] [blame] | 593 | # Check out the llvm tree with SVN |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 594 | # |
| 595 | ############################################################## |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 596 | if (!$NOCHECKOUT) { |
Daniel Dunbar | 2f90daf | 2009-06-26 01:53:05 +0000 | [diff] [blame] | 597 | ChangeDir( $BuildDir, "checkout directory" ); |
Daniel Dunbar | ad83e7f | 2009-10-19 09:18:46 +0000 | [diff] [blame] | 598 | my $SVNCMD = "$NICE svn co --non-interactive $SVNURL"; |
| 599 | my $SVNCMD2 = "$NICE svn co --non-interactive $TestSVNURL"; |
| 600 | RunLoggedCommand("( time -p $SVNCMD/llvm/trunk llvm; cd llvm/projects ; " . |
| 601 | "$SVNCMD2/test-suite/trunk llvm-test )", $COLog, |
| 602 | "CHECKOUT LLVM"); |
| 603 | if ($WITHCLANG) { |
| 604 | my $SVNCMD = "$NICE svn co --non-interactive $SVNURL/cfe/trunk"; |
| 605 | RunLoggedCommand("( time -p cd llvm/tools ; $SVNCMD clang )", $COLog, |
| 606 | "CHECKOUT CLANG"); |
Reid Spencer | 99e865a | 2007-04-07 04:41:16 +0000 | [diff] [blame] | 607 | } |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 608 | } |
Daniel Dunbar | 2f90daf | 2009-06-26 01:53:05 +0000 | [diff] [blame] | 609 | ChangeDir( $LLVMSrcDir , "llvm source directory") ; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 610 | |
| 611 | ############################################################## |
| 612 | # |
Daniel Dunbar | 2e10794 | 2009-10-19 09:18:54 +0000 | [diff] [blame] | 613 | # Get some static statistics about the current source code |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 614 | # |
| 615 | # This can probably be put on the server side |
| 616 | # |
| 617 | ############################################################## |
Reid Spencer | 99e865a | 2007-04-07 04:41:16 +0000 | [diff] [blame] | 618 | my $CheckoutTime_Wall = GetRegex "([0-9.]+)", `grep '^real' $COLog`; |
| 619 | my $CheckoutTime_User = GetRegex "([0-9.]+)", `grep '^user' $COLog`; |
| 620 | my $CheckoutTime_Sys = GetRegex "([0-9.]+)", `grep '^sys' $COLog`; |
| 621 | my $CheckoutTime_CPU = $CVSCheckoutTime_User + $CVSCheckoutTime_Sys; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 622 | |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 623 | ############################################################## |
| 624 | # |
| 625 | # Build the entire tree, saving build messages to the build log |
| 626 | # |
| 627 | ############################################################## |
| 628 | if (!$NOCHECKOUT && !$NOBUILD) { |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 629 | my $EXTRAFLAGS = "--enable-spec --with-objroot=."; |
Daniel Dunbar | 2f90daf | 2009-06-26 01:53:05 +0000 | [diff] [blame] | 630 | RunLoggedCommand("(time -p $NICE ./configure $CONFIGUREARGS $EXTRAFLAGS) ", |
Daniel Dunbar | fc0fc3a | 2009-06-26 02:30:49 +0000 | [diff] [blame] | 631 | $BuildLog, "CONFIGURE"); |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 632 | # Build the entire tree, capturing the output into $BuildLog |
Daniel Dunbar | fc0fc3a | 2009-06-26 02:30:49 +0000 | [diff] [blame] | 633 | RunAppendingLoggedCommand("(time -p $NICE $MAKECMD clean)", $BuildLog, "BUILD CLEAN"); |
| 634 | RunAppendingLoggedCommand("(time -p $NICE $MAKECMD $MAKEOPTS)", $BuildLog, "BUILD"); |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 635 | } |
| 636 | |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 637 | ############################################################## |
| 638 | # |
| 639 | # Get some statistics about the build... |
| 640 | # |
| 641 | ############################################################## |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 642 | |
| 643 | # Get the time taken by the configure script |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 644 | my $ConfigTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$BuildLog"; |
| 645 | my $ConfigTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$BuildLog"; |
| 646 | my $ConfigTime = $ConfigTimeU+$ConfigTimeS; # ConfigTime = User+System |
| 647 | my $ConfigWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$BuildLog"; |
| 648 | |
| 649 | $ConfigTime=-1 unless $ConfigTime; |
| 650 | $ConfigWallTime=-1 unless $ConfigWallTime; |
| 651 | |
| 652 | my $BuildTimeU = GetRegexNum "^user", 1, "([0-9.]+)", "$BuildLog"; |
| 653 | my $BuildTimeS = GetRegexNum "^sys", 1, "([0-9.]+)", "$BuildLog"; |
| 654 | my $BuildTime = $BuildTimeU+$BuildTimeS; # BuildTime = User+System |
| 655 | my $BuildWallTime = GetRegexNum "^real", 1, "([0-9.]+)","$BuildLog"; |
| 656 | |
| 657 | $BuildTime=-1 unless $BuildTime; |
| 658 | $BuildWallTime=-1 unless $BuildWallTime; |
| 659 | |
| 660 | my $BuildError = 0, $BuildStatus = "OK"; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 661 | if ($NOBUILD) { |
| 662 | $BuildStatus = "Skipped by user"; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 663 | } |
Patrick Jenkins | f58473f | 2006-07-27 01:03:46 +0000 | [diff] [blame] | 664 | elsif (`grep '^$MAKECMD\[^:]*: .*Error' $BuildLog | wc -l` + 0 || |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 665 | `grep '^$MAKECMD: \*\*\*.*Stop.' $BuildLog | wc -l`+0) { |
| 666 | $BuildStatus = "Error: compilation aborted"; |
| 667 | $BuildError = 1; |
| 668 | if( $VERBOSE) { print "\n***ERROR BUILDING TREE\n\n"; } |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 669 | } |
| 670 | if ($BuildError) { $NODEJAGNU=1; } |
| 671 | |
Patrick Jenkins | 169357e | 2006-07-23 21:38:07 +0000 | [diff] [blame] | 672 | my $a_file_sizes=""; |
| 673 | my $o_file_sizes=""; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 674 | if (!$BuildError) { |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 675 | print "Organizing size of .o and .a files\n" |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 676 | if ( $VERBOSE ); |
Daniel Dunbar | 2f90daf | 2009-06-26 01:53:05 +0000 | [diff] [blame] | 677 | ChangeDir( "$LLVMObjDir", "Build Directory" ); |
Bob Wilson | 6dc11b4 | 2009-06-19 17:19:38 +0000 | [diff] [blame] | 678 | |
| 679 | my @dirs = ('utils', 'lib', 'tools'); |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 680 | if($BUILDTYPE eq "release"){ |
Bob Wilson | 6dc11b4 | 2009-06-19 17:19:38 +0000 | [diff] [blame] | 681 | push @dirs, 'Release'; |
Jim Laskey | 27b8ba0 | 2006-09-28 17:49:20 +0000 | [diff] [blame] | 682 | } elsif($BUILDTYPE eq "release-asserts") { |
Bob Wilson | 6dc11b4 | 2009-06-19 17:19:38 +0000 | [diff] [blame] | 683 | push @dirs, 'Release-Asserts'; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 684 | } else { |
Bob Wilson | 6dc11b4 | 2009-06-19 17:19:38 +0000 | [diff] [blame] | 685 | push @dirs, 'Debug'; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 686 | } |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 687 | |
Bob Wilson | 6dc11b4 | 2009-06-19 17:19:38 +0000 | [diff] [blame] | 688 | find(sub { |
| 689 | $a_file_sizes .= (-s $_)." $File::Find::name $BUILDTYPE\n" if /\.a$/i; |
| 690 | $o_file_sizes .= (-s $_)." $File::Find::name $BUILDTYPE\n" if /\.o$/i; |
| 691 | }, @dirs); |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 692 | } else { |
| 693 | $a_file_sizes="No data due to a bad build."; |
| 694 | $o_file_sizes="No data due to a bad build."; |
Patrick Jenkins | 169357e | 2006-07-23 21:38:07 +0000 | [diff] [blame] | 695 | } |
Patrick Jenkins | 169357e | 2006-07-23 21:38:07 +0000 | [diff] [blame] | 696 | |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 697 | ############################################################## |
| 698 | # |
| 699 | # Running dejagnu tests |
| 700 | # |
| 701 | ############################################################## |
Patrick Jenkins | b9c65eb | 2006-08-18 18:00:21 +0000 | [diff] [blame] | 702 | my $DejangnuTestResults=""; # String containing the results of the dejagnu |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 703 | my $dejagnu_output = "$DejagnuTestsLog"; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 704 | if (!$NODEJAGNU) { |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 705 | #Run the feature and regression tests, results are put into testrun.sum |
| 706 | #Full log in testrun.log |
Daniel Dunbar | fc0fc3a | 2009-06-26 02:30:49 +0000 | [diff] [blame] | 707 | RunLoggedCommand("(time -p $MAKECMD $MAKEOPTS check)", $dejagnu_output, "DEJAGNU"); |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 708 | |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 709 | #Copy the testrun.log and testrun.sum to our webdir |
| 710 | CopyFile("test/testrun.log", $DejagnuLog); |
| 711 | CopyFile("test/testrun.sum", $DejagnuSum); |
| 712 | #can be done on server |
| 713 | $DejagnuTestResults = GetDejagnuTestResults($DejagnuSum, $DejagnuLog); |
| 714 | $unexpfail_tests = $DejagnuTestResults; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 715 | } |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 716 | |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 717 | #Extract time of dejagnu tests |
| 718 | my $DejagnuTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$dejagnu_output"; |
| 719 | my $DejagnuTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$dejagnu_output"; |
| 720 | $DejagnuTime = $DejagnuTimeU+$DejagnuTimeS; # DejagnuTime = User+System |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 721 | $DejagnuWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$dejagnu_output"; |
| 722 | $DejagnuTestResults = |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 723 | "Dejagnu skipped by user choice." unless $DejagnuTestResults; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 724 | $DejagnuTime = "0.0" unless $DejagnuTime; |
| 725 | $DejagnuWallTime = "0.0" unless $DejagnuWallTime; |
| 726 | |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 727 | ############################################################## |
| 728 | # |
| 729 | # Get warnings from the build |
| 730 | # |
| 731 | ############################################################## |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 732 | if (!$NODEJAGNU) { |
| 733 | if ( $VERBOSE ) { print "BUILD INFORMATION COLLECTION STAGE\n"; } |
| 734 | my @Warn = split "\n", `egrep 'warning:|Entering dir' $BuildLog`; |
| 735 | my @Warnings; |
| 736 | my $CurDir = ""; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 737 | |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 738 | foreach $Warning (@Warn) { |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 739 | if ($Warning =~ m/Entering directory \`([^\`]+)\'/) { |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 740 | $CurDir = $1; # Keep track of directory warning is in... |
| 741 | # Remove buildir prefix if included |
Daniel Dunbar | 2f90daf | 2009-06-26 01:53:05 +0000 | [diff] [blame] | 742 | if ($CurDir =~ m#$LLVMSrcDir/(.*)#) { $CurDir = $1; } |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 743 | } else { |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 744 | push @Warnings, "$CurDir/$Warning"; # Add directory to warning... |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 745 | } |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 746 | } |
| 747 | my $WarningsFile = join "\n", @Warnings; |
| 748 | $WarningsFile =~ s/:[0-9]+:/::/g; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 749 | |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 750 | # Emit the warnings file, so we can diff... |
| 751 | WriteFile "$WebDir/$DATE-Warnings.txt", $WarningsFile . "\n"; |
| 752 | my ($WarningsAdded, $WarningsRemoved) = DiffFiles "-Warnings.txt"; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 753 | |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 754 | # Output something to stdout if something has changed |
| 755 | #print "ADDED WARNINGS:\n$WarningsAdded\n\n" if (length $WarningsAdded); |
| 756 | #print "REMOVED WARNINGS:\n$WarningsRemoved\n\n" if (length $WarningsRemoved); |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 757 | |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 758 | #my @TmpWarningsAdded = split "\n", $WarningsAdded; ~PJ on upgrade |
| 759 | #my @TmpWarningsRemoved = split "\n", $WarningsRemoved; ~PJ on upgrade |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 760 | |
| 761 | } #endif !NODEGAGNU |
| 762 | |
| 763 | ############################################################## |
| 764 | # |
| 765 | # If we built the tree successfully, run the nightly programs tests... |
| 766 | # |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 767 | # A set of tests to run is passed in (i.e. "SingleSource" "MultiSource" |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 768 | # "External") |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 769 | # |
| 770 | ############################################################## |
Daniel Dunbar | 2f90daf | 2009-06-26 01:53:05 +0000 | [diff] [blame] | 771 | |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 772 | sub TestDirectory { |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 773 | my $SubDir = shift; |
Daniel Dunbar | 2f90daf | 2009-06-26 01:53:05 +0000 | [diff] [blame] | 774 | ChangeDir( "$LLVMTestDir/$SubDir", |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 775 | "Programs Test Subdirectory" ) || return ("", ""); |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 776 | |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 777 | my $ProgramTestLog = "$Prefix-$SubDir-ProgramTest.txt"; |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 778 | |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 779 | # Run the programs tests... creating a report.nightly.csv file |
| 780 | if (!$NOTEST) { |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 781 | if( $VERBOSE) { |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 782 | print "$MAKECMD -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv ". |
Bill Wendling | 49e3182 | 2009-07-16 22:59:17 +0000 | [diff] [blame] | 783 | "$TESTFLAGS TEST=nightly > $ProgramTestLog 2>&1\n"; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 784 | } |
Daniel Dunbar | 2f90daf | 2009-06-26 01:53:05 +0000 | [diff] [blame] | 785 | RunLoggedCommand("$MAKECMD -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv ". |
Bill Wendling | 49e3182 | 2009-07-16 22:59:17 +0000 | [diff] [blame] | 786 | "$TESTFLAGS TEST=nightly", |
| 787 | $ProgramTestLog, "TEST DIRECTORY $SubDir"); |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 788 | $llcbeta_options=`$MAKECMD print-llcbeta-option`; |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 789 | } |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 790 | |
Patrick Jenkins | 59d1a66 | 2006-07-27 18:28:50 +0000 | [diff] [blame] | 791 | my $ProgramsTable; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 792 | if (`grep '^$MAKECMD\[^:]: .*Error' $ProgramTestLog | wc -l` + 0) { |
Patrick Jenkins | 59d1a66 | 2006-07-27 18:28:50 +0000 | [diff] [blame] | 793 | $TestError = 1; |
| 794 | $ProgramsTable="Error running test $SubDir\n"; |
| 795 | print "ERROR TESTING\n"; |
| 796 | } elsif (`grep '^$MAKECMD\[^:]: .*No rule to make target' $ProgramTestLog | wc -l` + 0) { |
| 797 | $TestError = 1; |
| 798 | $ProgramsTable="Makefile error running tests $SubDir!\n"; |
| 799 | print "ERROR TESTING\n"; |
| 800 | } else { |
| 801 | $TestError = 0; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 802 | # |
| 803 | # Create a list of the tests which were run... |
| 804 | # |
| 805 | system "egrep 'TEST-(PASS|FAIL)' < $ProgramTestLog ". |
Patrick Jenkins | 4b7f7aa | 2006-08-17 22:11:03 +0000 | [diff] [blame] | 806 | "| sort > $Prefix-$SubDir-Tests.txt"; |
Patrick Jenkins | 59d1a66 | 2006-07-27 18:28:50 +0000 | [diff] [blame] | 807 | } |
| 808 | $ProgramsTable = ReadFile "report.nightly.csv"; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 809 | |
Patrick Jenkins | 59d1a66 | 2006-07-27 18:28:50 +0000 | [diff] [blame] | 810 | ChangeDir( "../../..", "Programs Test Parent Directory" ); |
| 811 | return ($ProgramsTable, $llcbeta_options); |
Patrick Jenkins | 9e384ab | 2006-08-14 16:07:14 +0000 | [diff] [blame] | 812 | } #end sub TestDirectory |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 813 | |
Patrick Jenkins | 4b7f7aa | 2006-08-17 22:11:03 +0000 | [diff] [blame] | 814 | ############################################################## |
| 815 | # |
| 816 | # Calling sub TestDirectory |
| 817 | # |
| 818 | ############################################################## |
Patrick Jenkins | c281b0d | 2006-07-27 19:00:01 +0000 | [diff] [blame] | 819 | if (!$BuildError) { |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 820 | ($SingleSourceProgramsTable, $llcbeta_options) = |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 821 | TestDirectory("SingleSource"); |
Patrick Jenkins | 4b7f7aa | 2006-08-17 22:11:03 +0000 | [diff] [blame] | 822 | WriteFile "$Prefix-SingleSource-Performance.txt", $SingleSourceProgramsTable; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 823 | ($MultiSourceProgramsTable, $llcbeta_options) = TestDirectory("MultiSource"); |
Patrick Jenkins | 4b7f7aa | 2006-08-17 22:11:03 +0000 | [diff] [blame] | 824 | WriteFile "$Prefix-MultiSource-Performance.txt", $MultiSourceProgramsTable; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 825 | if ( ! $NOEXTERNALS ) { |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 826 | ($ExternalProgramsTable, $llcbeta_options) = TestDirectory("External"); |
Patrick Jenkins | 4b7f7aa | 2006-08-17 22:11:03 +0000 | [diff] [blame] | 827 | WriteFile "$Prefix-External-Performance.txt", $ExternalProgramsTable; |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 828 | system "cat $Prefix-SingleSource-Tests.txt " . |
Patrick Jenkins | 4b7f7aa | 2006-08-17 22:11:03 +0000 | [diff] [blame] | 829 | "$Prefix-MultiSource-Tests.txt ". |
| 830 | "$Prefix-External-Tests.txt | sort > $Prefix-Tests.txt"; |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 831 | system "cat $Prefix-SingleSource-Performance.txt " . |
Patrick Jenkins | 4b7f7aa | 2006-08-17 22:11:03 +0000 | [diff] [blame] | 832 | "$Prefix-MultiSource-Performance.txt ". |
| 833 | "$Prefix-External-Performance.txt | sort > $Prefix-Performance.txt"; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 834 | } else { |
| 835 | $ExternalProgramsTable = "External TEST STAGE SKIPPED\n"; |
| 836 | if ( $VERBOSE ) { |
| 837 | print "External TEST STAGE SKIPPED\n"; |
| 838 | } |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 839 | system "cat $Prefix-SingleSource-Tests.txt " . |
Patrick Jenkins | 4b7f7aa | 2006-08-17 22:11:03 +0000 | [diff] [blame] | 840 | "$Prefix-MultiSource-Tests.txt ". |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 841 | " | sort > $Prefix-Tests.txt"; |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 842 | system "cat $Prefix-SingleSource-Performance.txt " . |
Patrick Jenkins | 4b7f7aa | 2006-08-17 22:11:03 +0000 | [diff] [blame] | 843 | "$Prefix-MultiSource-Performance.txt ". |
| 844 | " | sort > $Prefix-Performance.txt"; |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 845 | } |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 846 | |
Patrick Jenkins | ad6f758 | 2006-08-22 18:11:19 +0000 | [diff] [blame] | 847 | ############################################################## |
| 848 | # |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 849 | # |
| 850 | # gathering tests added removed broken information here |
Patrick Jenkins | ad6f758 | 2006-08-22 18:11:19 +0000 | [diff] [blame] | 851 | # |
| 852 | # |
| 853 | ############################################################## |
| 854 | my $dejagnu_test_list = ReadFile "$Prefix-Tests.txt"; |
| 855 | my @DEJAGNU = split "\n", $dejagnu_test_list; |
| 856 | my ($passes, $fails, $xfails) = ""; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 857 | |
Patrick Jenkins | ad6f758 | 2006-08-22 18:11:19 +0000 | [diff] [blame] | 858 | if(!$NODEJAGNU) { |
| 859 | for ($x=0; $x<@DEJAGNU; $x++) { |
| 860 | if ($DEJAGNU[$x] =~ m/^PASS:/) { |
| 861 | $passes.="$DEJAGNU[$x]\n"; |
| 862 | } |
| 863 | elsif ($DEJAGNU[$x] =~ m/^FAIL:/) { |
| 864 | $fails.="$DEJAGNU[$x]\n"; |
| 865 | } |
| 866 | elsif ($DEJAGNU[$x] =~ m/^XFAIL:/) { |
| 867 | $xfails.="$DEJAGNU[$x]\n"; |
| 868 | } |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 869 | } |
| 870 | } |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 871 | |
Patrick Jenkins | ad6f758 | 2006-08-22 18:11:19 +0000 | [diff] [blame] | 872 | } #end if !$BuildError |
| 873 | |
Patrick Jenkins | 215b48f | 2006-07-07 18:50:51 +0000 | [diff] [blame] | 874 | ############################################################## |
| 875 | # |
| 876 | # Getting end timestamp |
| 877 | # |
| 878 | ############################################################## |
Patrick Jenkins | b67e118 | 2006-07-21 21:43:09 +0000 | [diff] [blame] | 879 | $endtime = `date "+20%y-%m-%d %H:%M:%S"`; |
Patrick Jenkins | 215b48f | 2006-07-07 18:50:51 +0000 | [diff] [blame] | 880 | |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 881 | |
| 882 | ############################################################## |
| 883 | # |
| 884 | # Place all the logs neatly into one humungous file |
| 885 | # |
| 886 | ############################################################## |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 887 | if ( $VERBOSE ) { print "PREPARING LOGS TO BE SENT TO SERVER\n"; } |
| 888 | |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 889 | $machine_data = "uname: ".`uname -a`. |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 890 | "hardware: ".`uname -m`. |
| 891 | "os: ".`uname -sr`. |
| 892 | "name: ".`uname -n`. |
| 893 | "date: ".`date \"+20%y-%m-%d\"`. |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 894 | "time: ".`date +\"%H:%M:%S\"`; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 895 | |
| 896 | my @CVS_DATA; |
| 897 | my $cvs_data; |
Reid Spencer | 99e865a | 2007-04-07 04:41:16 +0000 | [diff] [blame] | 898 | @CVS_DATA = ReadFile "$COLog"; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 899 | $cvs_data = join("\n", @CVS_DATA); |
| 900 | |
| 901 | my @BUILD_DATA; |
| 902 | my $build_data; |
| 903 | @BUILD_DATA = ReadFile "$BuildLog"; |
| 904 | $build_data = join("\n", @BUILD_DATA); |
| 905 | |
Patrick Jenkins | 0313775 | 2006-08-21 20:45:57 +0000 | [diff] [blame] | 906 | my (@DEJAGNU_LOG, @DEJAGNU_SUM, @DEJAGNULOG_FULL, @GCC_VERSION); |
| 907 | my ($dejagnutests_log ,$dejagnutests_sum, $dejagnulog_full) = ""; |
| 908 | my ($gcc_version, $gcc_version_long) = ""; |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 909 | |
Patrick Jenkins | ad6f758 | 2006-08-22 18:11:19 +0000 | [diff] [blame] | 910 | $gcc_version_long=""; |
| 911 | if ($GCCPATH ne "") { |
| 912 | $gcc_version_long = `$GCCPATH/gcc --version`; |
Jeff Cohen | 7545422 | 2007-04-10 19:13:43 +0000 | [diff] [blame] | 913 | } elsif ($ENV{"CC"}) { |
| 914 | $gcc_version_long = `$ENV{"CC"} --version`; |
Patrick Jenkins | ad6f758 | 2006-08-22 18:11:19 +0000 | [diff] [blame] | 915 | } else { |
| 916 | $gcc_version_long = `gcc --version`; |
| 917 | } |
| 918 | @GCC_VERSION = split '\n', $gcc_version_long; |
| 919 | $gcc_version = $GCC_VERSION[0]; |
| 920 | |
Tanya Lattner | 849c9a2 | 2007-04-13 04:36:48 +0000 | [diff] [blame] | 921 | $llvmgcc_version_long=""; |
| 922 | if ($LLVMGCCPATH ne "") { |
| 923 | $llvmgcc_version_long = `$LLVMGCCPATH/llvm-gcc -v 2>&1`; |
| 924 | } else { |
| 925 | $llvmgcc_version_long = `llvm-gcc -v 2>&1`; |
| 926 | } |
| 927 | @LLVMGCC_VERSION = split '\n', $llvmgcc_version_long; |
| 928 | $llvmgcc_versionTarget = $LLVMGCC_VERSION[1]; |
| 929 | $llvmgcc_versionTarget =~ /Target: (.+)/; |
| 930 | $targetTriple = $1; |
| 931 | |
Patrick Jenkins | 0313775 | 2006-08-21 20:45:57 +0000 | [diff] [blame] | 932 | if(!$BuildError){ |
| 933 | @DEJAGNU_LOG = ReadFile "$DejagnuLog"; |
| 934 | @DEJAGNU_SUM = ReadFile "$DejagnuSum"; |
| 935 | $dejagnutests_log = join("\n", @DEJAGNU_LOG); |
| 936 | $dejagnutests_sum = join("\n", @DEJAGNU_SUM); |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 937 | |
Patrick Jenkins | 0313775 | 2006-08-21 20:45:57 +0000 | [diff] [blame] | 938 | @DEJAGNULOG_FULL = ReadFile "$DejagnuTestsLog"; |
| 939 | $dejagnulog_full = join("\n", @DEJAGNULOG_FULL); |
Patrick Jenkins | 79fbf7f | 2006-07-14 20:44:09 +0000 | [diff] [blame] | 940 | } |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 941 | |
| 942 | ############################################################## |
| 943 | # |
| 944 | # Send data via a post request |
| 945 | # |
| 946 | ############################################################## |
| 947 | |
| 948 | if ( $VERBOSE ) { print "SEND THE DATA VIA THE POST REQUEST\n"; } |
| 949 | |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 950 | my %hash_of_data = ( |
| 951 | 'machine_data' => $machine_data, |
| 952 | 'build_data' => $build_data, |
| 953 | 'gcc_version' => $gcc_version, |
| 954 | 'nickname' => $nickname, |
| 955 | 'dejagnutime_wall' => $DejagnuWallTime, |
| 956 | 'dejagnutime_cpu' => $DejagnuTime, |
Reid Spencer | 99e865a | 2007-04-07 04:41:16 +0000 | [diff] [blame] | 957 | 'cvscheckouttime_wall' => $CheckoutTime_Wall, |
| 958 | 'cvscheckouttime_cpu' => $CheckoutTime_CPU, |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 959 | 'configtime_wall' => $ConfigWallTime, |
| 960 | 'configtime_cpu'=> $ConfigTime, |
| 961 | 'buildtime_wall' => $BuildWallTime, |
| 962 | 'buildtime_cpu' => $BuildTime, |
| 963 | 'warnings' => $WarningsFile, |
Daniel Dunbar | 7c9eb9e | 2009-10-19 09:19:09 +0000 | [diff] [blame^] | 964 | 'cvsusercommitlist' => "", |
| 965 | 'cvsuserupdatelist' => "", |
| 966 | 'cvsaddedfiles' => "", |
| 967 | 'cvsmodifiedfiles' => "", |
| 968 | 'cvsremovedfiles' => "", |
| 969 | 'lines_of_code' => "", |
| 970 | 'cvs_file_count' => 0, |
| 971 | 'cvs_dir_count' => 0, |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 972 | 'buildstatus' => $BuildStatus, |
| 973 | 'singlesource_programstable' => $SingleSourceProgramsTable, |
| 974 | 'multisource_programstable' => $MultiSourceProgramsTable, |
| 975 | 'externalsource_programstable' => $ExternalProgramsTable, |
| 976 | 'llcbeta_options' => $multisource_llcbeta_options, |
| 977 | 'warnings_removed' => $WarningsRemoved, |
| 978 | 'warnings_added' => $WarningsAdded, |
| 979 | 'passing_tests' => $passes, |
| 980 | 'expfail_tests' => $xfails, |
| 981 | 'unexpfail_tests' => $fails, |
| 982 | 'all_tests' => $dejagnu_test_list, |
| 983 | 'new_tests' => "", |
| 984 | 'removed_tests' => "", |
Patrick Jenkins | b9c65eb | 2006-08-18 18:00:21 +0000 | [diff] [blame] | 985 | 'dejagnutests_results' => $DejagnuTestResults, |
| 986 | 'dejagnutests_log' => $dejagnulog_full, |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 987 | 'starttime' => $starttime, |
| 988 | 'endtime' => $endtime, |
| 989 | 'o_file_sizes' => $o_file_sizes, |
Tanya Lattner | 849c9a2 | 2007-04-13 04:36:48 +0000 | [diff] [blame] | 990 | 'a_file_sizes' => $a_file_sizes, |
| 991 | 'target_triple' => $targetTriple |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 992 | ); |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 993 | |
Daniel Dunbar | f7f02a9 | 2009-06-26 22:33:28 +0000 | [diff] [blame] | 994 | if ($SUBMIT || !($SUBMITAUX eq "")) { |
Tanya Lattner | c161188 | 2008-03-10 07:28:08 +0000 | [diff] [blame] | 995 | my $response = SendData $SUBMITSERVER,$SUBMITSCRIPT,\%hash_of_data; |
| 996 | if( $VERBOSE) { print "============================\n$response"; } |
| 997 | } else { |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 998 | print "============================\n"; |
| 999 | foreach $x(keys %hash_of_data){ |
| 1000 | print "$x => $hash_of_data{$x}\n"; |
| 1001 | } |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 1002 | } |
| 1003 | |
| 1004 | ############################################################## |
| 1005 | # |
Daniel Dunbar | 2e10794 | 2009-10-19 09:18:54 +0000 | [diff] [blame] | 1006 | # Remove the source tree... |
Patrick Jenkins | fe030d7 | 2006-07-06 21:19:32 +0000 | [diff] [blame] | 1007 | # |
| 1008 | ############################################################## |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 1009 | system ( "$NICE rm -rf $BuildDir") |
Daniel Dunbar | 0c39e38 | 2009-07-13 22:17:49 +0000 | [diff] [blame] | 1010 | if (!$NOCHECKOUT and !$NOREMOVE and !$NOREMOVEATEND); |
Misha Brukman | 12c8d1b | 2009-01-02 16:28:18 +0000 | [diff] [blame] | 1011 | system ( "$NICE rm -rf $WebDir") |
Reid Spencer | fa34d7b | 2006-08-13 09:53:02 +0000 | [diff] [blame] | 1012 | if (!$NOCHECKOUT and !$NOREMOVE and !$NOREMOVERESULTS); |