blob: 57c22014f64b7cdefc8511669f92de4971ab8560 [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.
22# -parallel Run two parallel jobs with GNU Make.
Reid Spencerf6d02332004-06-11 07:06:22 +000023# -release Build an LLVM Release version
24# -pedantic Enable additional GCC warnings to detect possible errors.
Chris Lattnerbb0aca52003-12-19 03:47:31 +000025# -enable-linscan Enable linearscan tests
Chris Lattner20d13ea2004-06-03 03:29:39 +000026# -disable-codegen Disable LLC and JIT tests in the nightly tester.
Chris Lattner4d00fde2004-05-28 20:30:23 +000027# -verbose Turn on some debug output
28# -debug Print information useful only to maintainers of this script.
Reid Spencercb6a3aa2004-06-22 15:38:37 +000029# -nice Checkout/Configure/Build with "nice" to reduce impact
30# on busy servers.
31# -gnuplotscript Next argument specifies gnuplot script to use
32# -templatefile Next argument specifies template file to use
Chris Lattnerbb0aca52003-12-19 03:47:31 +000033#
Brian Gaekeb3dab902003-10-11 05:34:00 +000034# CVSROOT is the CVS repository from which the tree will be checked out,
35# specified either in the full :method:user@host:/dir syntax, or
36# just /dir if using a local repo.
37# BUILDDIR is the directory where sources for this test run will be checked out
38# AND objects for this test run will be built. This directory MUST NOT
39# exist before the script is run; it will be created by the cvs checkout
40# process and erased (unless -noremove is specified; see above.)
41# WEBDIR is the directory into which the test results web page will be written,
42# AND in which the "index.html" is assumed to be a symlink to the most recent
43# copy of the results. This directory MUST exist before the script is run.
Reid Spencercb6a3aa2004-06-22 15:38:37 +000044# LLVMGCCDIR is the directory in which the LLVM GCC Front End is installed
45# to. This is the same as you would have for a normal LLVM build.
Chris Lattner4c7e3032003-01-20 06:11:03 +000046#
47use POSIX qw(strftime);
48
Brian Gaekeb3dab902003-10-11 05:34:00 +000049my $HOME = $ENV{'HOME'};
50my $CVSRootDir = $ENV{'CVSROOT'};
Chris Lattner9d13efa2003-10-14 01:22:08 +000051 $CVSRootDir = "/home/vadve/shared/PublicCVS"
Chris Lattner4d00fde2004-05-28 20:30:23 +000052 unless $CVSRootDir;
53my $BuildDir = $ENV{'BUILDDIR'};
54 $BuildDir = "$HOME/buildtest"
55 unless $BuildDir;
56my $WebDir = $ENV{'WEBDIR'};
57 $WebDir = "$HOME/cvs/testresults-X86"
58 unless $WebDir;
Chris Lattner2f8cb572003-01-20 18:05:27 +000059
60# Calculate the date prefix...
61@TIME = localtime;
62my $DATE = sprintf "%4d-%02d-%02d", $TIME[5]+1900, $TIME[4]+1, $TIME[3];
63my $DateString = strftime "%B %d, %Y", localtime;
Reid Spencercb6a3aa2004-06-22 15:38:37 +000064my $TestStartTime = gmtime;
65
66# Command line argument settings...
67my $NOCHECKOUT = 0;
68my $NOREMOVE = 0;
69my $NOFEATURES = 0;
70my $NOREGRESSIONS = 0;
71my $NOTEST = 0;
72my $NORUNNINGTESTS = 0;
73my $MAKEOPTS = "";
74my $PROGTESTOPTS = "";
75my $VERBOSE = 0;
76my $DEBUG = 0;
77my $CONFIGUREARGS = "--enable-jit";
78my $NICE = "";
Chris Lattner2f8cb572003-01-20 18:05:27 +000079
Chris Lattnerb3440302003-01-22 16:14:05 +000080sub ReadFile {
81 if (open (FILE, $_[0])) {
Reid Spencercb6a3aa2004-06-22 15:38:37 +000082 undef $/;
Chris Lattnerb3440302003-01-22 16:14:05 +000083 my $Ret = <FILE>;
84 close FILE;
Reid Spencercb6a3aa2004-06-22 15:38:37 +000085 $/ = '\n';
Chris Lattnerb3440302003-01-22 16:14:05 +000086 return $Ret;
87 } else {
88 print "Could not open file '$_[0]' for reading!";
89 return "";
90 }
91}
92
Chris Lattner2f8cb572003-01-20 18:05:27 +000093sub WriteFile { # (filename, contents)
94 open (FILE, ">$_[0]") or die "Could not open file '$_[0]' for writing!";
95 print FILE $_[1];
96 close FILE;
97}
98
99sub GetRegex { # (Regex with ()'s, value)
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000100 $_[1] =~ /$_[0]/m;
Chris Lattner08e24762003-08-19 18:35:03 +0000101 if (defined($1)) {
102 return $1;
103 }
Reid Spencera337f0c2004-06-23 06:36:34 +0000104 return "0";
Chris Lattner2f8cb572003-01-20 18:05:27 +0000105}
106
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000107sub AddRecord {
108 my ($Val, $Filename) = @_;
109 my @Records;
110 if (open FILE, "$WebDir/$Filename") {
111 @Records = grep !/$DATE/, split "\n", <FILE>;
112 close FILE;
113 }
114 push @Records, "$DATE: $Val";
115 WriteFile "$WebDir/$Filename", (join "\n", @Records) . "\n";
116 return @Records;
117}
118
Chris Lattner2f8cb572003-01-20 18:05:27 +0000119sub AddPreTag { # Add pre tags around nonempty list, or convert to "none"
120 $_ = shift;
Chris Lattner1cbc0a62003-01-20 19:18:44 +0000121 if (length) { return "<ul><pre>$_</pre></ul>"; } else { "<b>none</b><br>"; }
Chris Lattner2f8cb572003-01-20 18:05:27 +0000122}
123
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000124sub ChangeDir { # directory, logical name
125 my ($dir,$name) = @_;
126 chomp($dir);
127 if ( $VERBOSE ) { print "Changing To: $name ($dir)\n"; }
128 chdir($dir) || die "Cannot change directory to: $name ($dir) ";
129}
130
Chris Lattner2f8cb572003-01-20 18:05:27 +0000131sub GetDir {
132 my $Suffix = shift;
133 opendir DH, $WebDir;
134 my @Result = reverse sort grep !/$DATE/, grep /[-0-9]+$Suffix/, readdir DH;
135 closedir DH;
136 return @Result;
137}
138
139# DiffFiles - Diff the current version of the file against the last version of
140# the file, reporting things added and removed. This is used to report, for
141# example, added and removed warnings. This returns a pair (added, removed)
142#
143sub DiffFiles {
144 my $Suffix = shift;
145 my @Others = GetDir $Suffix;
146 if (@Others == 0) { # No other files? We added all entries...
147 return (`cat $WebDir/$DATE$Suffix`, "");
148 }
149 # Diff the files now...
150 my @Diffs = split "\n", `diff $WebDir/$DATE$Suffix $WebDir/$Others[0]`;
151 my $Added = join "\n", grep /^</, @Diffs;
152 my $Removed = join "\n", grep /^>/, @Diffs;
Chris Lattner1cbc0a62003-01-20 19:18:44 +0000153 $Added =~ s/^< //gm;
154 $Removed =~ s/^> //gm;
Chris Lattner2f8cb572003-01-20 18:05:27 +0000155 return ($Added, $Removed);
156}
157
Chris Lattner196a14a2003-08-19 15:08:34 +0000158# FormatTime - Convert a time from 1m23.45 into 83.45
159sub FormatTime {
160 my $Time = shift;
161 if ($Time =~ m/([0-9]+)m([0-9.]+)/) {
162 $Time = sprintf("%7.4f", $1*60.0+$2);
163 }
164 return $Time;
165}
166
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000167sub GetRegexNum {
168 my ($Regex, $Num, $Regex2, $File) = @_;
169 my @Items = split "\n", `grep '$Regex' $File`;
170 return GetRegex $Regex2, $Items[$Num];
171}
172
Chris Lattner4d00fde2004-05-28 20:30:23 +0000173sub GetQMTestResults { # (filename)
174 my ($filename) = @_;
175 my @lines;
176 my $firstline;
177 $/ = "\n"; #Make sure we're going line at a time.
178 if (open SRCHFILE, $filename) {
Reid Spencer542e8592004-05-30 00:17:47 +0000179 # Skip stuff before ---TEST RESULTS
Chris Lattner4d00fde2004-05-28 20:30:23 +0000180 while ( <SRCHFILE> ) {
Reid Spenceraa0bfbe2004-05-31 20:59:55 +0000181 if ( m/^--- TEST RESULTS/ ) { last; }
Chris Lattner4d00fde2004-05-28 20:30:23 +0000182 }
Reid Spencer542e8592004-05-30 00:17:47 +0000183 # Process test results
Reid Spenceraa0bfbe2004-05-31 20:59:55 +0000184 push(@lines,"<h3>TEST RESULTS</h3><ol><li>\n");
185 my $first_list = 1;
186 my $should_break = 1;
Reid Spencerf5d0af32004-06-08 08:01:33 +0000187 my $nocopy = 0;
Chris Lattner4d00fde2004-05-28 20:30:23 +0000188 while ( <SRCHFILE> ) {
189 if ( length($_) > 1 ) {
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000190 chomp($_);
191 if ( ! m/: PASS[ ]*$/ &&
192 ! m/^ qmtest.target:/ &&
193 ! m/^ local/ &&
194 ! m/^gmake:/ ) {
195 if ( m/: XFAIL/ ) {
196 $nocopy = 1;
197 } elsif ( m/: XPASS/ || m/: FAIL/ ) {
198 $nocopy = 0;
199 if ( $first_list ) {
200 $first_list = 0;
201 $should_break = 1;
202 push(@lines,"<b>$_</b><br/>\n");
203 } else {
204 push(@lines,"</li><li><b>$_</b><br/>\n");
205 }
206 } elsif ( m/^--- STATISTICS/ ) {
207 if ( $first_list ) { push(@lines,"<b>PERFECT!</b>"); }
208 push(@lines,"</li></ol><h3>STATISTICS</h3><pre>\n");
209 $should_break = 0;
210 $nocopy = 0;
211 } elsif ( m/^--- TESTS WITH/ ) {
212 $should_break = 1;
213 $first_list = 1;
214 $nocopy = 0;
215 push(@lines,"</pre><h3>TESTS WITH UNEXPECTED RESULTS</h3><ol><li>\n");
216 } elsif ( m/^real / ) {
217 last;
218 } elsif (!$nocopy) {
219 if ( $should_break ) {
220 push(@lines,"$_<br/>\n");
221 } else {
222 push(@lines,"$_\n");
223 }
224 }
225 }
Chris Lattner4d00fde2004-05-28 20:30:23 +0000226 }
227 }
228 close SRCHFILE;
229 }
230 my $content = join("",@lines);
Reid Spencerf5d0af32004-06-08 08:01:33 +0000231 return "$content</li></ol>\n";
232}
Chris Lattner4d00fde2004-05-28 20:30:23 +0000233
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000234
235#####################################################################
236## MAIN PROGRAM
237#####################################################################
238
239my $Template = "";
240my $PlotScriptFilename = "";
241
242# Parse arguments...
243while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) {
244 shift;
245 last if /^--$/; # Stop processing arguments on --
246
247 # List command line options here...
248 if (/^-nocheckout$/) { $NOCHECKOUT = 1; next; }
249 if (/^-noremove$/) { $NOREMOVE = 1; next; }
250 if (/^-nofeaturetests$/) { $NOFEATURES = 1; next; }
251 if (/^-noregressiontests$/){ $NOREGRESSIONS = 1; next; }
252 if (/^-notest$/) { $NOTEST = 1; $NORUNNINGTESTS = 1; next; }
253 if (/^-norunningtests$/) { $NORUNNINGTESTS = 1; next; }
254 if (/^-parallel$/) { $MAKEOPTS = "$MAKEOPTS -j2 -l3.0"; next; }
255 if (/^-release$/) { $MAKEOPTS = "$MAKEOPTS ENABLE_OPTIMIZED=1"; next; }
256 if (/^-pedantic$/) {
257 $MAKEOPTS = "$MAKEOPTS CompileOptimizeOpts='-O3 -DNDEBUG -finline-functions -Wpointer-arith -Wcast-align -Wno-deprecated -Wold-style-cast -Wabi -Woverloaded-virtual -ffor-scope'";
258 next;
259 }
260 if (/^-enable-linscan$/) { $PROGTESTOPTS .= " ENABLE_LINEARSCAN=1"; next; }
261 if (/^-disable-codegen$/){ $PROGTESTOPTS .= " DISABLE_JIT=1 DISABLE_LLC=1";
262 $CONFIGUREARGS="--disable-jit --disable-llc_diffs";
263 next; }
264 if (/^-verbose$/) { $VERBOSE = 1; next; }
265 if (/^-debug$/) { $DEBUG = 1; next; }
266 if (/^-nice$/) { $NICE = "nice "; next; }
267 if (/^-gnuplotscript$/) { $PlotScriptFilename = $ARGV[0]; shift; next; }
268 if (/^-templatefile$/) { $Template = $ARGV[0]; shift;; next; }
269
270 print "Unknown option: $_ : ignoring!\n";
271}
272
273if ($ENV{'LLVMGCCDIR'}) {
274 $CONFIGUREARGS .= " --with-llvmgccdir=" . $ENV{'LLVMGCCDIR'};
275}
276
277die "Must specify 0 or 3 options!" if (@ARGV != 0 and @ARGV != 3);
278
279if (@ARGV == 3) {
280 $CVSRootDir = $ARGV[0];
281 $BuildDir = $ARGV[1];
282 $WebDir = $ARGV[2];
283}
284
285if ( $Template eq "" ) {
286 $Template = "$BuildDir/llvm/utils/NightlyTestTemplate.html";
287}
288die "Template file $Template is not readable" if ( ! -r "$Template" );
289
290if ( $PlotScriptFilename eq "" ) {
291 $PlotScriptFilename = "$BuildDir/llvm/utils/NightlyTest.gnuplot";
292}
293die "GNUPlot Script $PlotScriptFilename is not readable" if ( ! -r "$PlotScriptFilename" );
294
295my $Prefix = "$WebDir/$DATE";
296
297#define the file names we'll use
298my $BuildLog = "$Prefix-Build-Log.txt";
299my $CVSLog = "$Prefix-CVS-Log.txt";
300my $FeatureTestsLog = "$Prefix-FeatureTests-Log.txt";
301my $RegressionTestsLog = "$Prefix-RegressionTests-Log.txt";
302my $OldenTestsLog = "$Prefix-Olden-tests.txt";
303my $SingleSourceLog = "$Prefix-SingleSource-ProgramTest.txt.gz";
304my $MultiSourceLog = "$Prefix-MultiSource-ProgramTest.txt.gz";
305my $ExternalLog = "$Prefix-External-ProgramTest.txt.gz";
306
307if ($VERBOSE) {
308 print "INITIALIZED\n";
309 print "CVS Root = $CVSRootDir\n";
310 print "BuildDir = $BuildDir\n";
311 print "WebDir = $WebDir\n";
312 print "Prefix = $Prefix\n";
313 print "CVSLog = $CVSLog\n";
314 print "BuildLog = $BuildLog\n";
315}
316
317
318#
319# Create the CVS repository directory
320#
321if (!$NOCHECKOUT) {
322 if (-d $BuildDir) {
323 if (!$NOREMOVE) {
324 system "rm -rf $BuildDir";
325 } else {
326 die "CVS checkout directory $BuildDir already exists!";
327 }
328 }
329 mkdir $BuildDir or die "Could not create CVS checkout directory $BuildDir!";
330}
331
332ChangeDir( $BuildDir, "CVS checkout directory" );
333
334
335#
336# Check out the llvm tree, saving CVS messages to the cvs log...
337#
338$CVSOPT = "";
339$CVSOPT = "-z3" if $CVSRootDir =~ /^:ext:/; # Use compression if going over ssh.
340if (!$NOCHECKOUT) {
341 if ( $VERBOSE ) { print "CHECKOUT STAGE\n"; }
342 system "(time -p $NICE cvs $CVSOPT -d $CVSRootDir co llvm) > $CVSLog 2>&1";
343}
344
345ChangeDir( "llvm" , "llvm source directory") ;
346
347if (!$NOCHECKOUT) {
348 if ( $VERBOSE ) { print "UPDATE STAGE\n"; }
349 system "$NICE cvs update -P -d >> $CVSLog 2>&1" ;
350}
351
352# Read in the HTML template file...
353if ( $VERBOSE ) { print "READING TEMPLATE\n"; }
354my $TemplateContents = ReadFile $Template;
355
356#
357# Get some static statistics about the current state of CVS
358#
359my $CVSCheckoutTime = GetRegex "([0-9.]+)", `grep '^real' $CVSLog`;
360my $NumFilesInCVS = `egrep '^U' $CVSLog | wc -l` + 0;
361my $NumDirsInCVS = `egrep '^cvs (checkout|server|update):' $CVSLog | wc -l` + 0;
362$LOC = GetRegex "([0-9]+) +total", `wc -l \`utils/getsrcs.sh\` | grep total`;
363
364#
365# Build the entire tree, saving build messages to the build log
366#
367if (!$NOCHECKOUT) {
368 if ( $VERBOSE ) { print "CONFIGURE STAGE\n"; }
369 system "(time -p $NICE ./configure $CONFIGUREARGS --enable-spec --with-objroot=.) > $BuildLog 2>&1";
370
371 if ( $VERBOSE ) { print "BUILD STAGE\n"; }
372 # Build the entire tree, capturing the output into $BuildLog
373 system "(time -p $NICE gmake $MAKEOPTS) >> $BuildLog 2>&1";
374}
375
376
377#
378# Get some statistics about the build...
379#
380my @Linked = split '\n', `grep Linking $BuildLog`;
381my $NumExecutables = scalar(grep(/executable/, @Linked));
382my $NumLibraries = scalar(grep(!/executable/, @Linked));
383my $NumObjects = `grep '^Compiling' $BuildLog | wc -l` + 0;
384
385my $ConfigTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$BuildLog";
386my $ConfigTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$BuildLog";
387my $ConfigTime = $ConfigTimeU+$ConfigTimeS; # ConfigTime = User+System
388my $ConfigWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$BuildLog";
389
390my $BuildTimeU = GetRegexNum "^user", 1, "([0-9.]+)", "$BuildLog";
391my $BuildTimeS = GetRegexNum "^sys", 1, "([0-9.]+)", "$BuildLog";
392my $BuildTime = $BuildTimeU+$BuildTimeS; # BuildTime = User+System
393my $BuildWallTime = GetRegexNum "^real", 1, "([0-9.]+)","$BuildLog";
394
395my $BuildError = "";
396if (`grep '^gmake[^:]*: .*Error' $BuildLog | wc -l` + 0 ||
397 `grep '^gmake: \*\*\*.*Stop.' $BuildLog | wc -l`+0) {
398 $BuildError = "<h3><font color='red'>Build error: compilation " .
399 "<a href=\"$DATE-Build-Log.txt\">aborted</a></font></h3>";
400 if ($VERBOSE) { print "BUILD ERROR\n"; }
401}
402
Chris Lattner4d00fde2004-05-28 20:30:23 +0000403# Get results of feature tests.
404my $FeatureTestResults; # String containing the results of the feature tests
405my $FeatureTime; # System+CPU Time for feature tests
406my $FeatureWallTime; # Wall Clock Time for feature tests
407if (!$NOFEATURES) {
408 if ( $VERBOSE ) { print "FEATURE TEST STAGE\n"; }
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000409 my $feature_output = "$FeatureTestsLog";
Chris Lattner4d00fde2004-05-28 20:30:23 +0000410
411 # Run the feature tests so we can summarize the results
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000412 system "(time -p gmake $MAKEOPTS -C test Feature.t) > $feature_output 2>&1";
Chris Lattner4d00fde2004-05-28 20:30:23 +0000413
414 # Extract test results
415 $FeatureTestResults = GetQMTestResults("$feature_output");
416
417 # Extract time of feature tests
418 my $FeatureTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$feature_output";
419 my $FeatureTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$feature_output";
420 $FeatureTime = $FeatureTimeU+$FeatureTimeS; # FeatureTime = User+System
421 $FeatureWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$feature_output";
422 # Run the regression tests so we can summarize the results
423} else {
424 $FeatureTestResults = "Skipped by user choice.";
425 $FeatureTime = "0.0";
426 $FeatureWallTime = "0.0";
427}
428
429if (!$NOREGRESSIONS) {
430 if ( $VERBOSE ) { print "REGRESSION TEST STAGE\n"; }
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000431 my $regression_output = "$RegressionTestsLog";
Chris Lattner4d00fde2004-05-28 20:30:23 +0000432
433 # Run the regression tests so we can summarize the results
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000434 system "(time -p gmake $MAKEOPTS -C test Regression.t) > $regression_output 2>&1";
Chris Lattner4d00fde2004-05-28 20:30:23 +0000435
436 # Extract test results
437 $RegressionTestResults = GetQMTestResults("$regression_output");
438
439 # Extract time of regressions tests
440 my $RegressionTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$regression_output";
441 my $RegressionTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$regression_output";
442 $RegressionTime = $RegressionTimeU+$RegressionTimeS; # RegressionTime = User+System
443 $RegressionWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$regression_output";
444} else {
445 $RegressionTestResults = "Skipped by user choice.";
446 $RegressionTime = "0.0";
447 $RegressionWallTime = "0.0";
448}
449
450if ($DEBUG) {
451 print $FeatureTestResults;
452 print $RegressionTestResults;
453}
454
455if ( $VERBOSE ) { print "BUILD INFORMATION COLLECTION STAGE\n"; }
Chris Lattnerb3440302003-01-22 16:14:05 +0000456#
Chris Lattner4c7e3032003-01-20 06:11:03 +0000457# Get warnings from the build
Chris Lattnerb3440302003-01-22 16:14:05 +0000458#
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000459my @Warn = split "\n", `egrep 'warning:|Entering dir' $BuildLog`;
Chris Lattner4c7e3032003-01-20 06:11:03 +0000460my @Warnings;
461my $CurDir = "";
462
463foreach $Warning (@Warn) {
464 if ($Warning =~ m/Entering directory \`([^\`]+)\'/) {
465 $CurDir = $1; # Keep track of directory warning is in...
Misha Brukman8e9554a2003-08-14 15:26:28 +0000466 if ($CurDir =~ m#$BuildDir/llvm/(.*)#) { # Remove buildir prefix if included
Chris Lattner4c7e3032003-01-20 06:11:03 +0000467 $CurDir = $1;
468 }
469 } else {
470 push @Warnings, "$CurDir/$Warning"; # Add directory to warning...
471 }
472}
Chris Lattner1cbc0a62003-01-20 19:18:44 +0000473my $WarningsFile = join "\n", @Warnings;
474my $WarningsList = AddPreTag $WarningsFile;
475$WarningsFile =~ s/:[0-9]+:/::/g;
Chris Lattner4c7e3032003-01-20 06:11:03 +0000476
Chris Lattner2f8cb572003-01-20 18:05:27 +0000477# Emit the warnings file, so we can diff...
478WriteFile "$WebDir/$DATE-Warnings.txt", $WarningsFile . "\n";
479my ($WarningsAdded, $WarningsRemoved) = DiffFiles "-Warnings.txt";
Chris Lattner4c7e3032003-01-20 06:11:03 +0000480
Chris Lattner9efd7f42003-10-18 19:31:39 +0000481# Output something to stdout if something has changed
482print "ADDED WARNINGS:\n$WarningsAdded\n\n" if (length $WarningsAdded);
483print "REMOVED WARNINGS:\n$WarningsRemoved\n\n" if (length $WarningsRemoved);
484
Chris Lattnerbe197872003-10-19 16:54:00 +0000485$WarningsAdded = AddPreTag $WarningsAdded;
486$WarningsRemoved = AddPreTag $WarningsRemoved;
Chris Lattnerb3440302003-01-22 16:14:05 +0000487
488#
Chris Lattner4c7e3032003-01-20 06:11:03 +0000489# Get some statistics about CVS commits over the current day...
Chris Lattnerb3440302003-01-22 16:14:05 +0000490#
Chris Lattner4d00fde2004-05-28 20:30:23 +0000491if ($VERBOSE) { print "CVS HISTORY ANALYSIS STAGE\n"; }
Chris Lattner4c7e3032003-01-20 06:11:03 +0000492@CVSHistory = split "\n", `cvs history -D '1 day ago' -a -xAMROCGUW`;
493#print join "\n", @CVSHistory; print "\n";
494
495# Extract some information from the CVS history... use a hash so no duplicate
496# stuff is stored.
Misha Brukman1b366892003-07-07 21:27:40 +0000497my (%AddedFiles, %ModifiedFiles, %RemovedFiles, %UsersCommitted, %UsersUpdated);
Chris Lattner4c7e3032003-01-20 06:11:03 +0000498
Brian Gaeke43f38672004-06-10 07:44:28 +0000499my $DateRE = '[-/:0-9 ]+\+[0-9]+';
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000500
Chris Lattner4c7e3032003-01-20 06:11:03 +0000501# Loop over every record from the CVS history, filling in the hashes.
502foreach $File (@CVSHistory) {
503 my ($Type, $Date, $UID, $Rev, $Filename);
Misha Brukman8e9554a2003-08-14 15:26:28 +0000504 if ($File =~ /([AMRUGC]) ($DateRE) ([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+)/) {
Chris Lattner4c7e3032003-01-20 06:11:03 +0000505 ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, $4, "$6/$5");
Chris Lattnerd56147d2004-01-12 16:55:30 +0000506 } elsif ($File =~ /([W]) ($DateRE) ([^ ]+)/) {
507 ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, "", "");
Misha Brukman1b366892003-07-07 21:27:40 +0000508 } elsif ($File =~ /([O]) ($DateRE) ([^ ]+) +([^ ]+)/) {
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000509 ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, "", "$4/");
Chris Lattner4c7e3032003-01-20 06:11:03 +0000510 } else {
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000511 print "UNMATCHABLE: $File\n";
Brian Gaeke43f38672004-06-10 07:44:28 +0000512 next;
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000513 }
514 # print "$File\nTy = $Type Date = '$Date' UID=$UID Rev=$Rev File = '$Filename'\n";
515
516 if ($Filename =~ /^llvm/) {
517 if ($Type eq 'M') { # Modified
518 $ModifiedFiles{$Filename} = 1;
519 $UsersCommitted{$UID} = 1;
520 } elsif ($Type eq 'A') { # Added
521 $AddedFiles{$Filename} = 1;
522 $UsersCommitted{$UID} = 1;
523 } elsif ($Type eq 'R') { # Removed
524 $RemovedFiles{$Filename} = 1;
525 $UsersCommitted{$UID} = 1;
526 } else {
527 $UsersUpdated{$UID} = 1;
528 }
Chris Lattner4c7e3032003-01-20 06:11:03 +0000529 }
530}
531
Chris Lattner1cbc0a62003-01-20 19:18:44 +0000532my $UserCommitList = join "\n", keys %UsersCommitted;
533my $UserUpdateList = join "\n", keys %UsersUpdated;
Chris Lattnerc9cdadf2003-08-06 16:02:50 +0000534my $AddedFilesList = AddPreTag join "\n", sort keys %AddedFiles;
535my $ModifiedFilesList = AddPreTag join "\n", sort keys %ModifiedFiles;
536my $RemovedFilesList = AddPreTag join "\n", sort keys %RemovedFiles;
Chris Lattner4c7e3032003-01-20 06:11:03 +0000537
Chris Lattnerec0e3742003-02-28 20:30:20 +0000538my $TestError = 1;
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000539my $SingleSourceProgramsTable = "!";
540my $MultiSourceProgramsTable = "!";
541my $ExternalProgramsTable = "!";
Chris Lattnerb3440302003-01-22 16:14:05 +0000542
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000543
544sub TestDirectory {
545 my $SubDir = shift;
546
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000547 ChangeDir( "test/Programs/$SubDir", "Programs Test Subdirectory" );
548
549 my $ProgramTestLog = "$Prefix-$SubDir-ProgramTest.txt";
Chris Lattnerec0e3742003-02-28 20:30:20 +0000550
551 # Run the programs tests... creating a report.nightly.html file
552 if (!$NOTEST) {
Chris Lattner20d13ea2004-06-03 03:29:39 +0000553 system "gmake -k $MAKEOPTS $PROGTESTOPTS report.nightly.html "
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000554 . "TEST=nightly > $ProgramTestLog 2>&1";
Chris Lattnerec0e3742003-02-28 20:30:20 +0000555 } else {
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000556 system "gunzip ${ProgramTestLog}.gz";
Chris Lattnerec0e3742003-02-28 20:30:20 +0000557 }
558
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000559 my $ProgramsTable;
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000560 if (`grep '^gmake[^:]: .*Error' $ProgramTestLog | wc -l` + 0){
Chris Lattnerec0e3742003-02-28 20:30:20 +0000561 $TestError = 1;
Chris Lattner2e8be142003-05-10 21:40:10 +0000562 $ProgramsTable = "<font color=white><h2>Error running tests!</h2></font>";
Chris Lattnerbe197872003-10-19 16:54:00 +0000563 print "ERROR TESTING\n";
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000564 } elsif (`grep '^gmake[^:]: .*No rule to make target' $ProgramTestLog | wc -l` + 0) {
Chris Lattner6e51bfa2003-05-11 15:23:10 +0000565 $TestError = 1;
566 $ProgramsTable =
567 "<font color=white><h2>Makefile error running tests!</h2></font>";
Chris Lattnerbe197872003-10-19 16:54:00 +0000568 print "ERROR TESTING\n";
Chris Lattner6e51bfa2003-05-11 15:23:10 +0000569 } else {
Chris Lattnerec0e3742003-02-28 20:30:20 +0000570 $TestError = 0;
571 $ProgramsTable = ReadFile "report.nightly.html";
572
573 #
574 # Create a list of the tests which were run...
575 #
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000576 system "egrep 'TEST-(PASS|FAIL)' < $ProgramTestLog "
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000577 . "| sort > $Prefix-$SubDir-Tests.txt";
Chris Lattnerec0e3742003-02-28 20:30:20 +0000578 }
579
580 # Compress the test output
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000581 system "gzip -f $ProgramTestLog";
582 ChangeDir( "../../..", "Programs Test Parent Directory" );
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000583 return $ProgramsTable;
584}
585
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000586# If we built the tree successfully, run the nightly programs tests...
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000587if ($BuildError eq "") {
Chris Lattner4d00fde2004-05-28 20:30:23 +0000588 if ( $VERBOSE ) {
589 print "SingleSource TEST STAGE\n";
590 }
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000591 $SingleSourceProgramsTable = TestDirectory("SingleSource");
Chris Lattner4d00fde2004-05-28 20:30:23 +0000592 if ( $VERBOSE ) {
593 print "MultiSource TEST STAGE\n";
594 }
Chris Lattnerbf6a4dc2003-08-18 06:05:21 +0000595 $MultiSourceProgramsTable = TestDirectory("MultiSource");
Chris Lattner4d00fde2004-05-28 20:30:23 +0000596 if ( $VERBOSE ) {
597 print "External TEST STAGE\n";
598 }
Chris Lattnereac3cdc2003-08-21 15:55:26 +0000599 $ExternalProgramsTable = TestDirectory("External");
Chris Lattnerf5a6ab92003-08-18 15:11:13 +0000600 system "cat $Prefix-SingleSource-Tests.txt $Prefix-MultiSource-Tests.txt ".
Chris Lattnereac3cdc2003-08-21 15:55:26 +0000601 " $Prefix-External-Tests.txt | sort > $Prefix-Tests.txt";
Chris Lattner5d6c4382003-01-23 19:31:28 +0000602}
Chris Lattnerb3440302003-01-22 16:14:05 +0000603
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000604if ( $VERBOSE ) { print "TEST INFORMATION COLLECTION STAGE\n"; }
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000605my ($TestsAdded, $TestsRemoved, $TestsFixed, $TestsBroken) = ("","","","");
606
Chris Lattnerec0e3742003-02-28 20:30:20 +0000607if ($TestError) {
608 $TestsAdded = "<b>error testing</b><br>";
609 $TestsRemoved = "<b>error testing</b><br>";
610 $TestsFixed = "<b>error testing</b><br>";
611 $TestsBroken = "<b>error testing</b><br>";
612} else {
613 my ($RTestsAdded, $RTestsRemoved) = DiffFiles "-Tests.txt";
614
615 my @RawTestsAddedArray = split '\n', $RTestsAdded;
616 my @RawTestsRemovedArray = split '\n', $RTestsRemoved;
617
618 my %OldTests = map {GetRegex('TEST-....: (.+)', $_)=>$_}
619 @RawTestsRemovedArray;
620 my %NewTests = map {GetRegex('TEST-....: (.+)', $_)=>$_}
621 @RawTestsAddedArray;
622
623 foreach $Test (keys %NewTests) {
624 if (!exists $OldTests{$Test}) { # TestAdded if in New but not old
625 $TestsAdded = "$TestsAdded$Test\n";
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000626 } else {
Chris Lattnerec0e3742003-02-28 20:30:20 +0000627 if ($OldTests{$Test} =~ /TEST-PASS/) { # Was the old one a pass?
628 $TestsBroken = "$TestsBroken$Test\n"; # New one must be a failure
629 } else {
630 $TestsFixed = "$TestsFixed$Test\n"; # No, new one is a pass.
631 }
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000632 }
633 }
Chris Lattnerec0e3742003-02-28 20:30:20 +0000634 foreach $Test (keys %OldTests) { # TestRemoved if in Old but not New
635 $TestsRemoved = "$TestsRemoved$Test\n" if (!exists $NewTests{$Test});
636 }
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000637
Chris Lattner91480ff2003-10-21 15:47:31 +0000638 print "\nTESTS ADDED: \n\n$TestsAdded\n\n" if (length $TestsAdded);
639 print "\nTESTS REMOVED:\n\n$TestsRemoved\n\n" if (length $TestsRemoved);
640 print "\nTESTS FIXED: \n\n$TestsFixed\n\n" if (length $TestsFixed);
641 print "\nTESTS BROKEN: \n\n$TestsBroken\n\n" if (length $TestsBroken);
Chris Lattnerbe197872003-10-19 16:54:00 +0000642
Chris Lattnerec0e3742003-02-28 20:30:20 +0000643 $TestsAdded = AddPreTag $TestsAdded;
644 $TestsRemoved = AddPreTag $TestsRemoved;
645 $TestsFixed = AddPreTag $TestsFixed;
646 $TestsBroken = AddPreTag $TestsBroken;
647}
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000648
Chris Lattner9efd7f42003-10-18 19:31:39 +0000649
Chris Lattner196a14a2003-08-19 15:08:34 +0000650# If we built the tree successfully, runs of the Olden suite with
651# LARGE_PROBLEM_SIZE on so that we can get some "running" statistics.
652if ($BuildError eq "") {
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000653 if ( $VERBOSE ) { print "OLDEN TEST SUITE STAGE\n"; }
Chris Lattner08e24762003-08-19 18:35:03 +0000654 my ($NATTime, $CBETime, $LLCTime, $JITTime, $OptTime, $BytecodeSize,
Chris Lattner196a14a2003-08-19 15:08:34 +0000655 $MachCodeSize) = ("","","","","","","");
Chris Lattner08e24762003-08-19 18:35:03 +0000656 if (!$NORUNNINGTESTS) {
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000657 ChangeDir( "$BuildDir/llvm/test/Programs/MultiSource/Benchmarks/Olden",
658 "Olden Test Directory");
Chris Lattner196a14a2003-08-19 15:08:34 +0000659
660 # Clean out previous results...
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000661 system "$NICE gmake $MAKEOPTS clean > /dev/null 2>&1";
Chris Lattner196a14a2003-08-19 15:08:34 +0000662
663 # Run the nightly test in this directory, with LARGE_PROBLEM_SIZE enabled!
Brian Gaeke85668542004-06-04 00:07:12 +0000664 system "gmake -k $MAKEOPTS $PROGTESTOPTS report.nightly.raw.out TEST=nightly " .
Chris Lattner196a14a2003-08-19 15:08:34 +0000665 " LARGE_PROBLEM_SIZE=1 > /dev/null 2>&1";
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000666 system "cp report.nightly.raw.out $OldenTestsLog";
Chris Lattner196a14a2003-08-19 15:08:34 +0000667 } else {
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000668 system "gunzip ${OldenTestsLog}.gz";
Chris Lattner196a14a2003-08-19 15:08:34 +0000669 }
670
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000671 # Now we know we have $OldenTestsLog as the raw output file. Split
Chris Lattner196a14a2003-08-19 15:08:34 +0000672 # it up into records and read the useful information.
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000673 my @Records = split />>> ========= /, ReadFile "$OldenTestsLog";
Chris Lattner196a14a2003-08-19 15:08:34 +0000674 shift @Records; # Delete the first (garbage) record
675
676 # Loop over all of the records, summarizing them into rows for the running
677 # totals file.
678 my $WallTimeRE = "[A-Za-z0-9.: ]+\\(([0-9.]+) wall clock";
679 foreach $Rec (@Records) {
Chris Lattner08e24762003-08-19 18:35:03 +0000680 my $rNATTime = GetRegex 'TEST-RESULT-nat-time: real\s*([.0-9m]+)', $Rec;
681 my $rCBETime = GetRegex 'TEST-RESULT-cbe-time: real\s*([.0-9m]+)', $Rec;
682 my $rLLCTime = GetRegex 'TEST-RESULT-llc-time: real\s*([.0-9m]+)', $Rec;
683 my $rJITTime = GetRegex 'TEST-RESULT-jit-time: real\s*([.0-9m]+)', $Rec;
Chris Lattner196a14a2003-08-19 15:08:34 +0000684 my $rOptTime = GetRegex "TEST-RESULT-compile: $WallTimeRE", $Rec;
685 my $rBytecodeSize = GetRegex 'TEST-RESULT-compile: *([0-9]+)', $Rec;
686 my $rMachCodeSize = GetRegex 'TEST-RESULT-jit-machcode: *([0-9]+).*bytes of machine code', $Rec;
687
688 $NATTime .= " " . FormatTime($rNATTime);
689 $CBETime .= " " . FormatTime($rCBETime);
690 $LLCTime .= " " . FormatTime($rLLCTime);
691 $JITTime .= " " . FormatTime($rJITTime);
692 $OptTime .= " $rOptTime";
Chris Lattner08e24762003-08-19 18:35:03 +0000693 $BytecodeSize .= " $rBytecodeSize";
694 $MachCodeSize .= " $rMachCodeSize";
Chris Lattner196a14a2003-08-19 15:08:34 +0000695 }
696
697 # Now that we have all of the numbers we want, add them to the running totals
698 # files.
Chris Lattner08e24762003-08-19 18:35:03 +0000699 AddRecord($NATTime, "running_Olden_nat_time.txt");
Chris Lattner196a14a2003-08-19 15:08:34 +0000700 AddRecord($CBETime, "running_Olden_cbe_time.txt");
701 AddRecord($LLCTime, "running_Olden_llc_time.txt");
702 AddRecord($JITTime, "running_Olden_jit_time.txt");
703 AddRecord($OptTime, "running_Olden_opt_time.txt");
704 AddRecord($BytecodeSize, "running_Olden_bytecode.txt");
705 AddRecord($MachCodeSize, "running_Olden_machcode.txt");
Chris Lattner08e24762003-08-19 18:35:03 +0000706
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000707 system "gzip -f $OldenTestsLog";
Chris Lattner196a14a2003-08-19 15:08:34 +0000708}
709
710
Chris Lattnerd9bdbaa2003-01-22 20:35:59 +0000711#
Chris Lattner4c7e3032003-01-20 06:11:03 +0000712# Get a list of the previous days that we can link to...
Chris Lattnerb3440302003-01-22 16:14:05 +0000713#
Chris Lattner2f8cb572003-01-20 18:05:27 +0000714my @PrevDays = map {s/.html//; $_} GetDir ".html";
Chris Lattner4c7e3032003-01-20 06:11:03 +0000715
Brian Gaeke253231e2004-06-11 19:55:30 +0000716if ((scalar @PrevDays) > 20) {
717 splice @PrevDays, 20; # Trim down list to something reasonable...
718}
Chris Lattner4c7e3032003-01-20 06:11:03 +0000719
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000720# Format list for sidebar
721my $PrevDaysList = join "\n ", map { "<a href=\"$_.html\">$_</a><br>" } @PrevDays;
Chris Lattner4c7e3032003-01-20 06:11:03 +0000722
Chris Lattnerc75b14e2003-08-18 20:07:54 +0000723#
724# Start outputing files into the web directory
725#
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000726ChangeDir( $WebDir, "Web Directory" );
Chris Lattnerc75b14e2003-08-18 20:07:54 +0000727
728# Add information to the files which accumulate information for graphs...
729AddRecord($LOC, "running_loc.txt");
730AddRecord($BuildTime, "running_build_time.txt");
731
Chris Lattner4d00fde2004-05-28 20:30:23 +0000732if ( $VERBOSE ) {
733 print "GRAPH GENERATION STAGE\n";
734}
Chris Lattnerc75b14e2003-08-18 20:07:54 +0000735#
736# Rebuild the graphs now...
737#
Brian Gaekeb3dab902003-10-11 05:34:00 +0000738$GNUPLOT = "/usr/dcs/software/supported/bin/gnuplot";
739$GNUPLOT = "gnuplot" if ! -x $GNUPLOT;
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000740system ("$GNUPLOT", $PlotScriptFilename);
Chris Lattnerb3440302003-01-22 16:14:05 +0000741
Chris Lattner4c7e3032003-01-20 06:11:03 +0000742#
743# Remove the cvs tree...
744#
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000745system ( "$NICE rm -rf $BuildDir") if (!$NOCHECKOUT and !$NOREMOVE);
Chris Lattner4c7e3032003-01-20 06:11:03 +0000746
Chris Lattnerb3440302003-01-22 16:14:05 +0000747#
Chris Lattner4c7e3032003-01-20 06:11:03 +0000748# Print out information...
Chris Lattnerb3440302003-01-22 16:14:05 +0000749#
Chris Lattner4d00fde2004-05-28 20:30:23 +0000750if ($VERBOSE) {
Chris Lattner4c7e3032003-01-20 06:11:03 +0000751 print "DateString: $DateString\n";
752 print "CVS Checkout: $CVSCheckoutTime seconds\n";
753 print "Files/Dirs/LOC in CVS: $NumFilesInCVS/$NumDirsInCVS/$LOC\n";
Chris Lattner4c7e3032003-01-20 06:11:03 +0000754 print "Build Time: $BuildTime seconds\n";
Chris Lattner4d00fde2004-05-28 20:30:23 +0000755 print "Feature Test Time: $FeatureTime seconds\n";
756 print "Regression Test Time: $RegressionTime seconds\n";
Chris Lattner4c7e3032003-01-20 06:11:03 +0000757 print "Libraries/Executables/Objects built: $NumLibraries/$NumExecutables/$NumObjects\n";
758
759 print "WARNINGS:\n $WarningsList\n";
760
Chris Lattner4c7e3032003-01-20 06:11:03 +0000761 print "Users committed: $UserCommitList\n";
762 print "Added Files: \n $AddedFilesList\n";
763 print "Modified Files: \n $ModifiedFilesList\n";
764 print "Removed Files: \n $RemovedFilesList\n";
765
766 print "Previous Days =\n $PrevDaysList\n";
767}
768
Chris Lattnerb3440302003-01-22 16:14:05 +0000769
Chris Lattner2f8cb572003-01-20 18:05:27 +0000770#
771# Output the files...
772#
773
Chris Lattner4d00fde2004-05-28 20:30:23 +0000774if ( $VERBOSE ) {
775 print "OUTPUT STAGE\n";
776}
Chris Lattner2f8cb572003-01-20 18:05:27 +0000777# Main HTML file...
Chris Lattner4c7e3032003-01-20 06:11:03 +0000778my $Output;
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000779my $TestFinishTime = gmtime;
780my $TestPlatform = `uname -a`;
Chris Lattner4c7e3032003-01-20 06:11:03 +0000781eval "\$Output = <<ENDOFFILE;$TemplateContents\nENDOFFILE\n";
Chris Lattner2f8cb572003-01-20 18:05:27 +0000782WriteFile "$DATE.html", $Output;
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000783system ( "ln -sf $DATE.html index.html" );
Chris Lattner4c7e3032003-01-20 06:11:03 +0000784
785# Change the index.html symlink...
Chris Lattner4c7e3032003-01-20 06:11:03 +0000786
Reid Spencercb6a3aa2004-06-22 15:38:37 +0000787# vim: sw=2 ai