blob: be1363bfcb98d9b7d159c55324de03f9efcd077f [file] [log] [blame]
Alkis Evlogimenos2e142f52004-01-07 01:48:26 +00001#!/usr/bin/perl -w
Chris Lattner4c7e3032003-01-20 06:11:03 +00002#
3# Program: NightlyTest.pl
4#
5# Synopsis: Perform a series of tests which are designed to be run nightly.
6# This is used to keep track of the status of the LLVM tree, tracking
7# regressions and performance changes. This generates one web page a
8# day which can be used to access this information.
9#
Brian Gaekeb3dab902003-10-11 05:34:00 +000010# Syntax: NightlyTest.pl [OPTIONS] [CVSROOT BUILDDIR WEBDIR]
11# where
12# OPTIONS may include one or more of the following:
13# -nocheckout Do not create, checkout, update, or configure
14# the source tree.
15# -noremove Do not remove the BUILDDIR after it has been built.
Chris Lattner4d00fde2004-05-28 20:30:23 +000016# -nofeaturetests Do not run the feature tests.
17# -noregressiontests Do not run the regression tests.
Brian Gaekeb3dab902003-10-11 05:34:00 +000018# -notest Do not even attempt to run the test programs. Implies
19# -norunningtests.
20# -norunningtests Do not run the Olden benchmark suite with
21# LARGE_PROBLEM_SIZE enabled.
Reid Spencer1d914632004-06-23 07:45:46 +000022# -noexternals Do not run the external tests (for cases where povray
23# or SPEC are not installed)
Brian Gaekeb3dab902003-10-11 05:34:00 +000024# -parallel Run two parallel jobs with GNU Make.
Reid Spencerf6d02332004-06-11 07:06:22 +000025# -release Build an LLVM Release version
26# -pedantic Enable additional GCC warnings to detect possible errors.
Chris Lattnerbb0aca52003-12-19 03:47:31 +000027# -enable-linscan Enable linearscan tests
Chris Lattner20d13ea2004-06-03 03:29:39 +000028# -disable-codegen Disable LLC and JIT tests in the nightly tester.
Chris Lattner4d00fde2004-05-28 20:30:23 +000029# -verbose Turn on some debug output
30# -debug Print information useful only to maintainers of this script.
Reid Spencercb6a3aa2004-06-22 15:38:37 +000031# -nice Checkout/Configure/Build with "nice" to reduce impact
32# on busy servers.
33# -gnuplotscript Next argument specifies gnuplot script to use
34# -templatefile Next argument specifies template file to use
Chris Lattnerbb0aca52003-12-19 03:47:31 +000035#
Brian Gaekeb3dab902003-10-11 05:34:00 +000036# CVSROOT is the CVS repository from which the tree will be checked out,
37# specified either in the full :method:user@host:/dir syntax, or
38# just /dir if using a local repo.
39# BUILDDIR is the directory where sources for this test run will be checked out
40# AND objects for this test run will be built. This directory MUST NOT
41# exist before the script is run; it will be created by the cvs checkout
42# process and erased (unless -noremove is specified; see above.)
43# WEBDIR is the directory into which the test results web page will be written,
44# AND in which the "index.html" is assumed to be a symlink to the most recent
45# copy of the results. This directory MUST exist before the script is run.
Reid Spencercb6a3aa2004-06-22 15:38:37 +000046# LLVMGCCDIR is the directory in which the LLVM GCC Front End is installed
47# to. This is the same as you would have for a normal LLVM build.
Chris Lattner4c7e3032003-01-20 06:11:03 +000048#
49use POSIX qw(strftime);
50
Brian Gaekeb3dab902003-10-11 05:34:00 +000051my $HOME = $ENV{'HOME'};
52my $CVSRootDir = $ENV{'CVSROOT'};
Chris Lattner9d13efa2003-10-14 01:22:08 +000053 $CVSRootDir = "/home/vadve/shared/PublicCVS"
Chris Lattner4d00fde2004-05-28 20:30:23 +000054 unless $CVSRootDir;
55my $BuildDir = $ENV{'BUILDDIR'};
56 $BuildDir = "$HOME/buildtest"
57 unless $BuildDir;
58my $WebDir = $ENV{'WEBDIR'};
59 $WebDir = "$HOME/cvs/testresults-X86"
60 unless $WebDir;
Chris Lattner2f8cb572003-01-20 18:05:27 +000061
62# Calculate the date prefix...
63@TIME = localtime;
64my $DATE = sprintf "%4d-%02d-%02d", $TIME[5]+1900, $TIME[4]+1, $TIME[3];
65my $DateString = strftime "%B %d, %Y", localtime;
Reid Spencercb6a3aa2004-06-22 15:38:37 +000066my $TestStartTime = gmtime;
67
68# Command line argument settings...
69my $NOCHECKOUT = 0;
70my $NOREMOVE = 0;
71my $NOFEATURES = 0;
72my $NOREGRESSIONS = 0;
73my $NOTEST = 0;
74my $NORUNNINGTESTS = 0;
Reid Spencer1d914632004-06-23 07:45:46 +000075my $NOEXTERNALS = 0;
Reid Spencercb6a3aa2004-06-22 15:38:37 +000076my $MAKEOPTS = "";
77my $PROGTESTOPTS = "";
78my $VERBOSE = 0;
79my $DEBUG = 0;
80my $CONFIGUREARGS = "--enable-jit";
81my $NICE = "";
Chris Lattner2f8cb572003-01-20 18:05:27 +000082
Chris Lattnerb3440302003-01-22 16:14:05 +000083sub ReadFile {
84 if (open (FILE, $_[0])) {
Reid Spencercb6a3aa2004-06-22 15:38:37 +000085 undef $/;
Chris Lattnerb3440302003-01-22 16:14:05 +000086 my $Ret = <FILE>;
87 close FILE;
Reid Spencercb6a3aa2004-06-22 15:38:37 +000088 $/ = '\n';
Chris Lattnerb3440302003-01-22 16:14:05 +000089 return $Ret;
90 } else {
91 print "Could not open file '$_[0]' for reading!";
92 return "";
93 }
94}
95
Chris Lattner2f8cb572003-01-20 18:05:27 +000096sub WriteFile { # (filename, contents)
97 open (FILE, ">$_[0]") or die "Could not open file '$_[0]' for writing!";
98 print FILE $_[1];
99 close FILE;
100}
101
102sub GetRegex { # (Regex with ()'s, value)
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000103 $_[1] =~ /$_[0]/m;
Chris Lattner08e24762003-08-19 18:35:03 +0000104 if (defined($1)) {
105 return $1;
106 }
Reid Spencera337f0c2004-06-23 06:36:34 +0000107 return "0";
Chris Lattner2f8cb572003-01-20 18:05:27 +0000108}
109
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000110sub AddRecord {
111 my ($Val, $Filename) = @_;
112 my @Records;
113 if (open FILE, "$WebDir/$Filename") {
114 @Records = grep !/$DATE/, split "\n", <FILE>;
115 close FILE;
116 }
117 push @Records, "$DATE: $Val";
118 WriteFile "$WebDir/$Filename", (join "\n", @Records) . "\n";
119 return @Records;
120}
121
Chris Lattner2f8cb572003-01-20 18:05:27 +0000122sub AddPreTag { # Add pre tags around nonempty list, or convert to "none"
123 $_ = shift;
Chris Lattner1cbc0a62003-01-20 19:18:44 +0000124 if (length) { return "<ul><pre>$_</pre></ul>"; } else { "<b>none</b><br>"; }
Chris Lattner2f8cb572003-01-20 18:05:27 +0000125}
126
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000127sub ChangeDir { # directory, logical name
128 my ($dir,$name) = @_;
129 chomp($dir);
130 if ( $VERBOSE ) { print "Changing To: $name ($dir)\n"; }
131 chdir($dir) || die "Cannot change directory to: $name ($dir) ";
132}
133
Chris Lattner2f8cb572003-01-20 18:05:27 +0000134sub GetDir {
135 my $Suffix = shift;
136 opendir DH, $WebDir;
137 my @Result = reverse sort grep !/$DATE/, grep /[-0-9]+$Suffix/, readdir DH;
138 closedir DH;
139 return @Result;
140}
141
142# DiffFiles - Diff the current version of the file against the last version of
143# the file, reporting things added and removed. This is used to report, for
144# example, added and removed warnings. This returns a pair (added, removed)
145#
146sub DiffFiles {
147 my $Suffix = shift;
148 my @Others = GetDir $Suffix;
149 if (@Others == 0) { # No other files? We added all entries...
150 return (`cat $WebDir/$DATE$Suffix`, "");
151 }
152 # Diff the files now...
153 my @Diffs = split "\n", `diff $WebDir/$DATE$Suffix $WebDir/$Others[0]`;
154 my $Added = join "\n", grep /^</, @Diffs;
155 my $Removed = join "\n", grep /^>/, @Diffs;
Chris Lattner1cbc0a62003-01-20 19:18:44 +0000156 $Added =~ s/^< //gm;
157 $Removed =~ s/^> //gm;
Chris Lattner2f8cb572003-01-20 18:05:27 +0000158 return ($Added, $Removed);
159}
160
Chris Lattner196a14a2003-08-19 15:08:34 +0000161# FormatTime - Convert a time from 1m23.45 into 83.45
162sub FormatTime {
163 my $Time = shift;
164 if ($Time =~ m/([0-9]+)m([0-9.]+)/) {
165 $Time = sprintf("%7.4f", $1*60.0+$2);
166 }
167 return $Time;
168}
169
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000170sub GetRegexNum {
171 my ($Regex, $Num, $Regex2, $File) = @_;
172 my @Items = split "\n", `grep '$Regex' $File`;
173 return GetRegex $Regex2, $Items[$Num];
174}
175
Chris Lattner4d00fde2004-05-28 20:30:23 +0000176sub GetQMTestResults { # (filename)
177 my ($filename) = @_;
178 my @lines;
179 my $firstline;
180 $/ = "\n"; #Make sure we're going line at a time.
181 if (open SRCHFILE, $filename) {
Reid Spencer542e8592004-05-30 00:17:47 +0000182 # Skip stuff before ---TEST RESULTS
Chris Lattner4d00fde2004-05-28 20:30:23 +0000183 while ( <SRCHFILE> ) {
Reid Spenceraa0bfbe2004-05-31 20:59:55 +0000184 if ( m/^--- TEST RESULTS/ ) { last; }
Chris Lattner4d00fde2004-05-28 20:30:23 +0000185 }
Reid Spencer542e8592004-05-30 00:17:47 +0000186 # Process test results
Reid Spenceraa0bfbe2004-05-31 20:59:55 +0000187 push(@lines,"<h3>TEST RESULTS</h3><ol><li>\n");
188 my $first_list = 1;
189 my $should_break = 1;
Reid Spencerf5d0af32004-06-08 08:01:33 +0000190 my $nocopy = 0;
Chris Lattner4d00fde2004-05-28 20:30:23 +0000191 while ( <SRCHFILE> ) {
192 if ( length($_) > 1 ) {
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000193 chomp($_);
194 if ( ! m/: PASS[ ]*$/ &&
195 ! m/^ qmtest.target:/ &&
196 ! m/^ local/ &&
197 ! m/^gmake:/ ) {
198 if ( m/: XFAIL/ ) {
199 $nocopy = 1;
200 } elsif ( m/: XPASS/ || m/: FAIL/ ) {
201 $nocopy = 0;
202 if ( $first_list ) {
203 $first_list = 0;
204 $should_break = 1;
205 push(@lines,"<b>$_</b><br/>\n");
206 } else {
207 push(@lines,"</li><li><b>$_</b><br/>\n");
208 }
209 } elsif ( m/^--- STATISTICS/ ) {
210 if ( $first_list ) { push(@lines,"<b>PERFECT!</b>"); }
211 push(@lines,"</li></ol><h3>STATISTICS</h3><pre>\n");
212 $should_break = 0;
213 $nocopy = 0;
214 } elsif ( m/^--- TESTS WITH/ ) {
215 $should_break = 1;
216 $first_list = 1;
217 $nocopy = 0;
218 push(@lines,"</pre><h3>TESTS WITH UNEXPECTED RESULTS</h3><ol><li>\n");
219 } elsif ( m/^real / ) {
220 last;
221 } elsif (!$nocopy) {
222 if ( $should_break ) {
223 push(@lines,"$_<br/>\n");
224 } else {
225 push(@lines,"$_\n");
226 }
227 }
228 }
Chris Lattner4d00fde2004-05-28 20:30:23 +0000229 }
230 }
231 close SRCHFILE;
232 }
233 my $content = join("",@lines);
Reid Spencerf5d0af32004-06-08 08:01:33 +0000234 return "$content</li></ol>\n";
235}
Chris Lattner4d00fde2004-05-28 20:30:23 +0000236
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000237
238#####################################################################
239## MAIN PROGRAM
240#####################################################################
241
242my $Template = "";
243my $PlotScriptFilename = "";
244
245# Parse arguments...
246while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) {
247 shift;
248 last if /^--$/; # Stop processing arguments on --
249
250 # List command line options here...
251 if (/^-nocheckout$/) { $NOCHECKOUT = 1; next; }
252 if (/^-noremove$/) { $NOREMOVE = 1; next; }
253 if (/^-nofeaturetests$/) { $NOFEATURES = 1; next; }
254 if (/^-noregressiontests$/){ $NOREGRESSIONS = 1; next; }
255 if (/^-notest$/) { $NOTEST = 1; $NORUNNINGTESTS = 1; next; }
256 if (/^-norunningtests$/) { $NORUNNINGTESTS = 1; next; }
257 if (/^-parallel$/) { $MAKEOPTS = "$MAKEOPTS -j2 -l3.0"; next; }
258 if (/^-release$/) { $MAKEOPTS = "$MAKEOPTS ENABLE_OPTIMIZED=1"; next; }
259 if (/^-pedantic$/) {
260 $MAKEOPTS = "$MAKEOPTS CompileOptimizeOpts='-O3 -DNDEBUG -finline-functions -Wpointer-arith -Wcast-align -Wno-deprecated -Wold-style-cast -Wabi -Woverloaded-virtual -ffor-scope'";
261 next;
262 }
263 if (/^-enable-linscan$/) { $PROGTESTOPTS .= " ENABLE_LINEARSCAN=1"; next; }
264 if (/^-disable-codegen$/){ $PROGTESTOPTS .= " DISABLE_JIT=1 DISABLE_LLC=1";
265 $CONFIGUREARGS="--disable-jit --disable-llc_diffs";
266 next; }
267 if (/^-verbose$/) { $VERBOSE = 1; next; }
268 if (/^-debug$/) { $DEBUG = 1; next; }
269 if (/^-nice$/) { $NICE = "nice "; next; }
270 if (/^-gnuplotscript$/) { $PlotScriptFilename = $ARGV[0]; shift; next; }
Reid Spencerc5b67052004-06-23 14:07:12 +0000271 if (/^-templatefile$/) { $Template = $ARGV[0]; shift; next; }
Reid Spencer1d914632004-06-23 07:45:46 +0000272 if (/^-noexternals$/) { $NOEXTERNALS = 1; next; }
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000273
274 print "Unknown option: $_ : ignoring!\n";
275}
276
277if ($ENV{'LLVMGCCDIR'}) {
278 $CONFIGUREARGS .= " --with-llvmgccdir=" . $ENV{'LLVMGCCDIR'};
279}
280
281die "Must specify 0 or 3 options!" if (@ARGV != 0 and @ARGV != 3);
282
283if (@ARGV == 3) {
284 $CVSRootDir = $ARGV[0];
285 $BuildDir = $ARGV[1];
286 $WebDir = $ARGV[2];
287}
288
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000289my $Prefix = "$WebDir/$DATE";
290
291#define the file names we'll use
292my $BuildLog = "$Prefix-Build-Log.txt";
293my $CVSLog = "$Prefix-CVS-Log.txt";
294my $FeatureTestsLog = "$Prefix-FeatureTests-Log.txt";
295my $RegressionTestsLog = "$Prefix-RegressionTests-Log.txt";
296my $OldenTestsLog = "$Prefix-Olden-tests.txt";
297my $SingleSourceLog = "$Prefix-SingleSource-ProgramTest.txt.gz";
298my $MultiSourceLog = "$Prefix-MultiSource-ProgramTest.txt.gz";
299my $ExternalLog = "$Prefix-External-ProgramTest.txt.gz";
300
301if ($VERBOSE) {
302 print "INITIALIZED\n";
303 print "CVS Root = $CVSRootDir\n";
304 print "BuildDir = $BuildDir\n";
305 print "WebDir = $WebDir\n";
306 print "Prefix = $Prefix\n";
307 print "CVSLog = $CVSLog\n";
308 print "BuildLog = $BuildLog\n";
309}
310
311
312#
313# Create the CVS repository directory
314#
315if (!$NOCHECKOUT) {
316 if (-d $BuildDir) {
317 if (!$NOREMOVE) {
318 system "rm -rf $BuildDir";
319 } else {
320 die "CVS checkout directory $BuildDir already exists!";
321 }
322 }
323 mkdir $BuildDir or die "Could not create CVS checkout directory $BuildDir!";
324}
325
326ChangeDir( $BuildDir, "CVS checkout directory" );
327
328
329#
330# Check out the llvm tree, saving CVS messages to the cvs log...
331#
332$CVSOPT = "";
333$CVSOPT = "-z3" if $CVSRootDir =~ /^:ext:/; # Use compression if going over ssh.
334if (!$NOCHECKOUT) {
335 if ( $VERBOSE ) { print "CHECKOUT STAGE\n"; }
336 system "(time -p $NICE cvs $CVSOPT -d $CVSRootDir co llvm) > $CVSLog 2>&1";
337}
338
339ChangeDir( "llvm" , "llvm source directory") ;
340
341if (!$NOCHECKOUT) {
342 if ( $VERBOSE ) { print "UPDATE STAGE\n"; }
343 system "$NICE cvs update -P -d >> $CVSLog 2>&1" ;
344}
345
Reid Spencerc5b67052004-06-23 14:07:12 +0000346if ( $Template eq "" ) {
347 $Template = "$BuildDir/llvm/utils/NightlyTestTemplate.html";
348}
349die "Template file $Template is not readable" if ( ! -r "$Template" );
350
351if ( $PlotScriptFilename eq "" ) {
352 $PlotScriptFilename = "$BuildDir/llvm/utils/NightlyTest.gnuplot";
353}
354die "GNUPlot Script $PlotScriptFilename is not readable" if ( ! -r "$PlotScriptFilename" );
355
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000356# Read in the HTML template file...
357if ( $VERBOSE ) { print "READING TEMPLATE\n"; }
358my $TemplateContents = ReadFile $Template;
359
360#
361# Get some static statistics about the current state of CVS
362#
363my $CVSCheckoutTime = GetRegex "([0-9.]+)", `grep '^real' $CVSLog`;
364my $NumFilesInCVS = `egrep '^U' $CVSLog | wc -l` + 0;
365my $NumDirsInCVS = `egrep '^cvs (checkout|server|update):' $CVSLog | wc -l` + 0;
366$LOC = GetRegex "([0-9]+) +total", `wc -l \`utils/getsrcs.sh\` | grep total`;
367
368#
369# Build the entire tree, saving build messages to the build log
370#
371if (!$NOCHECKOUT) {
372 if ( $VERBOSE ) { print "CONFIGURE STAGE\n"; }
373 system "(time -p $NICE ./configure $CONFIGUREARGS --enable-spec --with-objroot=.) > $BuildLog 2>&1";
374
375 if ( $VERBOSE ) { print "BUILD STAGE\n"; }
376 # Build the entire tree, capturing the output into $BuildLog
377 system "(time -p $NICE gmake $MAKEOPTS) >> $BuildLog 2>&1";
378}
379
380
381#
382# Get some statistics about the build...
383#
384my @Linked = split '\n', `grep Linking $BuildLog`;
385my $NumExecutables = scalar(grep(/executable/, @Linked));
386my $NumLibraries = scalar(grep(!/executable/, @Linked));
387my $NumObjects = `grep '^Compiling' $BuildLog | wc -l` + 0;
388
389my $ConfigTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$BuildLog";
390my $ConfigTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$BuildLog";
391my $ConfigTime = $ConfigTimeU+$ConfigTimeS; # ConfigTime = User+System
392my $ConfigWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$BuildLog";
393
394my $BuildTimeU = GetRegexNum "^user", 1, "([0-9.]+)", "$BuildLog";
395my $BuildTimeS = GetRegexNum "^sys", 1, "([0-9.]+)", "$BuildLog";
396my $BuildTime = $BuildTimeU+$BuildTimeS; # BuildTime = User+System
397my $BuildWallTime = GetRegexNum "^real", 1, "([0-9.]+)","$BuildLog";
398
399my $BuildError = "";
400if (`grep '^gmake[^:]*: .*Error' $BuildLog | wc -l` + 0 ||
401 `grep '^gmake: \*\*\*.*Stop.' $BuildLog | wc -l`+0) {
402 $BuildError = "<h3><font color='red'>Build error: compilation " .
403 "<a href=\"$DATE-Build-Log.txt\">aborted</a></font></h3>";
404 if ($VERBOSE) { print "BUILD ERROR\n"; }
405}
406
Brian Gaeke22800982004-06-25 07:25:28 +0000407if ($BuildError) { $NOFEATURES = 1; $NOREGRESSIONS = 1; }
408
Chris Lattner4d00fde2004-05-28 20:30:23 +0000409# Get results of feature tests.
410my $FeatureTestResults; # String containing the results of the feature tests
411my $FeatureTime; # System+CPU Time for feature tests
412my $FeatureWallTime; # Wall Clock Time for feature tests
413if (!$NOFEATURES) {
414 if ( $VERBOSE ) { print "FEATURE TEST STAGE\n"; }
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000415 my $feature_output = "$FeatureTestsLog";
Chris Lattner4d00fde2004-05-28 20:30:23 +0000416
417 # Run the feature tests so we can summarize the results
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000418 system "(time -p gmake $MAKEOPTS -C test Feature.t) > $feature_output 2>&1";
Chris Lattner4d00fde2004-05-28 20:30:23 +0000419
420 # Extract test results
421 $FeatureTestResults = GetQMTestResults("$feature_output");
422
423 # Extract time of feature tests
424 my $FeatureTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$feature_output";
425 my $FeatureTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$feature_output";
426 $FeatureTime = $FeatureTimeU+$FeatureTimeS; # FeatureTime = User+System
427 $FeatureWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$feature_output";
428 # Run the regression tests so we can summarize the results
429} else {
430 $FeatureTestResults = "Skipped by user choice.";
431 $FeatureTime = "0.0";
432 $FeatureWallTime = "0.0";
433}
434
435if (!$NOREGRESSIONS) {
436 if ( $VERBOSE ) { print "REGRESSION TEST STAGE\n"; }
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000437 my $regression_output = "$RegressionTestsLog";
Chris Lattner4d00fde2004-05-28 20:30:23 +0000438
439 # Run the regression tests so we can summarize the results
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000440 system "(time -p gmake $MAKEOPTS -C test Regression.t) > $regression_output 2>&1";
Chris Lattner4d00fde2004-05-28 20:30:23 +0000441
442 # Extract test results
443 $RegressionTestResults = GetQMTestResults("$regression_output");
444
445 # Extract time of regressions tests
446 my $RegressionTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$regression_output";
447 my $RegressionTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$regression_output";
448 $RegressionTime = $RegressionTimeU+$RegressionTimeS; # RegressionTime = User+System
449 $RegressionWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$regression_output";
450} else {
451 $RegressionTestResults = "Skipped by user choice.";
452 $RegressionTime = "0.0";
453 $RegressionWallTime = "0.0";
454}
455
456if ($DEBUG) {
457 print $FeatureTestResults;
458 print $RegressionTestResults;
459}
460
461if ( $VERBOSE ) { print "BUILD INFORMATION COLLECTION STAGE\n"; }
Chris Lattnerb3440302003-01-22 16:14:05 +0000462#
Chris Lattner4c7e3032003-01-20 06:11:03 +0000463# Get warnings from the build
Chris Lattnerb3440302003-01-22 16:14:05 +0000464#
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000465my @Warn = split "\n", `egrep 'warning:|Entering dir' $BuildLog`;
Chris Lattner4c7e3032003-01-20 06:11:03 +0000466my @Warnings;
467my $CurDir = "";
468
469foreach $Warning (@Warn) {
470 if ($Warning =~ m/Entering directory \`([^\`]+)\'/) {
471 $CurDir = $1; # Keep track of directory warning is in...
Misha Brukman8e9554a2003-08-14 15:26:28 +0000472 if ($CurDir =~ m#$BuildDir/llvm/(.*)#) { # Remove buildir prefix if included
Chris Lattner4c7e3032003-01-20 06:11:03 +0000473 $CurDir = $1;
474 }
475 } else {
476 push @Warnings, "$CurDir/$Warning"; # Add directory to warning...
477 }
478}
Chris Lattner1cbc0a62003-01-20 19:18:44 +0000479my $WarningsFile = join "\n", @Warnings;
480my $WarningsList = AddPreTag $WarningsFile;
481$WarningsFile =~ s/:[0-9]+:/::/g;
Chris Lattner4c7e3032003-01-20 06:11:03 +0000482
Chris Lattner2f8cb572003-01-20 18:05:27 +0000483# Emit the warnings file, so we can diff...
484WriteFile "$WebDir/$DATE-Warnings.txt", $WarningsFile . "\n";
485my ($WarningsAdded, $WarningsRemoved) = DiffFiles "-Warnings.txt";
Chris Lattner4c7e3032003-01-20 06:11:03 +0000486
Chris Lattner9efd7f42003-10-18 19:31:39 +0000487# Output something to stdout if something has changed
488print "ADDED WARNINGS:\n$WarningsAdded\n\n" if (length $WarningsAdded);
489print "REMOVED WARNINGS:\n$WarningsRemoved\n\n" if (length $WarningsRemoved);
490
Chris Lattnerbe197872003-10-19 16:54:00 +0000491$WarningsAdded = AddPreTag $WarningsAdded;
492$WarningsRemoved = AddPreTag $WarningsRemoved;
Chris Lattnerb3440302003-01-22 16:14:05 +0000493
494#
Chris Lattner4c7e3032003-01-20 06:11:03 +0000495# Get some statistics about CVS commits over the current day...
Chris Lattnerb3440302003-01-22 16:14:05 +0000496#
Chris Lattner4d00fde2004-05-28 20:30:23 +0000497if ($VERBOSE) { print "CVS HISTORY ANALYSIS STAGE\n"; }
Chris Lattner4c7e3032003-01-20 06:11:03 +0000498@CVSHistory = split "\n", `cvs history -D '1 day ago' -a -xAMROCGUW`;
499#print join "\n", @CVSHistory; print "\n";
500
501# Extract some information from the CVS history... use a hash so no duplicate
502# stuff is stored.
Misha Brukman1b366892003-07-07 21:27:40 +0000503my (%AddedFiles, %ModifiedFiles, %RemovedFiles, %UsersCommitted, %UsersUpdated);
Chris Lattner4c7e3032003-01-20 06:11:03 +0000504
Brian Gaeke43f38672004-06-10 07:44:28 +0000505my $DateRE = '[-/:0-9 ]+\+[0-9]+';
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000506
Chris Lattner4c7e3032003-01-20 06:11:03 +0000507# Loop over every record from the CVS history, filling in the hashes.
508foreach $File (@CVSHistory) {
509 my ($Type, $Date, $UID, $Rev, $Filename);
Misha Brukman8e9554a2003-08-14 15:26:28 +0000510 if ($File =~ /([AMRUGC]) ($DateRE) ([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+)/) {
Chris Lattner4c7e3032003-01-20 06:11:03 +0000511 ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, $4, "$6/$5");
Chris Lattnerd56147d2004-01-12 16:55:30 +0000512 } elsif ($File =~ /([W]) ($DateRE) ([^ ]+)/) {
513 ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, "", "");
Misha Brukman1b366892003-07-07 21:27:40 +0000514 } elsif ($File =~ /([O]) ($DateRE) ([^ ]+) +([^ ]+)/) {
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000515 ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, "", "$4/");
Chris Lattner4c7e3032003-01-20 06:11:03 +0000516 } else {
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000517 print "UNMATCHABLE: $File\n";
Brian Gaeke43f38672004-06-10 07:44:28 +0000518 next;
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000519 }
520 # print "$File\nTy = $Type Date = '$Date' UID=$UID Rev=$Rev File = '$Filename'\n";
521
522 if ($Filename =~ /^llvm/) {
523 if ($Type eq 'M') { # Modified
524 $ModifiedFiles{$Filename} = 1;
525 $UsersCommitted{$UID} = 1;
526 } elsif ($Type eq 'A') { # Added
527 $AddedFiles{$Filename} = 1;
528 $UsersCommitted{$UID} = 1;
529 } elsif ($Type eq 'R') { # Removed
530 $RemovedFiles{$Filename} = 1;
531 $UsersCommitted{$UID} = 1;
532 } else {
533 $UsersUpdated{$UID} = 1;
534 }
Chris Lattner4c7e3032003-01-20 06:11:03 +0000535 }
536}
537
Chris Lattner1cbc0a62003-01-20 19:18:44 +0000538my $UserCommitList = join "\n", keys %UsersCommitted;
539my $UserUpdateList = join "\n", keys %UsersUpdated;
Chris Lattnerc9cdadf2003-08-06 16:02:50 +0000540my $AddedFilesList = AddPreTag join "\n", sort keys %AddedFiles;
541my $ModifiedFilesList = AddPreTag join "\n", sort keys %ModifiedFiles;
542my $RemovedFilesList = AddPreTag join "\n", sort keys %RemovedFiles;
Chris Lattner4c7e3032003-01-20 06:11:03 +0000543
Chris Lattnerec0e3742003-02-28 20:30:20 +0000544my $TestError = 1;
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000545my $SingleSourceProgramsTable = "!";
546my $MultiSourceProgramsTable = "!";
547my $ExternalProgramsTable = "!";
Chris Lattnerb3440302003-01-22 16:14:05 +0000548
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000549
550sub TestDirectory {
551 my $SubDir = shift;
552
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000553 ChangeDir( "test/Programs/$SubDir", "Programs Test Subdirectory" );
554
555 my $ProgramTestLog = "$Prefix-$SubDir-ProgramTest.txt";
Chris Lattnerec0e3742003-02-28 20:30:20 +0000556
557 # Run the programs tests... creating a report.nightly.html file
558 if (!$NOTEST) {
Chris Lattner20d13ea2004-06-03 03:29:39 +0000559 system "gmake -k $MAKEOPTS $PROGTESTOPTS report.nightly.html "
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000560 . "TEST=nightly > $ProgramTestLog 2>&1";
Chris Lattnerec0e3742003-02-28 20:30:20 +0000561 } else {
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000562 system "gunzip ${ProgramTestLog}.gz";
Chris Lattnerec0e3742003-02-28 20:30:20 +0000563 }
564
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000565 my $ProgramsTable;
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000566 if (`grep '^gmake[^:]: .*Error' $ProgramTestLog | wc -l` + 0){
Chris Lattnerec0e3742003-02-28 20:30:20 +0000567 $TestError = 1;
Chris Lattner2e8be142003-05-10 21:40:10 +0000568 $ProgramsTable = "<font color=white><h2>Error running tests!</h2></font>";
Chris Lattnerbe197872003-10-19 16:54:00 +0000569 print "ERROR TESTING\n";
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000570 } elsif (`grep '^gmake[^:]: .*No rule to make target' $ProgramTestLog | wc -l` + 0) {
Chris Lattner6e51bfa2003-05-11 15:23:10 +0000571 $TestError = 1;
572 $ProgramsTable =
573 "<font color=white><h2>Makefile error running tests!</h2></font>";
Chris Lattnerbe197872003-10-19 16:54:00 +0000574 print "ERROR TESTING\n";
Chris Lattner6e51bfa2003-05-11 15:23:10 +0000575 } else {
Chris Lattnerec0e3742003-02-28 20:30:20 +0000576 $TestError = 0;
577 $ProgramsTable = ReadFile "report.nightly.html";
578
579 #
580 # Create a list of the tests which were run...
581 #
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000582 system "egrep 'TEST-(PASS|FAIL)' < $ProgramTestLog "
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000583 . "| sort > $Prefix-$SubDir-Tests.txt";
Chris Lattnerec0e3742003-02-28 20:30:20 +0000584 }
585
586 # Compress the test output
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000587 system "gzip -f $ProgramTestLog";
588 ChangeDir( "../../..", "Programs Test Parent Directory" );
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000589 return $ProgramsTable;
590}
591
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000592# If we built the tree successfully, run the nightly programs tests...
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000593if ($BuildError eq "") {
Chris Lattner4d00fde2004-05-28 20:30:23 +0000594 if ( $VERBOSE ) {
595 print "SingleSource TEST STAGE\n";
596 }
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000597 $SingleSourceProgramsTable = TestDirectory("SingleSource");
Chris Lattner4d00fde2004-05-28 20:30:23 +0000598 if ( $VERBOSE ) {
599 print "MultiSource TEST STAGE\n";
600 }
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000601 $MultiSourceProgramsTable = TestDirectory("MultiSource");
Reid Spencer1d914632004-06-23 07:45:46 +0000602 if ( ! $NOEXTERNALS ) {
603 if ( $VERBOSE ) {
604 print "External TEST STAGE\n";
605 }
606 $ExternalProgramsTable = TestDirectory("External");
607 system "cat $Prefix-SingleSource-Tests.txt $Prefix-MultiSource-Tests.txt ".
Chris Lattnereac3cdc2003-08-21 15:55:26 +0000608 " $Prefix-External-Tests.txt | sort > $Prefix-Tests.txt";
Reid Spencer1d914632004-06-23 07:45:46 +0000609 } else {
610 if ( $VERBOSE ) {
611 print "External TEST STAGE SKIPPED\n";
612 }
613 system "cat $Prefix-SingleSource-Tests.txt $Prefix-MultiSource-Tests.txt ".
614 " | sort > $Prefix-Tests.txt";
615 }
Chris Lattner5d6c4382003-01-23 19:31:28 +0000616}
Chris Lattnerb3440302003-01-22 16:14:05 +0000617
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000618if ( $VERBOSE ) { print "TEST INFORMATION COLLECTION STAGE\n"; }
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000619my ($TestsAdded, $TestsRemoved, $TestsFixed, $TestsBroken) = ("","","","");
620
Chris Lattnerec0e3742003-02-28 20:30:20 +0000621if ($TestError) {
622 $TestsAdded = "<b>error testing</b><br>";
623 $TestsRemoved = "<b>error testing</b><br>";
624 $TestsFixed = "<b>error testing</b><br>";
625 $TestsBroken = "<b>error testing</b><br>";
626} else {
627 my ($RTestsAdded, $RTestsRemoved) = DiffFiles "-Tests.txt";
628
629 my @RawTestsAddedArray = split '\n', $RTestsAdded;
630 my @RawTestsRemovedArray = split '\n', $RTestsRemoved;
631
632 my %OldTests = map {GetRegex('TEST-....: (.+)', $_)=>$_}
633 @RawTestsRemovedArray;
634 my %NewTests = map {GetRegex('TEST-....: (.+)', $_)=>$_}
635 @RawTestsAddedArray;
636
637 foreach $Test (keys %NewTests) {
638 if (!exists $OldTests{$Test}) { # TestAdded if in New but not old
639 $TestsAdded = "$TestsAdded$Test\n";
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000640 } else {
Chris Lattnerec0e3742003-02-28 20:30:20 +0000641 if ($OldTests{$Test} =~ /TEST-PASS/) { # Was the old one a pass?
642 $TestsBroken = "$TestsBroken$Test\n"; # New one must be a failure
643 } else {
644 $TestsFixed = "$TestsFixed$Test\n"; # No, new one is a pass.
645 }
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000646 }
647 }
Chris Lattnerec0e3742003-02-28 20:30:20 +0000648 foreach $Test (keys %OldTests) { # TestRemoved if in Old but not New
649 $TestsRemoved = "$TestsRemoved$Test\n" if (!exists $NewTests{$Test});
650 }
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000651
Chris Lattner91480ff2003-10-21 15:47:31 +0000652 print "\nTESTS ADDED: \n\n$TestsAdded\n\n" if (length $TestsAdded);
653 print "\nTESTS REMOVED:\n\n$TestsRemoved\n\n" if (length $TestsRemoved);
654 print "\nTESTS FIXED: \n\n$TestsFixed\n\n" if (length $TestsFixed);
655 print "\nTESTS BROKEN: \n\n$TestsBroken\n\n" if (length $TestsBroken);
Chris Lattnerbe197872003-10-19 16:54:00 +0000656
Chris Lattnerec0e3742003-02-28 20:30:20 +0000657 $TestsAdded = AddPreTag $TestsAdded;
658 $TestsRemoved = AddPreTag $TestsRemoved;
659 $TestsFixed = AddPreTag $TestsFixed;
660 $TestsBroken = AddPreTag $TestsBroken;
661}
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000662
Chris Lattner9efd7f42003-10-18 19:31:39 +0000663
Chris Lattner196a14a2003-08-19 15:08:34 +0000664# If we built the tree successfully, runs of the Olden suite with
665# LARGE_PROBLEM_SIZE on so that we can get some "running" statistics.
666if ($BuildError eq "") {
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000667 if ( $VERBOSE ) { print "OLDEN TEST SUITE STAGE\n"; }
Chris Lattner08e24762003-08-19 18:35:03 +0000668 my ($NATTime, $CBETime, $LLCTime, $JITTime, $OptTime, $BytecodeSize,
Chris Lattner196a14a2003-08-19 15:08:34 +0000669 $MachCodeSize) = ("","","","","","","");
Chris Lattner08e24762003-08-19 18:35:03 +0000670 if (!$NORUNNINGTESTS) {
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000671 ChangeDir( "$BuildDir/llvm/test/Programs/MultiSource/Benchmarks/Olden",
672 "Olden Test Directory");
Chris Lattner196a14a2003-08-19 15:08:34 +0000673
674 # Clean out previous results...
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000675 system "$NICE gmake $MAKEOPTS clean > /dev/null 2>&1";
Chris Lattner196a14a2003-08-19 15:08:34 +0000676
677 # Run the nightly test in this directory, with LARGE_PROBLEM_SIZE enabled!
Brian Gaeke85668542004-06-04 00:07:12 +0000678 system "gmake -k $MAKEOPTS $PROGTESTOPTS report.nightly.raw.out TEST=nightly " .
Chris Lattner196a14a2003-08-19 15:08:34 +0000679 " LARGE_PROBLEM_SIZE=1 > /dev/null 2>&1";
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000680 system "cp report.nightly.raw.out $OldenTestsLog";
Chris Lattner196a14a2003-08-19 15:08:34 +0000681 } else {
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000682 system "gunzip ${OldenTestsLog}.gz";
Chris Lattner196a14a2003-08-19 15:08:34 +0000683 }
684
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000685 # Now we know we have $OldenTestsLog as the raw output file. Split
Chris Lattner196a14a2003-08-19 15:08:34 +0000686 # it up into records and read the useful information.
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000687 my @Records = split />>> ========= /, ReadFile "$OldenTestsLog";
Chris Lattner196a14a2003-08-19 15:08:34 +0000688 shift @Records; # Delete the first (garbage) record
689
690 # Loop over all of the records, summarizing them into rows for the running
691 # totals file.
692 my $WallTimeRE = "[A-Za-z0-9.: ]+\\(([0-9.]+) wall clock";
693 foreach $Rec (@Records) {
Chris Lattner08e24762003-08-19 18:35:03 +0000694 my $rNATTime = GetRegex 'TEST-RESULT-nat-time: real\s*([.0-9m]+)', $Rec;
695 my $rCBETime = GetRegex 'TEST-RESULT-cbe-time: real\s*([.0-9m]+)', $Rec;
696 my $rLLCTime = GetRegex 'TEST-RESULT-llc-time: real\s*([.0-9m]+)', $Rec;
697 my $rJITTime = GetRegex 'TEST-RESULT-jit-time: real\s*([.0-9m]+)', $Rec;
Chris Lattner196a14a2003-08-19 15:08:34 +0000698 my $rOptTime = GetRegex "TEST-RESULT-compile: $WallTimeRE", $Rec;
699 my $rBytecodeSize = GetRegex 'TEST-RESULT-compile: *([0-9]+)', $Rec;
700 my $rMachCodeSize = GetRegex 'TEST-RESULT-jit-machcode: *([0-9]+).*bytes of machine code', $Rec;
701
702 $NATTime .= " " . FormatTime($rNATTime);
703 $CBETime .= " " . FormatTime($rCBETime);
704 $LLCTime .= " " . FormatTime($rLLCTime);
705 $JITTime .= " " . FormatTime($rJITTime);
706 $OptTime .= " $rOptTime";
Chris Lattner08e24762003-08-19 18:35:03 +0000707 $BytecodeSize .= " $rBytecodeSize";
708 $MachCodeSize .= " $rMachCodeSize";
Chris Lattner196a14a2003-08-19 15:08:34 +0000709 }
710
711 # Now that we have all of the numbers we want, add them to the running totals
712 # files.
Chris Lattner08e24762003-08-19 18:35:03 +0000713 AddRecord($NATTime, "running_Olden_nat_time.txt");
Chris Lattner196a14a2003-08-19 15:08:34 +0000714 AddRecord($CBETime, "running_Olden_cbe_time.txt");
715 AddRecord($LLCTime, "running_Olden_llc_time.txt");
716 AddRecord($JITTime, "running_Olden_jit_time.txt");
717 AddRecord($OptTime, "running_Olden_opt_time.txt");
718 AddRecord($BytecodeSize, "running_Olden_bytecode.txt");
719 AddRecord($MachCodeSize, "running_Olden_machcode.txt");
Chris Lattner08e24762003-08-19 18:35:03 +0000720
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000721 system "gzip -f $OldenTestsLog";
Chris Lattner196a14a2003-08-19 15:08:34 +0000722}
723
724
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000725#
Chris Lattner4c7e3032003-01-20 06:11:03 +0000726# Get a list of the previous days that we can link to...
Chris Lattnerb3440302003-01-22 16:14:05 +0000727#
Chris Lattner2f8cb572003-01-20 18:05:27 +0000728my @PrevDays = map {s/.html//; $_} GetDir ".html";
Chris Lattner4c7e3032003-01-20 06:11:03 +0000729
Brian Gaeke253231e2004-06-11 19:55:30 +0000730if ((scalar @PrevDays) > 20) {
731 splice @PrevDays, 20; # Trim down list to something reasonable...
732}
Chris Lattner4c7e3032003-01-20 06:11:03 +0000733
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000734# Format list for sidebar
735my $PrevDaysList = join "\n ", map { "<a href=\"$_.html\">$_</a><br>" } @PrevDays;
Chris Lattner4c7e3032003-01-20 06:11:03 +0000736
Chris Lattnerc75b14e2003-08-18 20:07:54 +0000737#
738# Start outputing files into the web directory
739#
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000740ChangeDir( $WebDir, "Web Directory" );
Chris Lattnerc75b14e2003-08-18 20:07:54 +0000741
742# Add information to the files which accumulate information for graphs...
743AddRecord($LOC, "running_loc.txt");
744AddRecord($BuildTime, "running_build_time.txt");
745
Chris Lattner4d00fde2004-05-28 20:30:23 +0000746if ( $VERBOSE ) {
747 print "GRAPH GENERATION STAGE\n";
748}
Chris Lattnerc75b14e2003-08-18 20:07:54 +0000749#
750# Rebuild the graphs now...
751#
Brian Gaekeb3dab902003-10-11 05:34:00 +0000752$GNUPLOT = "/usr/dcs/software/supported/bin/gnuplot";
753$GNUPLOT = "gnuplot" if ! -x $GNUPLOT;
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000754system ("$GNUPLOT", $PlotScriptFilename);
Chris Lattnerb3440302003-01-22 16:14:05 +0000755
Chris Lattner4c7e3032003-01-20 06:11:03 +0000756#
757# Remove the cvs tree...
758#
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000759system ( "$NICE rm -rf $BuildDir") if (!$NOCHECKOUT and !$NOREMOVE);
Chris Lattner4c7e3032003-01-20 06:11:03 +0000760
Chris Lattnerb3440302003-01-22 16:14:05 +0000761#
Chris Lattner4c7e3032003-01-20 06:11:03 +0000762# Print out information...
Chris Lattnerb3440302003-01-22 16:14:05 +0000763#
Chris Lattner4d00fde2004-05-28 20:30:23 +0000764if ($VERBOSE) {
Chris Lattner4c7e3032003-01-20 06:11:03 +0000765 print "DateString: $DateString\n";
766 print "CVS Checkout: $CVSCheckoutTime seconds\n";
767 print "Files/Dirs/LOC in CVS: $NumFilesInCVS/$NumDirsInCVS/$LOC\n";
Chris Lattner4c7e3032003-01-20 06:11:03 +0000768 print "Build Time: $BuildTime seconds\n";
Chris Lattner4d00fde2004-05-28 20:30:23 +0000769 print "Feature Test Time: $FeatureTime seconds\n";
770 print "Regression Test Time: $RegressionTime seconds\n";
Chris Lattner4c7e3032003-01-20 06:11:03 +0000771 print "Libraries/Executables/Objects built: $NumLibraries/$NumExecutables/$NumObjects\n";
772
773 print "WARNINGS:\n $WarningsList\n";
774
Chris Lattner4c7e3032003-01-20 06:11:03 +0000775 print "Users committed: $UserCommitList\n";
776 print "Added Files: \n $AddedFilesList\n";
777 print "Modified Files: \n $ModifiedFilesList\n";
778 print "Removed Files: \n $RemovedFilesList\n";
779
780 print "Previous Days =\n $PrevDaysList\n";
781}
782
Chris Lattnerb3440302003-01-22 16:14:05 +0000783
Chris Lattner2f8cb572003-01-20 18:05:27 +0000784#
785# Output the files...
786#
787
Chris Lattner4d00fde2004-05-28 20:30:23 +0000788if ( $VERBOSE ) {
789 print "OUTPUT STAGE\n";
790}
Chris Lattner2f8cb572003-01-20 18:05:27 +0000791# Main HTML file...
Chris Lattner4c7e3032003-01-20 06:11:03 +0000792my $Output;
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000793my $TestFinishTime = gmtime;
794my $TestPlatform = `uname -a`;
Chris Lattner4c7e3032003-01-20 06:11:03 +0000795eval "\$Output = <<ENDOFFILE;$TemplateContents\nENDOFFILE\n";
Chris Lattner2f8cb572003-01-20 18:05:27 +0000796WriteFile "$DATE.html", $Output;
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000797system ( "ln -sf $DATE.html index.html" );
Chris Lattner4c7e3032003-01-20 06:11:03 +0000798
799# Change the index.html symlink...
Chris Lattner4c7e3032003-01-20 06:11:03 +0000800
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000801# vim: sw=2 ai