blob: 7884a6a970725c3bdaa178fe7471b4935e5ec3b1 [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; }
271 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
289if ( $Template eq "" ) {
290 $Template = "$BuildDir/llvm/utils/NightlyTestTemplate.html";
291}
292die "Template file $Template is not readable" if ( ! -r "$Template" );
293
294if ( $PlotScriptFilename eq "" ) {
295 $PlotScriptFilename = "$BuildDir/llvm/utils/NightlyTest.gnuplot";
296}
297die "GNUPlot Script $PlotScriptFilename is not readable" if ( ! -r "$PlotScriptFilename" );
298
299my $Prefix = "$WebDir/$DATE";
300
301#define the file names we'll use
302my $BuildLog = "$Prefix-Build-Log.txt";
303my $CVSLog = "$Prefix-CVS-Log.txt";
304my $FeatureTestsLog = "$Prefix-FeatureTests-Log.txt";
305my $RegressionTestsLog = "$Prefix-RegressionTests-Log.txt";
306my $OldenTestsLog = "$Prefix-Olden-tests.txt";
307my $SingleSourceLog = "$Prefix-SingleSource-ProgramTest.txt.gz";
308my $MultiSourceLog = "$Prefix-MultiSource-ProgramTest.txt.gz";
309my $ExternalLog = "$Prefix-External-ProgramTest.txt.gz";
310
311if ($VERBOSE) {
312 print "INITIALIZED\n";
313 print "CVS Root = $CVSRootDir\n";
314 print "BuildDir = $BuildDir\n";
315 print "WebDir = $WebDir\n";
316 print "Prefix = $Prefix\n";
317 print "CVSLog = $CVSLog\n";
318 print "BuildLog = $BuildLog\n";
319}
320
321
322#
323# Create the CVS repository directory
324#
325if (!$NOCHECKOUT) {
326 if (-d $BuildDir) {
327 if (!$NOREMOVE) {
328 system "rm -rf $BuildDir";
329 } else {
330 die "CVS checkout directory $BuildDir already exists!";
331 }
332 }
333 mkdir $BuildDir or die "Could not create CVS checkout directory $BuildDir!";
334}
335
336ChangeDir( $BuildDir, "CVS checkout directory" );
337
338
339#
340# Check out the llvm tree, saving CVS messages to the cvs log...
341#
342$CVSOPT = "";
343$CVSOPT = "-z3" if $CVSRootDir =~ /^:ext:/; # Use compression if going over ssh.
344if (!$NOCHECKOUT) {
345 if ( $VERBOSE ) { print "CHECKOUT STAGE\n"; }
346 system "(time -p $NICE cvs $CVSOPT -d $CVSRootDir co llvm) > $CVSLog 2>&1";
347}
348
349ChangeDir( "llvm" , "llvm source directory") ;
350
351if (!$NOCHECKOUT) {
352 if ( $VERBOSE ) { print "UPDATE STAGE\n"; }
353 system "$NICE cvs update -P -d >> $CVSLog 2>&1" ;
354}
355
356# 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
Chris Lattner4d00fde2004-05-28 20:30:23 +0000407# Get results of feature tests.
408my $FeatureTestResults; # String containing the results of the feature tests
409my $FeatureTime; # System+CPU Time for feature tests
410my $FeatureWallTime; # Wall Clock Time for feature tests
411if (!$NOFEATURES) {
412 if ( $VERBOSE ) { print "FEATURE TEST STAGE\n"; }
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000413 my $feature_output = "$FeatureTestsLog";
Chris Lattner4d00fde2004-05-28 20:30:23 +0000414
415 # Run the feature tests so we can summarize the results
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000416 system "(time -p gmake $MAKEOPTS -C test Feature.t) > $feature_output 2>&1";
Chris Lattner4d00fde2004-05-28 20:30:23 +0000417
418 # Extract test results
419 $FeatureTestResults = GetQMTestResults("$feature_output");
420
421 # Extract time of feature tests
422 my $FeatureTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$feature_output";
423 my $FeatureTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$feature_output";
424 $FeatureTime = $FeatureTimeU+$FeatureTimeS; # FeatureTime = User+System
425 $FeatureWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$feature_output";
426 # Run the regression tests so we can summarize the results
427} else {
428 $FeatureTestResults = "Skipped by user choice.";
429 $FeatureTime = "0.0";
430 $FeatureWallTime = "0.0";
431}
432
433if (!$NOREGRESSIONS) {
434 if ( $VERBOSE ) { print "REGRESSION TEST STAGE\n"; }
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000435 my $regression_output = "$RegressionTestsLog";
Chris Lattner4d00fde2004-05-28 20:30:23 +0000436
437 # Run the regression tests so we can summarize the results
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000438 system "(time -p gmake $MAKEOPTS -C test Regression.t) > $regression_output 2>&1";
Chris Lattner4d00fde2004-05-28 20:30:23 +0000439
440 # Extract test results
441 $RegressionTestResults = GetQMTestResults("$regression_output");
442
443 # Extract time of regressions tests
444 my $RegressionTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$regression_output";
445 my $RegressionTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$regression_output";
446 $RegressionTime = $RegressionTimeU+$RegressionTimeS; # RegressionTime = User+System
447 $RegressionWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$regression_output";
448} else {
449 $RegressionTestResults = "Skipped by user choice.";
450 $RegressionTime = "0.0";
451 $RegressionWallTime = "0.0";
452}
453
454if ($DEBUG) {
455 print $FeatureTestResults;
456 print $RegressionTestResults;
457}
458
459if ( $VERBOSE ) { print "BUILD INFORMATION COLLECTION STAGE\n"; }
Chris Lattnerb3440302003-01-22 16:14:05 +0000460#
Chris Lattner4c7e3032003-01-20 06:11:03 +0000461# Get warnings from the build
Chris Lattnerb3440302003-01-22 16:14:05 +0000462#
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000463my @Warn = split "\n", `egrep 'warning:|Entering dir' $BuildLog`;
Chris Lattner4c7e3032003-01-20 06:11:03 +0000464my @Warnings;
465my $CurDir = "";
466
467foreach $Warning (@Warn) {
468 if ($Warning =~ m/Entering directory \`([^\`]+)\'/) {
469 $CurDir = $1; # Keep track of directory warning is in...
Misha Brukman8e9554a2003-08-14 15:26:28 +0000470 if ($CurDir =~ m#$BuildDir/llvm/(.*)#) { # Remove buildir prefix if included
Chris Lattner4c7e3032003-01-20 06:11:03 +0000471 $CurDir = $1;
472 }
473 } else {
474 push @Warnings, "$CurDir/$Warning"; # Add directory to warning...
475 }
476}
Chris Lattner1cbc0a62003-01-20 19:18:44 +0000477my $WarningsFile = join "\n", @Warnings;
478my $WarningsList = AddPreTag $WarningsFile;
479$WarningsFile =~ s/:[0-9]+:/::/g;
Chris Lattner4c7e3032003-01-20 06:11:03 +0000480
Chris Lattner2f8cb572003-01-20 18:05:27 +0000481# Emit the warnings file, so we can diff...
482WriteFile "$WebDir/$DATE-Warnings.txt", $WarningsFile . "\n";
483my ($WarningsAdded, $WarningsRemoved) = DiffFiles "-Warnings.txt";
Chris Lattner4c7e3032003-01-20 06:11:03 +0000484
Chris Lattner9efd7f42003-10-18 19:31:39 +0000485# Output something to stdout if something has changed
486print "ADDED WARNINGS:\n$WarningsAdded\n\n" if (length $WarningsAdded);
487print "REMOVED WARNINGS:\n$WarningsRemoved\n\n" if (length $WarningsRemoved);
488
Chris Lattnerbe197872003-10-19 16:54:00 +0000489$WarningsAdded = AddPreTag $WarningsAdded;
490$WarningsRemoved = AddPreTag $WarningsRemoved;
Chris Lattnerb3440302003-01-22 16:14:05 +0000491
492#
Chris Lattner4c7e3032003-01-20 06:11:03 +0000493# Get some statistics about CVS commits over the current day...
Chris Lattnerb3440302003-01-22 16:14:05 +0000494#
Chris Lattner4d00fde2004-05-28 20:30:23 +0000495if ($VERBOSE) { print "CVS HISTORY ANALYSIS STAGE\n"; }
Chris Lattner4c7e3032003-01-20 06:11:03 +0000496@CVSHistory = split "\n", `cvs history -D '1 day ago' -a -xAMROCGUW`;
497#print join "\n", @CVSHistory; print "\n";
498
499# Extract some information from the CVS history... use a hash so no duplicate
500# stuff is stored.
Misha Brukman1b366892003-07-07 21:27:40 +0000501my (%AddedFiles, %ModifiedFiles, %RemovedFiles, %UsersCommitted, %UsersUpdated);
Chris Lattner4c7e3032003-01-20 06:11:03 +0000502
Brian Gaeke43f38672004-06-10 07:44:28 +0000503my $DateRE = '[-/:0-9 ]+\+[0-9]+';
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000504
Chris Lattner4c7e3032003-01-20 06:11:03 +0000505# Loop over every record from the CVS history, filling in the hashes.
506foreach $File (@CVSHistory) {
507 my ($Type, $Date, $UID, $Rev, $Filename);
Misha Brukman8e9554a2003-08-14 15:26:28 +0000508 if ($File =~ /([AMRUGC]) ($DateRE) ([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+)/) {
Chris Lattner4c7e3032003-01-20 06:11:03 +0000509 ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, $4, "$6/$5");
Chris Lattnerd56147d2004-01-12 16:55:30 +0000510 } elsif ($File =~ /([W]) ($DateRE) ([^ ]+)/) {
511 ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, "", "");
Misha Brukman1b366892003-07-07 21:27:40 +0000512 } elsif ($File =~ /([O]) ($DateRE) ([^ ]+) +([^ ]+)/) {
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000513 ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, "", "$4/");
Chris Lattner4c7e3032003-01-20 06:11:03 +0000514 } else {
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000515 print "UNMATCHABLE: $File\n";
Brian Gaeke43f38672004-06-10 07:44:28 +0000516 next;
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000517 }
518 # print "$File\nTy = $Type Date = '$Date' UID=$UID Rev=$Rev File = '$Filename'\n";
519
520 if ($Filename =~ /^llvm/) {
521 if ($Type eq 'M') { # Modified
522 $ModifiedFiles{$Filename} = 1;
523 $UsersCommitted{$UID} = 1;
524 } elsif ($Type eq 'A') { # Added
525 $AddedFiles{$Filename} = 1;
526 $UsersCommitted{$UID} = 1;
527 } elsif ($Type eq 'R') { # Removed
528 $RemovedFiles{$Filename} = 1;
529 $UsersCommitted{$UID} = 1;
530 } else {
531 $UsersUpdated{$UID} = 1;
532 }
Chris Lattner4c7e3032003-01-20 06:11:03 +0000533 }
534}
535
Chris Lattner1cbc0a62003-01-20 19:18:44 +0000536my $UserCommitList = join "\n", keys %UsersCommitted;
537my $UserUpdateList = join "\n", keys %UsersUpdated;
Chris Lattnerc9cdadf2003-08-06 16:02:50 +0000538my $AddedFilesList = AddPreTag join "\n", sort keys %AddedFiles;
539my $ModifiedFilesList = AddPreTag join "\n", sort keys %ModifiedFiles;
540my $RemovedFilesList = AddPreTag join "\n", sort keys %RemovedFiles;
Chris Lattner4c7e3032003-01-20 06:11:03 +0000541
Chris Lattnerec0e3742003-02-28 20:30:20 +0000542my $TestError = 1;
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000543my $SingleSourceProgramsTable = "!";
544my $MultiSourceProgramsTable = "!";
545my $ExternalProgramsTable = "!";
Chris Lattnerb3440302003-01-22 16:14:05 +0000546
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000547
548sub TestDirectory {
549 my $SubDir = shift;
550
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000551 ChangeDir( "test/Programs/$SubDir", "Programs Test Subdirectory" );
552
553 my $ProgramTestLog = "$Prefix-$SubDir-ProgramTest.txt";
Chris Lattnerec0e3742003-02-28 20:30:20 +0000554
555 # Run the programs tests... creating a report.nightly.html file
556 if (!$NOTEST) {
Chris Lattner20d13ea2004-06-03 03:29:39 +0000557 system "gmake -k $MAKEOPTS $PROGTESTOPTS report.nightly.html "
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000558 . "TEST=nightly > $ProgramTestLog 2>&1";
Chris Lattnerec0e3742003-02-28 20:30:20 +0000559 } else {
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000560 system "gunzip ${ProgramTestLog}.gz";
Chris Lattnerec0e3742003-02-28 20:30:20 +0000561 }
562
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000563 my $ProgramsTable;
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000564 if (`grep '^gmake[^:]: .*Error' $ProgramTestLog | wc -l` + 0){
Chris Lattnerec0e3742003-02-28 20:30:20 +0000565 $TestError = 1;
Chris Lattner2e8be142003-05-10 21:40:10 +0000566 $ProgramsTable = "<font color=white><h2>Error running tests!</h2></font>";
Chris Lattnerbe197872003-10-19 16:54:00 +0000567 print "ERROR TESTING\n";
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000568 } elsif (`grep '^gmake[^:]: .*No rule to make target' $ProgramTestLog | wc -l` + 0) {
Chris Lattner6e51bfa2003-05-11 15:23:10 +0000569 $TestError = 1;
570 $ProgramsTable =
571 "<font color=white><h2>Makefile error running tests!</h2></font>";
Chris Lattnerbe197872003-10-19 16:54:00 +0000572 print "ERROR TESTING\n";
Chris Lattner6e51bfa2003-05-11 15:23:10 +0000573 } else {
Chris Lattnerec0e3742003-02-28 20:30:20 +0000574 $TestError = 0;
575 $ProgramsTable = ReadFile "report.nightly.html";
576
577 #
578 # Create a list of the tests which were run...
579 #
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000580 system "egrep 'TEST-(PASS|FAIL)' < $ProgramTestLog "
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000581 . "| sort > $Prefix-$SubDir-Tests.txt";
Chris Lattnerec0e3742003-02-28 20:30:20 +0000582 }
583
584 # Compress the test output
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000585 system "gzip -f $ProgramTestLog";
586 ChangeDir( "../../..", "Programs Test Parent Directory" );
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000587 return $ProgramsTable;
588}
589
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000590# If we built the tree successfully, run the nightly programs tests...
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000591if ($BuildError eq "") {
Chris Lattner4d00fde2004-05-28 20:30:23 +0000592 if ( $VERBOSE ) {
593 print "SingleSource TEST STAGE\n";
594 }
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000595 $SingleSourceProgramsTable = TestDirectory("SingleSource");
Chris Lattner4d00fde2004-05-28 20:30:23 +0000596 if ( $VERBOSE ) {
597 print "MultiSource TEST STAGE\n";
598 }
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000599 $MultiSourceProgramsTable = TestDirectory("MultiSource");
Reid Spencer1d914632004-06-23 07:45:46 +0000600 if ( ! $NOEXTERNALS ) {
601 if ( $VERBOSE ) {
602 print "External TEST STAGE\n";
603 }
604 $ExternalProgramsTable = TestDirectory("External");
605 system "cat $Prefix-SingleSource-Tests.txt $Prefix-MultiSource-Tests.txt ".
Chris Lattnereac3cdc2003-08-21 15:55:26 +0000606 " $Prefix-External-Tests.txt | sort > $Prefix-Tests.txt";
Reid Spencer1d914632004-06-23 07:45:46 +0000607 } else {
608 if ( $VERBOSE ) {
609 print "External TEST STAGE SKIPPED\n";
610 }
611 system "cat $Prefix-SingleSource-Tests.txt $Prefix-MultiSource-Tests.txt ".
612 " | sort > $Prefix-Tests.txt";
613 }
Chris Lattner5d6c4382003-01-23 19:31:28 +0000614}
Chris Lattnerb3440302003-01-22 16:14:05 +0000615
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000616if ( $VERBOSE ) { print "TEST INFORMATION COLLECTION STAGE\n"; }
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000617my ($TestsAdded, $TestsRemoved, $TestsFixed, $TestsBroken) = ("","","","");
618
Chris Lattnerec0e3742003-02-28 20:30:20 +0000619if ($TestError) {
620 $TestsAdded = "<b>error testing</b><br>";
621 $TestsRemoved = "<b>error testing</b><br>";
622 $TestsFixed = "<b>error testing</b><br>";
623 $TestsBroken = "<b>error testing</b><br>";
624} else {
625 my ($RTestsAdded, $RTestsRemoved) = DiffFiles "-Tests.txt";
626
627 my @RawTestsAddedArray = split '\n', $RTestsAdded;
628 my @RawTestsRemovedArray = split '\n', $RTestsRemoved;
629
630 my %OldTests = map {GetRegex('TEST-....: (.+)', $_)=>$_}
631 @RawTestsRemovedArray;
632 my %NewTests = map {GetRegex('TEST-....: (.+)', $_)=>$_}
633 @RawTestsAddedArray;
634
635 foreach $Test (keys %NewTests) {
636 if (!exists $OldTests{$Test}) { # TestAdded if in New but not old
637 $TestsAdded = "$TestsAdded$Test\n";
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000638 } else {
Chris Lattnerec0e3742003-02-28 20:30:20 +0000639 if ($OldTests{$Test} =~ /TEST-PASS/) { # Was the old one a pass?
640 $TestsBroken = "$TestsBroken$Test\n"; # New one must be a failure
641 } else {
642 $TestsFixed = "$TestsFixed$Test\n"; # No, new one is a pass.
643 }
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000644 }
645 }
Chris Lattnerec0e3742003-02-28 20:30:20 +0000646 foreach $Test (keys %OldTests) { # TestRemoved if in Old but not New
647 $TestsRemoved = "$TestsRemoved$Test\n" if (!exists $NewTests{$Test});
648 }
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000649
Chris Lattner91480ff2003-10-21 15:47:31 +0000650 print "\nTESTS ADDED: \n\n$TestsAdded\n\n" if (length $TestsAdded);
651 print "\nTESTS REMOVED:\n\n$TestsRemoved\n\n" if (length $TestsRemoved);
652 print "\nTESTS FIXED: \n\n$TestsFixed\n\n" if (length $TestsFixed);
653 print "\nTESTS BROKEN: \n\n$TestsBroken\n\n" if (length $TestsBroken);
Chris Lattnerbe197872003-10-19 16:54:00 +0000654
Chris Lattnerec0e3742003-02-28 20:30:20 +0000655 $TestsAdded = AddPreTag $TestsAdded;
656 $TestsRemoved = AddPreTag $TestsRemoved;
657 $TestsFixed = AddPreTag $TestsFixed;
658 $TestsBroken = AddPreTag $TestsBroken;
659}
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000660
Chris Lattner9efd7f42003-10-18 19:31:39 +0000661
Chris Lattner196a14a2003-08-19 15:08:34 +0000662# If we built the tree successfully, runs of the Olden suite with
663# LARGE_PROBLEM_SIZE on so that we can get some "running" statistics.
664if ($BuildError eq "") {
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000665 if ( $VERBOSE ) { print "OLDEN TEST SUITE STAGE\n"; }
Chris Lattner08e24762003-08-19 18:35:03 +0000666 my ($NATTime, $CBETime, $LLCTime, $JITTime, $OptTime, $BytecodeSize,
Chris Lattner196a14a2003-08-19 15:08:34 +0000667 $MachCodeSize) = ("","","","","","","");
Chris Lattner08e24762003-08-19 18:35:03 +0000668 if (!$NORUNNINGTESTS) {
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000669 ChangeDir( "$BuildDir/llvm/test/Programs/MultiSource/Benchmarks/Olden",
670 "Olden Test Directory");
Chris Lattner196a14a2003-08-19 15:08:34 +0000671
672 # Clean out previous results...
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000673 system "$NICE gmake $MAKEOPTS clean > /dev/null 2>&1";
Chris Lattner196a14a2003-08-19 15:08:34 +0000674
675 # Run the nightly test in this directory, with LARGE_PROBLEM_SIZE enabled!
Brian Gaeke85668542004-06-04 00:07:12 +0000676 system "gmake -k $MAKEOPTS $PROGTESTOPTS report.nightly.raw.out TEST=nightly " .
Chris Lattner196a14a2003-08-19 15:08:34 +0000677 " LARGE_PROBLEM_SIZE=1 > /dev/null 2>&1";
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000678 system "cp report.nightly.raw.out $OldenTestsLog";
Chris Lattner196a14a2003-08-19 15:08:34 +0000679 } else {
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000680 system "gunzip ${OldenTestsLog}.gz";
Chris Lattner196a14a2003-08-19 15:08:34 +0000681 }
682
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000683 # Now we know we have $OldenTestsLog as the raw output file. Split
Chris Lattner196a14a2003-08-19 15:08:34 +0000684 # it up into records and read the useful information.
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000685 my @Records = split />>> ========= /, ReadFile "$OldenTestsLog";
Chris Lattner196a14a2003-08-19 15:08:34 +0000686 shift @Records; # Delete the first (garbage) record
687
688 # Loop over all of the records, summarizing them into rows for the running
689 # totals file.
690 my $WallTimeRE = "[A-Za-z0-9.: ]+\\(([0-9.]+) wall clock";
691 foreach $Rec (@Records) {
Chris Lattner08e24762003-08-19 18:35:03 +0000692 my $rNATTime = GetRegex 'TEST-RESULT-nat-time: real\s*([.0-9m]+)', $Rec;
693 my $rCBETime = GetRegex 'TEST-RESULT-cbe-time: real\s*([.0-9m]+)', $Rec;
694 my $rLLCTime = GetRegex 'TEST-RESULT-llc-time: real\s*([.0-9m]+)', $Rec;
695 my $rJITTime = GetRegex 'TEST-RESULT-jit-time: real\s*([.0-9m]+)', $Rec;
Chris Lattner196a14a2003-08-19 15:08:34 +0000696 my $rOptTime = GetRegex "TEST-RESULT-compile: $WallTimeRE", $Rec;
697 my $rBytecodeSize = GetRegex 'TEST-RESULT-compile: *([0-9]+)', $Rec;
698 my $rMachCodeSize = GetRegex 'TEST-RESULT-jit-machcode: *([0-9]+).*bytes of machine code', $Rec;
699
700 $NATTime .= " " . FormatTime($rNATTime);
701 $CBETime .= " " . FormatTime($rCBETime);
702 $LLCTime .= " " . FormatTime($rLLCTime);
703 $JITTime .= " " . FormatTime($rJITTime);
704 $OptTime .= " $rOptTime";
Chris Lattner08e24762003-08-19 18:35:03 +0000705 $BytecodeSize .= " $rBytecodeSize";
706 $MachCodeSize .= " $rMachCodeSize";
Chris Lattner196a14a2003-08-19 15:08:34 +0000707 }
708
709 # Now that we have all of the numbers we want, add them to the running totals
710 # files.
Chris Lattner08e24762003-08-19 18:35:03 +0000711 AddRecord($NATTime, "running_Olden_nat_time.txt");
Chris Lattner196a14a2003-08-19 15:08:34 +0000712 AddRecord($CBETime, "running_Olden_cbe_time.txt");
713 AddRecord($LLCTime, "running_Olden_llc_time.txt");
714 AddRecord($JITTime, "running_Olden_jit_time.txt");
715 AddRecord($OptTime, "running_Olden_opt_time.txt");
716 AddRecord($BytecodeSize, "running_Olden_bytecode.txt");
717 AddRecord($MachCodeSize, "running_Olden_machcode.txt");
Chris Lattner08e24762003-08-19 18:35:03 +0000718
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000719 system "gzip -f $OldenTestsLog";
Chris Lattner196a14a2003-08-19 15:08:34 +0000720}
721
722
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000723#
Chris Lattner4c7e3032003-01-20 06:11:03 +0000724# Get a list of the previous days that we can link to...
Chris Lattnerb3440302003-01-22 16:14:05 +0000725#
Chris Lattner2f8cb572003-01-20 18:05:27 +0000726my @PrevDays = map {s/.html//; $_} GetDir ".html";
Chris Lattner4c7e3032003-01-20 06:11:03 +0000727
Brian Gaeke253231e2004-06-11 19:55:30 +0000728if ((scalar @PrevDays) > 20) {
729 splice @PrevDays, 20; # Trim down list to something reasonable...
730}
Chris Lattner4c7e3032003-01-20 06:11:03 +0000731
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000732# Format list for sidebar
733my $PrevDaysList = join "\n ", map { "<a href=\"$_.html\">$_</a><br>" } @PrevDays;
Chris Lattner4c7e3032003-01-20 06:11:03 +0000734
Chris Lattnerc75b14e2003-08-18 20:07:54 +0000735#
736# Start outputing files into the web directory
737#
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000738ChangeDir( $WebDir, "Web Directory" );
Chris Lattnerc75b14e2003-08-18 20:07:54 +0000739
740# Add information to the files which accumulate information for graphs...
741AddRecord($LOC, "running_loc.txt");
742AddRecord($BuildTime, "running_build_time.txt");
743
Chris Lattner4d00fde2004-05-28 20:30:23 +0000744if ( $VERBOSE ) {
745 print "GRAPH GENERATION STAGE\n";
746}
Chris Lattnerc75b14e2003-08-18 20:07:54 +0000747#
748# Rebuild the graphs now...
749#
Brian Gaekeb3dab902003-10-11 05:34:00 +0000750$GNUPLOT = "/usr/dcs/software/supported/bin/gnuplot";
751$GNUPLOT = "gnuplot" if ! -x $GNUPLOT;
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000752system ("$GNUPLOT", $PlotScriptFilename);
Chris Lattnerb3440302003-01-22 16:14:05 +0000753
Chris Lattner4c7e3032003-01-20 06:11:03 +0000754#
755# Remove the cvs tree...
756#
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000757system ( "$NICE rm -rf $BuildDir") if (!$NOCHECKOUT and !$NOREMOVE);
Chris Lattner4c7e3032003-01-20 06:11:03 +0000758
Chris Lattnerb3440302003-01-22 16:14:05 +0000759#
Chris Lattner4c7e3032003-01-20 06:11:03 +0000760# Print out information...
Chris Lattnerb3440302003-01-22 16:14:05 +0000761#
Chris Lattner4d00fde2004-05-28 20:30:23 +0000762if ($VERBOSE) {
Chris Lattner4c7e3032003-01-20 06:11:03 +0000763 print "DateString: $DateString\n";
764 print "CVS Checkout: $CVSCheckoutTime seconds\n";
765 print "Files/Dirs/LOC in CVS: $NumFilesInCVS/$NumDirsInCVS/$LOC\n";
Chris Lattner4c7e3032003-01-20 06:11:03 +0000766 print "Build Time: $BuildTime seconds\n";
Chris Lattner4d00fde2004-05-28 20:30:23 +0000767 print "Feature Test Time: $FeatureTime seconds\n";
768 print "Regression Test Time: $RegressionTime seconds\n";
Chris Lattner4c7e3032003-01-20 06:11:03 +0000769 print "Libraries/Executables/Objects built: $NumLibraries/$NumExecutables/$NumObjects\n";
770
771 print "WARNINGS:\n $WarningsList\n";
772
Chris Lattner4c7e3032003-01-20 06:11:03 +0000773 print "Users committed: $UserCommitList\n";
774 print "Added Files: \n $AddedFilesList\n";
775 print "Modified Files: \n $ModifiedFilesList\n";
776 print "Removed Files: \n $RemovedFilesList\n";
777
778 print "Previous Days =\n $PrevDaysList\n";
779}
780
Chris Lattnerb3440302003-01-22 16:14:05 +0000781
Chris Lattner2f8cb572003-01-20 18:05:27 +0000782#
783# Output the files...
784#
785
Chris Lattner4d00fde2004-05-28 20:30:23 +0000786if ( $VERBOSE ) {
787 print "OUTPUT STAGE\n";
788}
Chris Lattner2f8cb572003-01-20 18:05:27 +0000789# Main HTML file...
Chris Lattner4c7e3032003-01-20 06:11:03 +0000790my $Output;
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000791my $TestFinishTime = gmtime;
792my $TestPlatform = `uname -a`;
Chris Lattner4c7e3032003-01-20 06:11:03 +0000793eval "\$Output = <<ENDOFFILE;$TemplateContents\nENDOFFILE\n";
Chris Lattner2f8cb572003-01-20 18:05:27 +0000794WriteFile "$DATE.html", $Output;
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000795system ( "ln -sf $DATE.html index.html" );
Chris Lattner4c7e3032003-01-20 06:11:03 +0000796
797# Change the index.html symlink...
Chris Lattner4c7e3032003-01-20 06:11:03 +0000798
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000799# vim: sw=2 ai