blob: 49d4c4b3629ee3731c6ac9c83bcbe01b891ffe2e [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 Lattner892cdb32004-07-27 08:29:06 +000035# -gccpath Path to gcc/g++ used to build LLVM
Chris Lattnerbb0aca52003-12-19 03:47:31 +000036#
Brian Gaekeb3dab902003-10-11 05:34:00 +000037# CVSROOT is the CVS repository from which the tree will be checked out,
38# specified either in the full :method:user@host:/dir syntax, or
39# just /dir if using a local repo.
40# BUILDDIR is the directory where sources for this test run will be checked out
41# AND objects for this test run will be built. This directory MUST NOT
42# exist before the script is run; it will be created by the cvs checkout
43# process and erased (unless -noremove is specified; see above.)
44# WEBDIR is the directory into which the test results web page will be written,
45# AND in which the "index.html" is assumed to be a symlink to the most recent
46# copy of the results. This directory MUST exist before the script is run.
Reid Spencercb6a3aa2004-06-22 15:38:37 +000047# LLVMGCCDIR is the directory in which the LLVM GCC Front End is installed
48# to. This is the same as you would have for a normal LLVM build.
Chris Lattner4c7e3032003-01-20 06:11:03 +000049#
50use POSIX qw(strftime);
51
Brian Gaekeb3dab902003-10-11 05:34:00 +000052my $HOME = $ENV{'HOME'};
53my $CVSRootDir = $ENV{'CVSROOT'};
Chris Lattner9d13efa2003-10-14 01:22:08 +000054 $CVSRootDir = "/home/vadve/shared/PublicCVS"
Chris Lattner4d00fde2004-05-28 20:30:23 +000055 unless $CVSRootDir;
56my $BuildDir = $ENV{'BUILDDIR'};
57 $BuildDir = "$HOME/buildtest"
58 unless $BuildDir;
59my $WebDir = $ENV{'WEBDIR'};
60 $WebDir = "$HOME/cvs/testresults-X86"
61 unless $WebDir;
Chris Lattner2f8cb572003-01-20 18:05:27 +000062
63# Calculate the date prefix...
64@TIME = localtime;
65my $DATE = sprintf "%4d-%02d-%02d", $TIME[5]+1900, $TIME[4]+1, $TIME[3];
66my $DateString = strftime "%B %d, %Y", localtime;
Reid Spencercb6a3aa2004-06-22 15:38:37 +000067my $TestStartTime = gmtime;
68
69# Command line argument settings...
70my $NOCHECKOUT = 0;
71my $NOREMOVE = 0;
72my $NOFEATURES = 0;
73my $NOREGRESSIONS = 0;
74my $NOTEST = 0;
75my $NORUNNINGTESTS = 0;
Reid Spencer1d914632004-06-23 07:45:46 +000076my $NOEXTERNALS = 0;
Reid Spencercb6a3aa2004-06-22 15:38:37 +000077my $MAKEOPTS = "";
78my $PROGTESTOPTS = "";
79my $VERBOSE = 0;
80my $DEBUG = 0;
81my $CONFIGUREARGS = "--enable-jit";
82my $NICE = "";
Chris Lattner2f8cb572003-01-20 18:05:27 +000083
Chris Lattnerb3440302003-01-22 16:14:05 +000084sub ReadFile {
85 if (open (FILE, $_[0])) {
Reid Spencercb6a3aa2004-06-22 15:38:37 +000086 undef $/;
Chris Lattnerb3440302003-01-22 16:14:05 +000087 my $Ret = <FILE>;
88 close FILE;
Reid Spencercb6a3aa2004-06-22 15:38:37 +000089 $/ = '\n';
Chris Lattnerb3440302003-01-22 16:14:05 +000090 return $Ret;
91 } else {
92 print "Could not open file '$_[0]' for reading!";
93 return "";
94 }
95}
96
Chris Lattner2f8cb572003-01-20 18:05:27 +000097sub WriteFile { # (filename, contents)
98 open (FILE, ">$_[0]") or die "Could not open file '$_[0]' for writing!";
99 print FILE $_[1];
100 close FILE;
101}
102
103sub GetRegex { # (Regex with ()'s, value)
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000104 $_[1] =~ /$_[0]/m;
Chris Lattner08e24762003-08-19 18:35:03 +0000105 if (defined($1)) {
106 return $1;
107 }
Reid Spencera337f0c2004-06-23 06:36:34 +0000108 return "0";
Chris Lattner2f8cb572003-01-20 18:05:27 +0000109}
110
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000111sub AddRecord {
112 my ($Val, $Filename) = @_;
113 my @Records;
114 if (open FILE, "$WebDir/$Filename") {
115 @Records = grep !/$DATE/, split "\n", <FILE>;
116 close FILE;
117 }
118 push @Records, "$DATE: $Val";
119 WriteFile "$WebDir/$Filename", (join "\n", @Records) . "\n";
120 return @Records;
121}
122
Chris Lattner2f8cb572003-01-20 18:05:27 +0000123sub AddPreTag { # Add pre tags around nonempty list, or convert to "none"
124 $_ = shift;
Chris Lattner1cbc0a62003-01-20 19:18:44 +0000125 if (length) { return "<ul><pre>$_</pre></ul>"; } else { "<b>none</b><br>"; }
Chris Lattner2f8cb572003-01-20 18:05:27 +0000126}
127
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000128sub ChangeDir { # directory, logical name
129 my ($dir,$name) = @_;
130 chomp($dir);
131 if ( $VERBOSE ) { print "Changing To: $name ($dir)\n"; }
132 chdir($dir) || die "Cannot change directory to: $name ($dir) ";
133}
134
Chris Lattner2f8cb572003-01-20 18:05:27 +0000135sub GetDir {
136 my $Suffix = shift;
137 opendir DH, $WebDir;
138 my @Result = reverse sort grep !/$DATE/, grep /[-0-9]+$Suffix/, readdir DH;
139 closedir DH;
140 return @Result;
141}
142
143# DiffFiles - Diff the current version of the file against the last version of
144# the file, reporting things added and removed. This is used to report, for
145# example, added and removed warnings. This returns a pair (added, removed)
146#
147sub DiffFiles {
148 my $Suffix = shift;
149 my @Others = GetDir $Suffix;
150 if (@Others == 0) { # No other files? We added all entries...
151 return (`cat $WebDir/$DATE$Suffix`, "");
152 }
153 # Diff the files now...
154 my @Diffs = split "\n", `diff $WebDir/$DATE$Suffix $WebDir/$Others[0]`;
155 my $Added = join "\n", grep /^</, @Diffs;
156 my $Removed = join "\n", grep /^>/, @Diffs;
Chris Lattner1cbc0a62003-01-20 19:18:44 +0000157 $Added =~ s/^< //gm;
158 $Removed =~ s/^> //gm;
Chris Lattner2f8cb572003-01-20 18:05:27 +0000159 return ($Added, $Removed);
160}
161
Chris Lattner196a14a2003-08-19 15:08:34 +0000162# FormatTime - Convert a time from 1m23.45 into 83.45
163sub FormatTime {
164 my $Time = shift;
165 if ($Time =~ m/([0-9]+)m([0-9.]+)/) {
166 $Time = sprintf("%7.4f", $1*60.0+$2);
167 }
168 return $Time;
169}
170
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000171sub GetRegexNum {
172 my ($Regex, $Num, $Regex2, $File) = @_;
173 my @Items = split "\n", `grep '$Regex' $File`;
174 return GetRegex $Regex2, $Items[$Num];
175}
176
Chris Lattner4d00fde2004-05-28 20:30:23 +0000177sub GetQMTestResults { # (filename)
178 my ($filename) = @_;
179 my @lines;
180 my $firstline;
181 $/ = "\n"; #Make sure we're going line at a time.
182 if (open SRCHFILE, $filename) {
Reid Spencer542e8592004-05-30 00:17:47 +0000183 # Skip stuff before ---TEST RESULTS
Chris Lattner4d00fde2004-05-28 20:30:23 +0000184 while ( <SRCHFILE> ) {
Reid Spenceraa0bfbe2004-05-31 20:59:55 +0000185 if ( m/^--- TEST RESULTS/ ) { last; }
Chris Lattner4d00fde2004-05-28 20:30:23 +0000186 }
Reid Spencer542e8592004-05-30 00:17:47 +0000187 # Process test results
Reid Spenceraa0bfbe2004-05-31 20:59:55 +0000188 push(@lines,"<h3>TEST RESULTS</h3><ol><li>\n");
189 my $first_list = 1;
190 my $should_break = 1;
Reid Spencerf5d0af32004-06-08 08:01:33 +0000191 my $nocopy = 0;
Chris Lattner4d00fde2004-05-28 20:30:23 +0000192 while ( <SRCHFILE> ) {
193 if ( length($_) > 1 ) {
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000194 chomp($_);
195 if ( ! m/: PASS[ ]*$/ &&
196 ! m/^ qmtest.target:/ &&
197 ! m/^ local/ &&
198 ! m/^gmake:/ ) {
199 if ( m/: XFAIL/ ) {
200 $nocopy = 1;
201 } elsif ( m/: XPASS/ || m/: FAIL/ ) {
202 $nocopy = 0;
203 if ( $first_list ) {
204 $first_list = 0;
205 $should_break = 1;
206 push(@lines,"<b>$_</b><br/>\n");
207 } else {
208 push(@lines,"</li><li><b>$_</b><br/>\n");
209 }
210 } elsif ( m/^--- STATISTICS/ ) {
211 if ( $first_list ) { push(@lines,"<b>PERFECT!</b>"); }
212 push(@lines,"</li></ol><h3>STATISTICS</h3><pre>\n");
213 $should_break = 0;
214 $nocopy = 0;
215 } elsif ( m/^--- TESTS WITH/ ) {
216 $should_break = 1;
217 $first_list = 1;
218 $nocopy = 0;
219 push(@lines,"</pre><h3>TESTS WITH UNEXPECTED RESULTS</h3><ol><li>\n");
220 } elsif ( m/^real / ) {
221 last;
222 } elsif (!$nocopy) {
223 if ( $should_break ) {
224 push(@lines,"$_<br/>\n");
225 } else {
226 push(@lines,"$_\n");
227 }
228 }
229 }
Chris Lattner4d00fde2004-05-28 20:30:23 +0000230 }
231 }
232 close SRCHFILE;
233 }
234 my $content = join("",@lines);
Reid Spencerf5d0af32004-06-08 08:01:33 +0000235 return "$content</li></ol>\n";
236}
Chris Lattner4d00fde2004-05-28 20:30:23 +0000237
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000238
239#####################################################################
240## MAIN PROGRAM
241#####################################################################
242
243my $Template = "";
244my $PlotScriptFilename = "";
245
246# Parse arguments...
247while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) {
248 shift;
249 last if /^--$/; # Stop processing arguments on --
250
251 # List command line options here...
252 if (/^-nocheckout$/) { $NOCHECKOUT = 1; next; }
253 if (/^-noremove$/) { $NOREMOVE = 1; next; }
254 if (/^-nofeaturetests$/) { $NOFEATURES = 1; next; }
255 if (/^-noregressiontests$/){ $NOREGRESSIONS = 1; next; }
256 if (/^-notest$/) { $NOTEST = 1; $NORUNNINGTESTS = 1; next; }
257 if (/^-norunningtests$/) { $NORUNNINGTESTS = 1; next; }
258 if (/^-parallel$/) { $MAKEOPTS = "$MAKEOPTS -j2 -l3.0"; next; }
259 if (/^-release$/) { $MAKEOPTS = "$MAKEOPTS ENABLE_OPTIMIZED=1"; next; }
260 if (/^-pedantic$/) {
261 $MAKEOPTS = "$MAKEOPTS CompileOptimizeOpts='-O3 -DNDEBUG -finline-functions -Wpointer-arith -Wcast-align -Wno-deprecated -Wold-style-cast -Wabi -Woverloaded-virtual -ffor-scope'";
262 next;
263 }
264 if (/^-enable-linscan$/) { $PROGTESTOPTS .= " ENABLE_LINEARSCAN=1"; next; }
265 if (/^-disable-codegen$/){ $PROGTESTOPTS .= " DISABLE_JIT=1 DISABLE_LLC=1";
266 $CONFIGUREARGS="--disable-jit --disable-llc_diffs";
267 next; }
268 if (/^-verbose$/) { $VERBOSE = 1; next; }
269 if (/^-debug$/) { $DEBUG = 1; next; }
270 if (/^-nice$/) { $NICE = "nice "; next; }
271 if (/^-gnuplotscript$/) { $PlotScriptFilename = $ARGV[0]; shift; next; }
Reid Spencerc5b67052004-06-23 14:07:12 +0000272 if (/^-templatefile$/) { $Template = $ARGV[0]; shift; next; }
Chris Lattner892cdb32004-07-27 08:29:06 +0000273 if (/^-gccpath/) { $CONFIGUREARGS=" CC=$ARGV[0]/gcc CXX=$ARGV[0]/g++"; shift; next; }
Reid Spencer1d914632004-06-23 07:45:46 +0000274 if (/^-noexternals$/) { $NOEXTERNALS = 1; next; }
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000275
276 print "Unknown option: $_ : ignoring!\n";
277}
278
279if ($ENV{'LLVMGCCDIR'}) {
280 $CONFIGUREARGS .= " --with-llvmgccdir=" . $ENV{'LLVMGCCDIR'};
281}
282
283die "Must specify 0 or 3 options!" if (@ARGV != 0 and @ARGV != 3);
284
285if (@ARGV == 3) {
286 $CVSRootDir = $ARGV[0];
287 $BuildDir = $ARGV[1];
288 $WebDir = $ARGV[2];
289}
290
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000291my $Prefix = "$WebDir/$DATE";
292
293#define the file names we'll use
294my $BuildLog = "$Prefix-Build-Log.txt";
295my $CVSLog = "$Prefix-CVS-Log.txt";
296my $FeatureTestsLog = "$Prefix-FeatureTests-Log.txt";
297my $RegressionTestsLog = "$Prefix-RegressionTests-Log.txt";
298my $OldenTestsLog = "$Prefix-Olden-tests.txt";
299my $SingleSourceLog = "$Prefix-SingleSource-ProgramTest.txt.gz";
300my $MultiSourceLog = "$Prefix-MultiSource-ProgramTest.txt.gz";
301my $ExternalLog = "$Prefix-External-ProgramTest.txt.gz";
302
303if ($VERBOSE) {
304 print "INITIALIZED\n";
305 print "CVS Root = $CVSRootDir\n";
306 print "BuildDir = $BuildDir\n";
307 print "WebDir = $WebDir\n";
308 print "Prefix = $Prefix\n";
309 print "CVSLog = $CVSLog\n";
310 print "BuildLog = $BuildLog\n";
311}
312
313
314#
315# Create the CVS repository directory
316#
317if (!$NOCHECKOUT) {
318 if (-d $BuildDir) {
319 if (!$NOREMOVE) {
320 system "rm -rf $BuildDir";
321 } else {
322 die "CVS checkout directory $BuildDir already exists!";
323 }
324 }
325 mkdir $BuildDir or die "Could not create CVS checkout directory $BuildDir!";
326}
327
328ChangeDir( $BuildDir, "CVS checkout directory" );
329
330
331#
332# Check out the llvm tree, saving CVS messages to the cvs log...
333#
334$CVSOPT = "";
335$CVSOPT = "-z3" if $CVSRootDir =~ /^:ext:/; # Use compression if going over ssh.
336if (!$NOCHECKOUT) {
337 if ( $VERBOSE ) { print "CHECKOUT STAGE\n"; }
338 system "(time -p $NICE cvs $CVSOPT -d $CVSRootDir co llvm) > $CVSLog 2>&1";
339}
340
341ChangeDir( "llvm" , "llvm source directory") ;
342
343if (!$NOCHECKOUT) {
344 if ( $VERBOSE ) { print "UPDATE STAGE\n"; }
345 system "$NICE cvs update -P -d >> $CVSLog 2>&1" ;
346}
347
Reid Spencerc5b67052004-06-23 14:07:12 +0000348if ( $Template eq "" ) {
349 $Template = "$BuildDir/llvm/utils/NightlyTestTemplate.html";
350}
351die "Template file $Template is not readable" if ( ! -r "$Template" );
352
353if ( $PlotScriptFilename eq "" ) {
354 $PlotScriptFilename = "$BuildDir/llvm/utils/NightlyTest.gnuplot";
355}
356die "GNUPlot Script $PlotScriptFilename is not readable" if ( ! -r "$PlotScriptFilename" );
357
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000358# Read in the HTML template file...
359if ( $VERBOSE ) { print "READING TEMPLATE\n"; }
360my $TemplateContents = ReadFile $Template;
361
362#
363# Get some static statistics about the current state of CVS
364#
365my $CVSCheckoutTime = GetRegex "([0-9.]+)", `grep '^real' $CVSLog`;
366my $NumFilesInCVS = `egrep '^U' $CVSLog | wc -l` + 0;
367my $NumDirsInCVS = `egrep '^cvs (checkout|server|update):' $CVSLog | wc -l` + 0;
368$LOC = GetRegex "([0-9]+) +total", `wc -l \`utils/getsrcs.sh\` | grep total`;
369
370#
371# Build the entire tree, saving build messages to the build log
372#
373if (!$NOCHECKOUT) {
374 if ( $VERBOSE ) { print "CONFIGURE STAGE\n"; }
375 system "(time -p $NICE ./configure $CONFIGUREARGS --enable-spec --with-objroot=.) > $BuildLog 2>&1";
376
377 if ( $VERBOSE ) { print "BUILD STAGE\n"; }
378 # Build the entire tree, capturing the output into $BuildLog
379 system "(time -p $NICE gmake $MAKEOPTS) >> $BuildLog 2>&1";
380}
381
382
383#
384# Get some statistics about the build...
385#
386my @Linked = split '\n', `grep Linking $BuildLog`;
387my $NumExecutables = scalar(grep(/executable/, @Linked));
388my $NumLibraries = scalar(grep(!/executable/, @Linked));
389my $NumObjects = `grep '^Compiling' $BuildLog | wc -l` + 0;
390
391my $ConfigTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$BuildLog";
392my $ConfigTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$BuildLog";
393my $ConfigTime = $ConfigTimeU+$ConfigTimeS; # ConfigTime = User+System
394my $ConfigWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$BuildLog";
395
396my $BuildTimeU = GetRegexNum "^user", 1, "([0-9.]+)", "$BuildLog";
397my $BuildTimeS = GetRegexNum "^sys", 1, "([0-9.]+)", "$BuildLog";
398my $BuildTime = $BuildTimeU+$BuildTimeS; # BuildTime = User+System
399my $BuildWallTime = GetRegexNum "^real", 1, "([0-9.]+)","$BuildLog";
400
401my $BuildError = "";
402if (`grep '^gmake[^:]*: .*Error' $BuildLog | wc -l` + 0 ||
403 `grep '^gmake: \*\*\*.*Stop.' $BuildLog | wc -l`+0) {
404 $BuildError = "<h3><font color='red'>Build error: compilation " .
405 "<a href=\"$DATE-Build-Log.txt\">aborted</a></font></h3>";
406 if ($VERBOSE) { print "BUILD ERROR\n"; }
407}
408
Brian Gaeke22800982004-06-25 07:25:28 +0000409if ($BuildError) { $NOFEATURES = 1; $NOREGRESSIONS = 1; }
410
Chris Lattner4d00fde2004-05-28 20:30:23 +0000411# Get results of feature tests.
412my $FeatureTestResults; # String containing the results of the feature tests
413my $FeatureTime; # System+CPU Time for feature tests
414my $FeatureWallTime; # Wall Clock Time for feature tests
415if (!$NOFEATURES) {
416 if ( $VERBOSE ) { print "FEATURE TEST STAGE\n"; }
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000417 my $feature_output = "$FeatureTestsLog";
Chris Lattner4d00fde2004-05-28 20:30:23 +0000418
419 # Run the feature tests so we can summarize the results
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000420 system "(time -p gmake $MAKEOPTS -C test Feature.t) > $feature_output 2>&1";
Chris Lattner4d00fde2004-05-28 20:30:23 +0000421
422 # Extract test results
423 $FeatureTestResults = GetQMTestResults("$feature_output");
424
425 # Extract time of feature tests
426 my $FeatureTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$feature_output";
427 my $FeatureTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$feature_output";
428 $FeatureTime = $FeatureTimeU+$FeatureTimeS; # FeatureTime = User+System
429 $FeatureWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$feature_output";
430 # Run the regression tests so we can summarize the results
431} else {
432 $FeatureTestResults = "Skipped by user choice.";
433 $FeatureTime = "0.0";
434 $FeatureWallTime = "0.0";
435}
436
437if (!$NOREGRESSIONS) {
438 if ( $VERBOSE ) { print "REGRESSION TEST STAGE\n"; }
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000439 my $regression_output = "$RegressionTestsLog";
Chris Lattner4d00fde2004-05-28 20:30:23 +0000440
441 # Run the regression tests so we can summarize the results
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000442 system "(time -p gmake $MAKEOPTS -C test Regression.t) > $regression_output 2>&1";
Chris Lattner4d00fde2004-05-28 20:30:23 +0000443
444 # Extract test results
445 $RegressionTestResults = GetQMTestResults("$regression_output");
446
447 # Extract time of regressions tests
448 my $RegressionTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$regression_output";
449 my $RegressionTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$regression_output";
450 $RegressionTime = $RegressionTimeU+$RegressionTimeS; # RegressionTime = User+System
451 $RegressionWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$regression_output";
452} else {
453 $RegressionTestResults = "Skipped by user choice.";
454 $RegressionTime = "0.0";
455 $RegressionWallTime = "0.0";
456}
457
458if ($DEBUG) {
459 print $FeatureTestResults;
460 print $RegressionTestResults;
461}
462
463if ( $VERBOSE ) { print "BUILD INFORMATION COLLECTION STAGE\n"; }
Chris Lattnerb3440302003-01-22 16:14:05 +0000464#
Chris Lattner4c7e3032003-01-20 06:11:03 +0000465# Get warnings from the build
Chris Lattnerb3440302003-01-22 16:14:05 +0000466#
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000467my @Warn = split "\n", `egrep 'warning:|Entering dir' $BuildLog`;
Chris Lattner4c7e3032003-01-20 06:11:03 +0000468my @Warnings;
469my $CurDir = "";
470
471foreach $Warning (@Warn) {
472 if ($Warning =~ m/Entering directory \`([^\`]+)\'/) {
473 $CurDir = $1; # Keep track of directory warning is in...
Misha Brukman8e9554a2003-08-14 15:26:28 +0000474 if ($CurDir =~ m#$BuildDir/llvm/(.*)#) { # Remove buildir prefix if included
Chris Lattner4c7e3032003-01-20 06:11:03 +0000475 $CurDir = $1;
476 }
477 } else {
478 push @Warnings, "$CurDir/$Warning"; # Add directory to warning...
479 }
480}
Chris Lattner1cbc0a62003-01-20 19:18:44 +0000481my $WarningsFile = join "\n", @Warnings;
482my $WarningsList = AddPreTag $WarningsFile;
483$WarningsFile =~ s/:[0-9]+:/::/g;
Chris Lattner4c7e3032003-01-20 06:11:03 +0000484
Chris Lattner2f8cb572003-01-20 18:05:27 +0000485# Emit the warnings file, so we can diff...
486WriteFile "$WebDir/$DATE-Warnings.txt", $WarningsFile . "\n";
487my ($WarningsAdded, $WarningsRemoved) = DiffFiles "-Warnings.txt";
Chris Lattner4c7e3032003-01-20 06:11:03 +0000488
Chris Lattner9efd7f42003-10-18 19:31:39 +0000489# Output something to stdout if something has changed
490print "ADDED WARNINGS:\n$WarningsAdded\n\n" if (length $WarningsAdded);
491print "REMOVED WARNINGS:\n$WarningsRemoved\n\n" if (length $WarningsRemoved);
492
Chris Lattnerbe197872003-10-19 16:54:00 +0000493$WarningsAdded = AddPreTag $WarningsAdded;
494$WarningsRemoved = AddPreTag $WarningsRemoved;
Chris Lattnerb3440302003-01-22 16:14:05 +0000495
496#
Chris Lattner4c7e3032003-01-20 06:11:03 +0000497# Get some statistics about CVS commits over the current day...
Chris Lattnerb3440302003-01-22 16:14:05 +0000498#
Chris Lattner4d00fde2004-05-28 20:30:23 +0000499if ($VERBOSE) { print "CVS HISTORY ANALYSIS STAGE\n"; }
Chris Lattner4c7e3032003-01-20 06:11:03 +0000500@CVSHistory = split "\n", `cvs history -D '1 day ago' -a -xAMROCGUW`;
501#print join "\n", @CVSHistory; print "\n";
502
503# Extract some information from the CVS history... use a hash so no duplicate
504# stuff is stored.
Misha Brukman1b366892003-07-07 21:27:40 +0000505my (%AddedFiles, %ModifiedFiles, %RemovedFiles, %UsersCommitted, %UsersUpdated);
Chris Lattner4c7e3032003-01-20 06:11:03 +0000506
Brian Gaeke43f38672004-06-10 07:44:28 +0000507my $DateRE = '[-/:0-9 ]+\+[0-9]+';
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000508
Chris Lattner4c7e3032003-01-20 06:11:03 +0000509# Loop over every record from the CVS history, filling in the hashes.
510foreach $File (@CVSHistory) {
511 my ($Type, $Date, $UID, $Rev, $Filename);
Misha Brukman8e9554a2003-08-14 15:26:28 +0000512 if ($File =~ /([AMRUGC]) ($DateRE) ([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+)/) {
Chris Lattner4c7e3032003-01-20 06:11:03 +0000513 ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, $4, "$6/$5");
Chris Lattnerd56147d2004-01-12 16:55:30 +0000514 } elsif ($File =~ /([W]) ($DateRE) ([^ ]+)/) {
515 ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, "", "");
Misha Brukman1b366892003-07-07 21:27:40 +0000516 } elsif ($File =~ /([O]) ($DateRE) ([^ ]+) +([^ ]+)/) {
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000517 ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, "", "$4/");
Chris Lattner4c7e3032003-01-20 06:11:03 +0000518 } else {
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000519 print "UNMATCHABLE: $File\n";
Brian Gaeke43f38672004-06-10 07:44:28 +0000520 next;
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000521 }
522 # print "$File\nTy = $Type Date = '$Date' UID=$UID Rev=$Rev File = '$Filename'\n";
523
524 if ($Filename =~ /^llvm/) {
525 if ($Type eq 'M') { # Modified
526 $ModifiedFiles{$Filename} = 1;
527 $UsersCommitted{$UID} = 1;
528 } elsif ($Type eq 'A') { # Added
529 $AddedFiles{$Filename} = 1;
530 $UsersCommitted{$UID} = 1;
531 } elsif ($Type eq 'R') { # Removed
532 $RemovedFiles{$Filename} = 1;
533 $UsersCommitted{$UID} = 1;
534 } else {
535 $UsersUpdated{$UID} = 1;
536 }
Chris Lattner4c7e3032003-01-20 06:11:03 +0000537 }
538}
539
Chris Lattner1cbc0a62003-01-20 19:18:44 +0000540my $UserCommitList = join "\n", keys %UsersCommitted;
541my $UserUpdateList = join "\n", keys %UsersUpdated;
Chris Lattnerc9cdadf2003-08-06 16:02:50 +0000542my $AddedFilesList = AddPreTag join "\n", sort keys %AddedFiles;
543my $ModifiedFilesList = AddPreTag join "\n", sort keys %ModifiedFiles;
544my $RemovedFilesList = AddPreTag join "\n", sort keys %RemovedFiles;
Chris Lattner4c7e3032003-01-20 06:11:03 +0000545
Chris Lattnerec0e3742003-02-28 20:30:20 +0000546my $TestError = 1;
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000547my $SingleSourceProgramsTable = "!";
548my $MultiSourceProgramsTable = "!";
549my $ExternalProgramsTable = "!";
Chris Lattnerb3440302003-01-22 16:14:05 +0000550
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000551
552sub TestDirectory {
553 my $SubDir = shift;
554
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000555 ChangeDir( "test/Programs/$SubDir", "Programs Test Subdirectory" );
556
557 my $ProgramTestLog = "$Prefix-$SubDir-ProgramTest.txt";
Chris Lattnerec0e3742003-02-28 20:30:20 +0000558
559 # Run the programs tests... creating a report.nightly.html file
560 if (!$NOTEST) {
Chris Lattner20d13ea2004-06-03 03:29:39 +0000561 system "gmake -k $MAKEOPTS $PROGTESTOPTS report.nightly.html "
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000562 . "TEST=nightly > $ProgramTestLog 2>&1";
Chris Lattnerec0e3742003-02-28 20:30:20 +0000563 } else {
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000564 system "gunzip ${ProgramTestLog}.gz";
Chris Lattnerec0e3742003-02-28 20:30:20 +0000565 }
566
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000567 my $ProgramsTable;
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000568 if (`grep '^gmake[^:]: .*Error' $ProgramTestLog | wc -l` + 0){
Chris Lattnerec0e3742003-02-28 20:30:20 +0000569 $TestError = 1;
Chris Lattner2e8be142003-05-10 21:40:10 +0000570 $ProgramsTable = "<font color=white><h2>Error running tests!</h2></font>";
Chris Lattnerbe197872003-10-19 16:54:00 +0000571 print "ERROR TESTING\n";
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000572 } elsif (`grep '^gmake[^:]: .*No rule to make target' $ProgramTestLog | wc -l` + 0) {
Chris Lattner6e51bfa2003-05-11 15:23:10 +0000573 $TestError = 1;
574 $ProgramsTable =
575 "<font color=white><h2>Makefile error running tests!</h2></font>";
Chris Lattnerbe197872003-10-19 16:54:00 +0000576 print "ERROR TESTING\n";
Chris Lattner6e51bfa2003-05-11 15:23:10 +0000577 } else {
Chris Lattnerec0e3742003-02-28 20:30:20 +0000578 $TestError = 0;
579 $ProgramsTable = ReadFile "report.nightly.html";
580
581 #
582 # Create a list of the tests which were run...
583 #
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000584 system "egrep 'TEST-(PASS|FAIL)' < $ProgramTestLog "
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000585 . "| sort > $Prefix-$SubDir-Tests.txt";
Chris Lattnerec0e3742003-02-28 20:30:20 +0000586 }
587
588 # Compress the test output
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000589 system "gzip -f $ProgramTestLog";
590 ChangeDir( "../../..", "Programs Test Parent Directory" );
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000591 return $ProgramsTable;
592}
593
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000594# If we built the tree successfully, run the nightly programs tests...
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000595if ($BuildError eq "") {
Chris Lattner4d00fde2004-05-28 20:30:23 +0000596 if ( $VERBOSE ) {
597 print "SingleSource TEST STAGE\n";
598 }
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000599 $SingleSourceProgramsTable = TestDirectory("SingleSource");
Chris Lattner4d00fde2004-05-28 20:30:23 +0000600 if ( $VERBOSE ) {
601 print "MultiSource TEST STAGE\n";
602 }
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000603 $MultiSourceProgramsTable = TestDirectory("MultiSource");
Reid Spencer1d914632004-06-23 07:45:46 +0000604 if ( ! $NOEXTERNALS ) {
605 if ( $VERBOSE ) {
606 print "External TEST STAGE\n";
607 }
608 $ExternalProgramsTable = TestDirectory("External");
609 system "cat $Prefix-SingleSource-Tests.txt $Prefix-MultiSource-Tests.txt ".
Chris Lattnereac3cdc2003-08-21 15:55:26 +0000610 " $Prefix-External-Tests.txt | sort > $Prefix-Tests.txt";
Reid Spencer1d914632004-06-23 07:45:46 +0000611 } else {
612 if ( $VERBOSE ) {
613 print "External TEST STAGE SKIPPED\n";
614 }
615 system "cat $Prefix-SingleSource-Tests.txt $Prefix-MultiSource-Tests.txt ".
616 " | sort > $Prefix-Tests.txt";
617 }
Chris Lattner5d6c4382003-01-23 19:31:28 +0000618}
Chris Lattnerb3440302003-01-22 16:14:05 +0000619
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000620if ( $VERBOSE ) { print "TEST INFORMATION COLLECTION STAGE\n"; }
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000621my ($TestsAdded, $TestsRemoved, $TestsFixed, $TestsBroken) = ("","","","");
622
Chris Lattnerec0e3742003-02-28 20:30:20 +0000623if ($TestError) {
624 $TestsAdded = "<b>error testing</b><br>";
625 $TestsRemoved = "<b>error testing</b><br>";
626 $TestsFixed = "<b>error testing</b><br>";
627 $TestsBroken = "<b>error testing</b><br>";
628} else {
629 my ($RTestsAdded, $RTestsRemoved) = DiffFiles "-Tests.txt";
630
631 my @RawTestsAddedArray = split '\n', $RTestsAdded;
632 my @RawTestsRemovedArray = split '\n', $RTestsRemoved;
633
634 my %OldTests = map {GetRegex('TEST-....: (.+)', $_)=>$_}
635 @RawTestsRemovedArray;
636 my %NewTests = map {GetRegex('TEST-....: (.+)', $_)=>$_}
637 @RawTestsAddedArray;
638
639 foreach $Test (keys %NewTests) {
640 if (!exists $OldTests{$Test}) { # TestAdded if in New but not old
641 $TestsAdded = "$TestsAdded$Test\n";
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000642 } else {
Chris Lattnerec0e3742003-02-28 20:30:20 +0000643 if ($OldTests{$Test} =~ /TEST-PASS/) { # Was the old one a pass?
644 $TestsBroken = "$TestsBroken$Test\n"; # New one must be a failure
645 } else {
646 $TestsFixed = "$TestsFixed$Test\n"; # No, new one is a pass.
647 }
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000648 }
649 }
Chris Lattnerec0e3742003-02-28 20:30:20 +0000650 foreach $Test (keys %OldTests) { # TestRemoved if in Old but not New
651 $TestsRemoved = "$TestsRemoved$Test\n" if (!exists $NewTests{$Test});
652 }
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000653
Chris Lattner91480ff2003-10-21 15:47:31 +0000654 print "\nTESTS ADDED: \n\n$TestsAdded\n\n" if (length $TestsAdded);
655 print "\nTESTS REMOVED:\n\n$TestsRemoved\n\n" if (length $TestsRemoved);
656 print "\nTESTS FIXED: \n\n$TestsFixed\n\n" if (length $TestsFixed);
657 print "\nTESTS BROKEN: \n\n$TestsBroken\n\n" if (length $TestsBroken);
Chris Lattnerbe197872003-10-19 16:54:00 +0000658
Chris Lattnerec0e3742003-02-28 20:30:20 +0000659 $TestsAdded = AddPreTag $TestsAdded;
660 $TestsRemoved = AddPreTag $TestsRemoved;
661 $TestsFixed = AddPreTag $TestsFixed;
662 $TestsBroken = AddPreTag $TestsBroken;
663}
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000664
Chris Lattner9efd7f42003-10-18 19:31:39 +0000665
Chris Lattner196a14a2003-08-19 15:08:34 +0000666# If we built the tree successfully, runs of the Olden suite with
667# LARGE_PROBLEM_SIZE on so that we can get some "running" statistics.
668if ($BuildError eq "") {
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000669 if ( $VERBOSE ) { print "OLDEN TEST SUITE STAGE\n"; }
Chris Lattner08e24762003-08-19 18:35:03 +0000670 my ($NATTime, $CBETime, $LLCTime, $JITTime, $OptTime, $BytecodeSize,
Chris Lattner196a14a2003-08-19 15:08:34 +0000671 $MachCodeSize) = ("","","","","","","");
Chris Lattner08e24762003-08-19 18:35:03 +0000672 if (!$NORUNNINGTESTS) {
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000673 ChangeDir( "$BuildDir/llvm/test/Programs/MultiSource/Benchmarks/Olden",
674 "Olden Test Directory");
Chris Lattner196a14a2003-08-19 15:08:34 +0000675
676 # Clean out previous results...
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000677 system "$NICE gmake $MAKEOPTS clean > /dev/null 2>&1";
Chris Lattner196a14a2003-08-19 15:08:34 +0000678
679 # Run the nightly test in this directory, with LARGE_PROBLEM_SIZE enabled!
Brian Gaeke85668542004-06-04 00:07:12 +0000680 system "gmake -k $MAKEOPTS $PROGTESTOPTS report.nightly.raw.out TEST=nightly " .
Chris Lattner196a14a2003-08-19 15:08:34 +0000681 " LARGE_PROBLEM_SIZE=1 > /dev/null 2>&1";
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000682 system "cp report.nightly.raw.out $OldenTestsLog";
Chris Lattner196a14a2003-08-19 15:08:34 +0000683 } else {
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000684 system "gunzip ${OldenTestsLog}.gz";
Chris Lattner196a14a2003-08-19 15:08:34 +0000685 }
686
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000687 # Now we know we have $OldenTestsLog as the raw output file. Split
Chris Lattner196a14a2003-08-19 15:08:34 +0000688 # it up into records and read the useful information.
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000689 my @Records = split />>> ========= /, ReadFile "$OldenTestsLog";
Chris Lattner196a14a2003-08-19 15:08:34 +0000690 shift @Records; # Delete the first (garbage) record
691
692 # Loop over all of the records, summarizing them into rows for the running
693 # totals file.
694 my $WallTimeRE = "[A-Za-z0-9.: ]+\\(([0-9.]+) wall clock";
695 foreach $Rec (@Records) {
Chris Lattner08e24762003-08-19 18:35:03 +0000696 my $rNATTime = GetRegex 'TEST-RESULT-nat-time: real\s*([.0-9m]+)', $Rec;
697 my $rCBETime = GetRegex 'TEST-RESULT-cbe-time: real\s*([.0-9m]+)', $Rec;
698 my $rLLCTime = GetRegex 'TEST-RESULT-llc-time: real\s*([.0-9m]+)', $Rec;
699 my $rJITTime = GetRegex 'TEST-RESULT-jit-time: real\s*([.0-9m]+)', $Rec;
Chris Lattner196a14a2003-08-19 15:08:34 +0000700 my $rOptTime = GetRegex "TEST-RESULT-compile: $WallTimeRE", $Rec;
701 my $rBytecodeSize = GetRegex 'TEST-RESULT-compile: *([0-9]+)', $Rec;
702 my $rMachCodeSize = GetRegex 'TEST-RESULT-jit-machcode: *([0-9]+).*bytes of machine code', $Rec;
703
704 $NATTime .= " " . FormatTime($rNATTime);
705 $CBETime .= " " . FormatTime($rCBETime);
706 $LLCTime .= " " . FormatTime($rLLCTime);
707 $JITTime .= " " . FormatTime($rJITTime);
708 $OptTime .= " $rOptTime";
Chris Lattner08e24762003-08-19 18:35:03 +0000709 $BytecodeSize .= " $rBytecodeSize";
710 $MachCodeSize .= " $rMachCodeSize";
Chris Lattner196a14a2003-08-19 15:08:34 +0000711 }
712
713 # Now that we have all of the numbers we want, add them to the running totals
714 # files.
Chris Lattner08e24762003-08-19 18:35:03 +0000715 AddRecord($NATTime, "running_Olden_nat_time.txt");
Chris Lattner196a14a2003-08-19 15:08:34 +0000716 AddRecord($CBETime, "running_Olden_cbe_time.txt");
717 AddRecord($LLCTime, "running_Olden_llc_time.txt");
718 AddRecord($JITTime, "running_Olden_jit_time.txt");
719 AddRecord($OptTime, "running_Olden_opt_time.txt");
720 AddRecord($BytecodeSize, "running_Olden_bytecode.txt");
721 AddRecord($MachCodeSize, "running_Olden_machcode.txt");
Chris Lattner08e24762003-08-19 18:35:03 +0000722
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000723 system "gzip -f $OldenTestsLog";
Chris Lattner196a14a2003-08-19 15:08:34 +0000724}
725
726
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000727#
Chris Lattner4c7e3032003-01-20 06:11:03 +0000728# Get a list of the previous days that we can link to...
Chris Lattnerb3440302003-01-22 16:14:05 +0000729#
Chris Lattner2f8cb572003-01-20 18:05:27 +0000730my @PrevDays = map {s/.html//; $_} GetDir ".html";
Chris Lattner4c7e3032003-01-20 06:11:03 +0000731
Brian Gaeke253231e2004-06-11 19:55:30 +0000732if ((scalar @PrevDays) > 20) {
733 splice @PrevDays, 20; # Trim down list to something reasonable...
734}
Chris Lattner4c7e3032003-01-20 06:11:03 +0000735
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000736# Format list for sidebar
737my $PrevDaysList = join "\n ", map { "<a href=\"$_.html\">$_</a><br>" } @PrevDays;
Chris Lattner4c7e3032003-01-20 06:11:03 +0000738
Chris Lattnerc75b14e2003-08-18 20:07:54 +0000739#
740# Start outputing files into the web directory
741#
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000742ChangeDir( $WebDir, "Web Directory" );
Chris Lattnerc75b14e2003-08-18 20:07:54 +0000743
744# Add information to the files which accumulate information for graphs...
745AddRecord($LOC, "running_loc.txt");
746AddRecord($BuildTime, "running_build_time.txt");
747
Chris Lattner4d00fde2004-05-28 20:30:23 +0000748if ( $VERBOSE ) {
749 print "GRAPH GENERATION STAGE\n";
750}
Chris Lattnerc75b14e2003-08-18 20:07:54 +0000751#
752# Rebuild the graphs now...
753#
Chris Lattnerfe2597a2004-07-27 18:41:49 +0000754$GNUPLOT = "/usr/bin/gnuplot";
Brian Gaekeb3dab902003-10-11 05:34:00 +0000755$GNUPLOT = "gnuplot" if ! -x $GNUPLOT;
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000756system ("$GNUPLOT", $PlotScriptFilename);
Chris Lattnerb3440302003-01-22 16:14:05 +0000757
Chris Lattner4c7e3032003-01-20 06:11:03 +0000758#
759# Remove the cvs tree...
760#
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000761system ( "$NICE rm -rf $BuildDir") if (!$NOCHECKOUT and !$NOREMOVE);
Chris Lattner4c7e3032003-01-20 06:11:03 +0000762
Chris Lattnerb3440302003-01-22 16:14:05 +0000763#
Chris Lattner4c7e3032003-01-20 06:11:03 +0000764# Print out information...
Chris Lattnerb3440302003-01-22 16:14:05 +0000765#
Chris Lattner4d00fde2004-05-28 20:30:23 +0000766if ($VERBOSE) {
Chris Lattner4c7e3032003-01-20 06:11:03 +0000767 print "DateString: $DateString\n";
768 print "CVS Checkout: $CVSCheckoutTime seconds\n";
769 print "Files/Dirs/LOC in CVS: $NumFilesInCVS/$NumDirsInCVS/$LOC\n";
Chris Lattner4c7e3032003-01-20 06:11:03 +0000770 print "Build Time: $BuildTime seconds\n";
Chris Lattner4d00fde2004-05-28 20:30:23 +0000771 print "Feature Test Time: $FeatureTime seconds\n";
772 print "Regression Test Time: $RegressionTime seconds\n";
Chris Lattner4c7e3032003-01-20 06:11:03 +0000773 print "Libraries/Executables/Objects built: $NumLibraries/$NumExecutables/$NumObjects\n";
774
775 print "WARNINGS:\n $WarningsList\n";
776
Chris Lattner4c7e3032003-01-20 06:11:03 +0000777 print "Users committed: $UserCommitList\n";
778 print "Added Files: \n $AddedFilesList\n";
779 print "Modified Files: \n $ModifiedFilesList\n";
780 print "Removed Files: \n $RemovedFilesList\n";
781
782 print "Previous Days =\n $PrevDaysList\n";
783}
784
Chris Lattnerb3440302003-01-22 16:14:05 +0000785
Chris Lattner2f8cb572003-01-20 18:05:27 +0000786#
787# Output the files...
788#
789
Chris Lattner4d00fde2004-05-28 20:30:23 +0000790if ( $VERBOSE ) {
791 print "OUTPUT STAGE\n";
792}
Chris Lattner2f8cb572003-01-20 18:05:27 +0000793# Main HTML file...
Chris Lattner4c7e3032003-01-20 06:11:03 +0000794my $Output;
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000795my $TestFinishTime = gmtime;
796my $TestPlatform = `uname -a`;
Chris Lattner4c7e3032003-01-20 06:11:03 +0000797eval "\$Output = <<ENDOFFILE;$TemplateContents\nENDOFFILE\n";
Chris Lattner2f8cb572003-01-20 18:05:27 +0000798WriteFile "$DATE.html", $Output;
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000799system ( "ln -sf $DATE.html index.html" );
Chris Lattner4c7e3032003-01-20 06:11:03 +0000800
801# Change the index.html symlink...
Chris Lattner4c7e3032003-01-20 06:11:03 +0000802
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000803# vim: sw=2 ai