blob: bdc65aeab0c0586e59b079fbb571006d42fe3365 [file] [log] [blame]
Patrick Jenkins0e316b42006-07-06 21:19:32 +00001#!/usr/bin/perl
2
3use POSIX qw(strftime);
4use File::Copy;
5use Socket;
6
7#
8# Program: NewNightlyTest.pl
9#
10# Synopsis: Perform a series of tests which are designed to be run nightly.
11# This is used to keep track of the status of the LLVM tree, tracking
12# regressions and performance changes. Submits this information
13# to llvm.org where it is placed into the nightlytestresults database.
14#
15# Modified heavily by Patrick Jenkins, July 2006
16#
17# Syntax: NightlyTest.pl [OPTIONS] [CVSROOT BUILDDIR WEBDIR]
18# where
19# OPTIONS may include one or more of the following:
20# -nocheckout Do not create, checkout, update, or configure
21# the source tree.
22# -noremove Do not remove the BUILDDIR after it has been built.
Patrick Jenkins5053e152006-07-07 17:31:38 +000023# -noremoveresults Do not remove the WEBDIR after it has been built.
Patrick Jenkins0e316b42006-07-06 21:19:32 +000024# -nobuild Do not build llvm. If tests are enabled perform them
25# on the llvm build specified in the build directory
26# -notest Do not even attempt to run the test programs. Implies
27# -norunningtests.
28# -norunningtests Do not run the Olden benchmark suite with
29# LARGE_PROBLEM_SIZE enabled.
Patrick Jenkins0e316b42006-07-06 21:19:32 +000030# -nodejagnu Do not run feature or regression tests
31# -parallel Run two parallel jobs with GNU Make.
32# -release Build an LLVM Release version
33# -enable-llcbeta Enable testing of beta features in llc.
34# -disable-llc Disable LLC tests in the nightly tester.
35# -disable-jit Disable JIT tests in the nightly tester.
36# -disable-cbe Disable C backend tests in the nightly tester.
37# -verbose Turn on some debug output
38# -debug Print information useful only to maintainers of this script.
39# -nice Checkout/Configure/Build with "nice" to reduce impact
40# on busy servers.
41# -f2c Next argument specifies path to F2C utility
42# -nickname The next argument specifieds the nickname this script
43# will submit to the nightlytest results repository.
44# -gccpath Path to gcc/g++ used to build LLVM
45# -cvstag Check out a specific CVS tag to build LLVM (useful for
46# testing release branches)
47# -target Specify the target triplet
48# -cflags Next argument specifies that C compilation options that
49# override the default.
50# -cxxflags Next argument specifies that C++ compilation options that
51# override the default.
52# -ldflags Next argument specifies that linker options that override
53# the default.
Patrick Jenkinsf976a5c2006-07-07 18:50:51 +000054# -compileflags Next argument specifies extra options passed to make when
55# building LLVM.
Patrick Jenkins0e316b42006-07-06 21:19:32 +000056#
57# ---------------- Options to configure llvm-test ----------------------------
Patrick Jenkinsf976a5c2006-07-07 18:50:51 +000058# -extraflags Next argument specifies extra options that are passed to
59# compile the tests.
60# -noexternals Do not run the external tests (for cases where povray
61# or SPEC are not installed)
62# -with-externals Specify a directory where the external tests are located.
Patrick Jenkins0e316b42006-07-06 21:19:32 +000063#
64# CVSROOT is the CVS repository from which the tree will be checked out,
65# specified either in the full :method:user@host:/dir syntax, or
66# just /dir if using a local repo.
67# BUILDDIR is the directory where sources for this test run will be checked out
68# AND objects for this test run will be built. This directory MUST NOT
69# exist before the script is run; it will be created by the cvs checkout
70# process and erased (unless -noremove is specified; see above.)
71# WEBDIR is the directory into which the test results web page will be written,
72# AND in which the "index.html" is assumed to be a symlink to the most recent
73# copy of the results. This directory will be created if it does not exist.
74# LLVMGCCDIR is the directory in which the LLVM GCC Front End is installed
75# to. This is the same as you would have for a normal LLVM build.
76#
77##############################################################
78#
79# Getting environment variables
80#
81##############################################################
82my $HOME = $ENV{'HOME'};
83my $CVSRootDir = $ENV{'CVSROOT'};
84 $CVSRootDir = "/home/vadve/shared/PublicCVS"
85 unless $CVSRootDir;
86my $BuildDir = $ENV{'BUILDDIR'};
87 $BuildDir = "$HOME/buildtest"
88 unless $BuildDir;
89my $WebDir = $ENV{'WEBDIR'};
90 $WebDir = "$HOME/cvs/testresults-X86"
91 unless $WebDir;
92
93##############################################################
94#
95# Calculate the date prefix...
96#
97##############################################################
98@TIME = localtime;
99my $DATE = sprintf "%4d-%02d-%02d", $TIME[5]+1900, $TIME[4]+1, $TIME[3];
100my $DateString = strftime "%B %d, %Y", localtime;
101my $TestStartTime = gmtime() . "GMT<br>" . localtime() . " (local)";
102
103##############################################################
104#
105# Parse arguments...
106#
107##############################################################
108$CONFIGUREARGS="";
109
110$NOTEST=0;
111$NORUNNINGTESTS=0;
112
113while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) {
114 shift;
115 last if /^--$/; # Stop processing arguments on --
116
117 # List command line options here...
118 if (/^-nocheckout$/) { $NOCHECKOUT = 1; next; }
119 if (/^-nocvsstats$/) { $NOCVSSTATS = 1; next; }
120 if (/^-noremove$/) { $NOREMOVE = 1; next; }
Patrick Jenkins5053e152006-07-07 17:31:38 +0000121 if (/^-noremoveresults$/) { $NOREMOVERESULTS = 1; next; }
Patrick Jenkins0e316b42006-07-06 21:19:32 +0000122 if (/^-notest$/) { $NOTEST = 1; $NORUNNINGTESTS = 1; next; }
123 if (/^-norunningtests$/) { $NORUNNINGTESTS = 1; next; }
124 if (/^-parallel$/) { $MAKEOPTS = "$MAKEOPTS -j2 -l3.0"; next; }
Patrick Jenkinsa72f84e2006-07-17 16:41:19 +0000125 if (/^-release$/) { $MAKEOPTS = "$MAKEOPTS ENABLE_OPTIMIZED=1 ".
126 "OPTIMIZE_OPTION=-O2"; next; }
Patrick Jenkins0e316b42006-07-06 21:19:32 +0000127 if (/^-enable-llcbeta$/) { $PROGTESTOPTS .= " ENABLE_LLCBETA=1"; next; }
128 if (/^-disable-llc$/) { $PROGTESTOPTS .= " DISABLE_LLC=1";
129 $CONFIGUREARGS .= " --disable-llc_diffs"; next; }
130 if (/^-disable-jit$/) { $PROGTESTOPTS .= " DISABLE_JIT=1";
131 $CONFIGUREARGS .= " --disable-jit"; next; }
132 if (/^-verbose$/) { $VERBOSE = 1; next; }
133 if (/^-debug$/) { $DEBUG = 1; next; }
134 if (/^-nice$/) { $NICE = "nice "; next; }
135 if (/^-f2c$/) {
136 $CONFIGUREARGS .= " --with-f2c=$ARGV[0]"; shift; next;
137 }
138 if (/^-with-externals/) {
139 $CONFIGUREARGS .= "--with-externals=$ARGV[0]"; shift; next;
140 }
141 if (/^-nickname$/) { $nickname = "$ARGV[0]"; shift; next; }
Patrick Jenkinsa72f84e2006-07-17 16:41:19 +0000142 if (/^-gccpath/) { $CONFIGUREARGS .=
143 " CC=$ARGV[0]/gcc CXX=$ARGV[0]/g++";
Patrick Jenkins9536ec72006-07-14 20:44:09 +0000144 $GCCPATH=$ARGV[0];
145 shift;
146 next;}
Patrick Jenkinsbe254602006-07-18 17:21:30 +0000147 else{ $GCCPATH=""; }
Patrick Jenkinsa72f84e2006-07-17 16:41:19 +0000148 if (/^-cvstag/) { $CVSCOOPT .= " -r $ARGV[0]"; shift; next; }
149 else{ $CVSCOOPT="";}
Patrick Jenkins0e316b42006-07-06 21:19:32 +0000150 if (/^-target/) {
151 $CONFIGUREARGS .= " --target=$ARGV[0]"; shift; next;
152 }
153 if (/^-cflags/) {
154 $MAKEOPTS = "$MAKEOPTS C.Flags=\'$ARGV[0]\'"; shift; next;
155 }
156 if (/^-cxxflags/) {
157 $MAKEOPTS = "$MAKEOPTS CXX.Flags=\'$ARGV[0]\'"; shift; next;
158 }
159 if (/^-ldflags/) {
160 $MAKEOPTS = "$MAKEOPTS LD.Flags=\'$ARGV[0]\'"; shift; next;
161 }
162 if (/^-compileflags/) {
163 $MAKEOPTS = "$MAKEOPTS $ARGV[0]"; shift; next;
164 }
165 if (/^-extraflags/) {
166 $PROGTESTOPTS .= " EXTRA_FLAGS=\'$ARGV[0]\'"; shift; next;
167 }
168 if (/^-noexternals$/) { $NOEXTERNALS = 1; next; }
169 if (/^-nodejagnu$/) { $NODEJAGNU = 1; next; }
170 if (/^-nobuild$/) { $NOBUILD = 1; next; }
Patrick Jenkins0e316b42006-07-06 21:19:32 +0000171 print "Unknown option: $_ : ignoring!\n";
172}
173
174if ($ENV{'LLVMGCCDIR'}) {
175 $CONFIGUREARGS .= " --with-llvmgccdir=" . $ENV{'LLVMGCCDIR'};
176}
177if ($CONFIGUREARGS !~ /--disable-jit/) {
178 $CONFIGUREARGS .= " --enable-jit";
179}
180
181die "Must specify 0 or 3 options!" if (@ARGV != 0 and @ARGV != 3);
182
183if (@ARGV == 3) {
184 $CVSRootDir = $ARGV[0];
185 $BuildDir = $ARGV[1];
186 $WebDir = $ARGV[2];
187}
188
189##############################################################
190#
191#define the file names we'll use
192#
193##############################################################
194my $Prefix = "$WebDir/$DATE";
195my $BuildLog = "$Prefix-Build-Log.txt";
196my $CVSLog = "$Prefix-CVS-Log.txt";
197my $OldenTestsLog = "$Prefix-Olden-tests.txt";
198my $SingleSourceLog = "$Prefix-SingleSource-ProgramTest.txt.gz";
199my $MultiSourceLog = "$Prefix-MultiSource-ProgramTest.txt.gz";
200my $ExternalLog = "$Prefix-External-ProgramTest.txt.gz";
201my $DejagnuLog = "$Prefix-Dejagnu-testrun.log";
202my $DejagnuSum = "$Prefix-Dejagnu-testrun.sum";
203my $DejagnuTestsLog = "$Prefix-DejagnuTests-Log.txt";
204if (! -d $WebDir) {
205 mkdir $WebDir, 0777;
206 warn "$WebDir did not exist; creating it.\n";
207}
208
209if ($VERBOSE) {
210 print "INITIALIZED\n";
211 print "CVS Root = $CVSRootDir\n";
212 print "BuildDir = $BuildDir\n";
213 print "WebDir = $WebDir\n";
214 print "Prefix = $Prefix\n";
215 print "CVSLog = $CVSLog\n";
216 print "BuildLog = $BuildLog\n";
217}
218
219##############################################################
220#
221# Helper functions
222#
223##############################################################
224sub GetDir {
225 my $Suffix = shift;
226 opendir DH, $WebDir;
227 my @Result = reverse sort grep !/$DATE/, grep /[-0-9]+$Suffix/, readdir DH;
228 closedir DH;
229 return @Result;
230}
231
232#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
233#
234# DiffFiles - Diff the current version of the file against the last version of
235# the file, reporting things added and removed. This is used to report, for
236# example, added and removed warnings. This returns a pair (added, removed)
237#
238#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
239sub DiffFiles {
240 my $Suffix = shift;
241 my @Others = GetDir $Suffix;
242 if (@Others == 0) { # No other files? We added all entries...
243 return (`cat $WebDir/$DATE$Suffix`, "");
244 }
245 # Diff the files now...
246 my @Diffs = split "\n", `diff $WebDir/$DATE$Suffix $WebDir/$Others[0]`;
247 my $Added = join "\n", grep /^</, @Diffs;
248 my $Removed = join "\n", grep /^>/, @Diffs;
249 $Added =~ s/^< //gm;
250 $Removed =~ s/^> //gm;
251 return ($Added, $Removed);
252}
253
254#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
255#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
256sub GetRegex { # (Regex with ()'s, value)
257 $_[1] =~ /$_[0]/m;
258 if (defined($1)) {
259 return $1;
260 }
261 return "0";
262}
263
264#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
265#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
266sub GetRegexNum {
267 my ($Regex, $Num, $Regex2, $File) = @_;
268 my @Items = split "\n", `grep '$Regex' $File`;
269 return GetRegex $Regex2, $Items[$Num];
270}
271
272#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
273#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
274sub ChangeDir { # directory, logical name
275 my ($dir,$name) = @_;
276 chomp($dir);
277 if ( $VERBOSE ) { print "Changing To: $name ($dir)\n"; }
278 chdir($dir) || die "Cannot change directory to: $name ($dir) ";
279}
280
281#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
282#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
283sub ReadFile {
284 if (open (FILE, $_[0])) {
285 undef $/;
286 my $Ret = <FILE>;
287 close FILE;
288 $/ = '\n';
289 return $Ret;
290 } else {
Patrick Jenkins7ac78b92006-07-10 18:35:41 +0000291 print "Could not open file '$_[0]' for reading!\n";
Patrick Jenkins0e316b42006-07-06 21:19:32 +0000292 return "";
293 }
294}
295
296#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
297#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
298sub WriteFile { # (filename, contents)
Patrick Jenkins7ac78b92006-07-10 18:35:41 +0000299 open (FILE, ">$_[0]") or die "Could not open file '$_[0]' for writing!\n";
Patrick Jenkins0e316b42006-07-06 21:19:32 +0000300 print FILE $_[1];
301 close FILE;
302}
303
304#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
305#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
306sub CopyFile { #filename, newfile
307 my ($file, $newfile) = @_;
308 chomp($file);
309 if ($VERBOSE) { print "Copying $file to $newfile\n"; }
310 copy($file, $newfile);
311}
312
313#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
314#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
315sub AddRecord {
316 my ($Val, $Filename,$WebDir) = @_;
317 my @Records;
318 if (open FILE, "$WebDir/$Filename") {
319 @Records = grep !/$DATE/, split "\n", <FILE>;
320 close FILE;
321 }
322 push @Records, "$DATE: $Val";
323 WriteFile "$WebDir/$Filename", (join "\n", @Records) . "\n";
324}
325
326#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
327#
328# FormatTime - Convert a time from 1m23.45 into 83.45
329#
330#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
331sub FormatTime {
332 my $Time = shift;
333 if ($Time =~ m/([0-9]+)m([0-9.]+)/) {
334 $Time = sprintf("%7.4f", $1*60.0+$2);
335 }
336 return $Time;
337}
338
339#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
340#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
341sub GetDejagnuTestResults { # (filename, log)
342 my ($filename, $DejagnuLog) = @_;
343 my @lines;
344 my $firstline;
345 $/ = "\n"; #Make sure we're going line at a time.
346
347 print "DEJAGNU TEST RESULTS:\n";
348
349 if (open SRCHFILE, $filename) {
350 # Process test results
351 my $first_list = 1;
352 my $should_break = 1;
353 my $nocopy = 0;
354 my $readingsum = 0;
355 while ( <SRCHFILE> ) {
356 if ( length($_) > 1 ) {
357 chomp($_);
358 if ( m/^XPASS:/ || m/^FAIL:/ ) {
359 $nocopy = 0;
360 if ( $first_list ) {
361 push(@lines, "UNEXPECTED TEST RESULTS\n");
362 $first_list = 0;
363 $should_break = 1;
364 push(@lines, "$_\n");
365 print " $_\n";
366 } else {
367 push(@lines, "$_\n");
368 print " $_\n";
369 }
370 } #elsif ( m/Summary/ ) {
371 # if ( $first_list ) {
372 # push(@lines, "PERFECT!");
373 # print " PERFECT!\n";
374 # } else {
375 # push(@lines, "</li></ol>\n");
376 # }
377 # push(@lines, "STATISTICS\n");
378 # print "\nDEJAGNU STATISTICS:\n";
379 # $should_break = 0;
380 # $nocopy = 0;
381 # $readingsum = 1;
382 #}
383 elsif ( $readingsum ) {
384 push(@lines,"$_\n");
385 print " $_\n";
386 }
387
388 }
389 }
390 }
391 close SRCHFILE;
392
393 my $content = join("", @lines);
394 return $content;
395}
396
397
398#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
399#
400# This function acts as a mini web browswer submitting data
401# to our central server via the post method
402#
403#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
404sub SendData{
405 $host = $_[0];
406 $file = $_[1];
407 $variables=$_[2];
408
409 $port=80;
410 $socketaddr= sockaddr_in $port, inet_aton $host or die "Bad hostname\n";
Patrick Jenkinsa72f84e2006-07-17 16:41:19 +0000411 socket SOCK, PF_INET, SOCK_STREAM, getprotobyname('tcp') or
412 die "Bad socket\n";
Patrick Jenkins0e316b42006-07-06 21:19:32 +0000413 connect SOCK, $socketaddr or die "Bad connection\n";
414 select((select(SOCK), $| = 1)[0]);
415
416 #creating content here
417 my $content;
418 foreach $key (keys (%$variables)){
419 $value = $variables->{$key};
420 $value =~ s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;
421 $content .= "$key=$value&";
422 }
423
424 $length = length($content);
425
426 my $send= "POST $file HTTP/1.0\n";
427 $send.= "Content-Type: application/x-www-form-urlencoded\n";
428 $send.= "Content-length: $length\n\n";
429 $send.= "$content";
430
431 print SOCK $send;
432 my $result;
433 while(<SOCK>){
434 $result .= $_;
435 }
436 close(SOCK);
437
438 my $sentdata="";
Patrick Jenkins19ecfb02006-07-07 21:40:34 +0000439 foreach $x (keys (%$variables)){
Patrick Jenkins7ac78b92006-07-10 18:35:41 +0000440 $value = $variables->{$x};
441 $sentdata.= "$x => $value\n";
Patrick Jenkins0e316b42006-07-06 21:19:32 +0000442 }
443 WriteFile "$Prefix-sentdata.txt", $sentdata;
Patrick Jenkins19ecfb02006-07-07 21:40:34 +0000444
Patrick Jenkins0e316b42006-07-06 21:19:32 +0000445
446 return $result;
447}
448
Patrick Jenkinsf976a5c2006-07-07 18:50:51 +0000449##############################################################
450#
451# Getting Start timestamp
452#
453##############################################################
454$starttime = `date`;
Patrick Jenkins0e316b42006-07-06 21:19:32 +0000455
456##############################################################
457#
458# Create the CVS repository directory
459#
460##############################################################
461if (!$NOCHECKOUT) {
462 if (-d $BuildDir) {
463 if (!$NOREMOVE) {
464 system "rm -rf $BuildDir";
465 } else {
466 die "CVS checkout directory $BuildDir already exists!";
467 }
468 }
469 mkdir $BuildDir or die "Could not create CVS checkout directory $BuildDir!";
470}
471ChangeDir( $BuildDir, "CVS checkout directory" );
472
473
474##############################################################
475#
476# Check out the llvm tree, saving CVS messages to the cvs log...
477#
478##############################################################
479my $CVSOPT = "";
480# Use compression if going over ssh.
481$CVSOPT = "-z3" if $CVSRootDir =~ /^:ext:/;
482my $CVSCMD = "$NICE cvs $CVSOPT -d $CVSRootDir co $CVSCOOPT";
483if (!$NOCHECKOUT) {
484 if ( $VERBOSE )
485 {
486 print "CHECKOUT STAGE:\n";
487 print "( time -p $CVSCMD llvm; cd llvm/projects ; $CVSCMD llvm-test ) > $CVSLog 2>&1\n";
488 }
489 system "( time -p $CVSCMD llvm; cd llvm/projects ; " .
490 "$CVSCMD llvm-test ) > $CVSLog 2>&1";
491 ChangeDir( $BuildDir , "CVS Checkout directory") ;
492}
493ChangeDir( "llvm" , "llvm source directory") ;
494if (!$NOCHECKOUT) {
495 if ( $VERBOSE ) { print "UPDATE STAGE\n"; }
496 system "$NICE cvs update -PdRA >> $CVSLog 2>&1" ;
497}
498
499##############################################################
500#
501# Get some static statistics about the current state of CVS
502#
503# This can probably be put on the server side
504#
505##############################################################
506my $CVSCheckoutTime_Wall = GetRegex "([0-9.]+)", `grep '^real' $CVSLog`;
507my $CVSCheckoutTime_User = GetRegex "([0-9.]+)", `grep '^user' $CVSLog`;
508my $CVSCheckoutTime_Sys = GetRegex "([0-9.]+)", `grep '^sys' $CVSLog`;
509my $CVSCheckoutTime_CPU = $CVSCheckoutTime_User + $CVSCheckoutTime_Sys;
510
511my $NumFilesInCVS = `egrep '^U' $CVSLog | wc -l` + 0;
512my $NumDirsInCVS = `egrep '^cvs (checkout|server|update):' $CVSLog | wc -l` + 0;
513my $LOC = `utils/countloc.sh`;
514
515##############################################################
516#
517# Extract some information from the CVS history... use a hash so no duplicate
518# stuff is stored. This gets the history from the previous days worth
519# of cvs activit and parses it.
520#
521##############################################################
522
523my (%AddedFiles, %ModifiedFiles, %RemovedFiles, %UsersCommitted, %UsersUpdated);
524
525if(!$NOCVSSTATS){
526
527if ($VERBOSE) { print "CVS HISTORY ANALYSIS STAGE\n"; }
528@CVSHistory = split "\n", `cvs history -D '1 day ago' -a -xAMROCGUW`;
529#print join "\n", @CVSHistory; print "\n";
530
531my $DateRE = '[-/:0-9 ]+\+[0-9]+';
532
533# Loop over every record from the CVS history, filling in the hashes.
534foreach $File (@CVSHistory) {
535 my ($Type, $Date, $UID, $Rev, $Filename);
536 if ($File =~ /([AMRUGC]) ($DateRE) ([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+)/) {
537 ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, $4, "$6/$5");
538 } elsif ($File =~ /([W]) ($DateRE) ([^ ]+)/) {
539 ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, "", "");
540 } elsif ($File =~ /([O]) ($DateRE) ([^ ]+) +([^ ]+)/) {
541 ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, "", "$4/");
542 } else {
543 print "UNMATCHABLE: $File\n";
544 next;
545 }
546 # print "$File\nTy = $Type Date = '$Date' UID=$UID Rev=$Rev File = '$Filename'\n";
547
548 if ($Filename =~ /^llvm/) {
549 if ($Type eq 'M') { # Modified
550 $ModifiedFiles{$Filename} = 1;
551 $UsersCommitted{$UID} = 1;
552 } elsif ($Type eq 'A') { # Added
Patrick Jenkins26d5bd52006-07-13 16:56:48 +0000553 $AddedFiles{$Filename} = 1;
Patrick Jenkins0e316b42006-07-06 21:19:32 +0000554 $UsersCommitted{$UID} = 1;
555 } elsif ($Type eq 'R') { # Removed
556 $RemovedFiles{$Filename} = 1;
557 $UsersCommitted{$UID} = 1;
558 } else {
559 $UsersUpdated{$UID} = 1;
560 }
561 }
562}
563
564my $TestError = 1;
565
566}#!NOCVSSTATS
567
568my $CVSAddedFiles = join "\n", sort keys %AddedFiles;
569my $CVSModifiedFiles = join "\n", sort keys %ModifiedFiles;
570my $CVSRemovedFiles = join "\n", sort keys %RemovedFiles;
571my $UserCommitList = join "\n", sort keys %UsersCommitted;
572my $UserUpdateList = join "\n", sort keys %UsersUpdated;
573
574##############################################################
575#
576# Build the entire tree, saving build messages to the build log
577#
578##############################################################
579if (!$NOCHECKOUT && !$NOBUILD) {
Patrick Jenkins26d5bd52006-07-13 16:56:48 +0000580 my $EXTRAFLAGS = "--enable-spec --with-objroot=.";
Patrick Jenkins0e316b42006-07-06 21:19:32 +0000581 if ( $VERBOSE )
582 {
583 print "CONFIGURE STAGE:\n";
584 print "(time -p $NICE ./configure $CONFIGUREARGS $EXTRAFLAGS) > $BuildLog 2>&1\n";
585 }
586 system "(time -p $NICE ./configure $CONFIGUREARGS $EXTRAFLAGS) > $BuildLog 2>&1";
587 if ( $VERBOSE )
588 {
589 print "BUILD STAGE:\n";
590 print "(time -p $NICE make $MAKEOPTS) >> $BuildLog 2>&1\n";
591 }
592 # Build the entire tree, capturing the output into $BuildLog
593 system "(time -p $NICE make $MAKEOPTS) >> $BuildLog 2>&1";
594}
595
596
597##############################################################
598#
599# Get some statistics about the build...
600#
601##############################################################
602#this can de done on server
603#my @Linked = split '\n', `grep Linking $BuildLog`;
604#my $NumExecutables = scalar(grep(/executable/, @Linked));
605#my $NumLibraries = scalar(grep(!/executable/, @Linked));
606#my $NumObjects = `grep ']\: Compiling ' $BuildLog | wc -l` + 0;
607
608
609my $ConfigTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$BuildLog";
610my $ConfigTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$BuildLog";
611my $ConfigTime = $ConfigTimeU+$ConfigTimeS; # ConfigTime = User+System
612my $ConfigWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$BuildLog";
613
614$ConfigTime=-1 unless $ConfigTime;
615$ConfigWallTime=-1 unless $ConfigWallTime;
616
617my $BuildTimeU = GetRegexNum "^user", 1, "([0-9.]+)", "$BuildLog";
618my $BuildTimeS = GetRegexNum "^sys", 1, "([0-9.]+)", "$BuildLog";
619my $BuildTime = $BuildTimeU+$BuildTimeS; # BuildTime = User+System
620my $BuildWallTime = GetRegexNum "^real", 1, "([0-9.]+)","$BuildLog";
621
622$BuildTime=-1 unless $BuildTime;
623$BuildWallTime=-1 unless $BuildWallTime;
624
625my $BuildError = 0, $BuildStatus = "OK";
626if($NOBUILD){
627 $BuildStatus = "Skipped by user";
628 $BuildError = 1;
629}
630elsif (`grep '^make[^:]*: .*Error' $BuildLog | wc -l` + 0 ||
631 `grep '^make: \*\*\*.*Stop.' $BuildLog | wc -l`+0) {
632 $BuildStatus = "Error: compilation aborted";
633 $BuildError = 1;
634 print "\n***ERROR BUILDING TREE\n\n";
635}
636if ($BuildError) { $NODEJAGNU=1; }
637
638##############################################################
639#
640# Running dejagnu tests
641#
642##############################################################
643my $DejangnuTestResults; # String containing the results of the dejagnu
644my $dejagnu_output = "$DejagnuTestsLog";
645if(!$NODEJAGNU) {
646 if($VERBOSE)
647 {
648 print "DEJAGNU FEATURE/REGRESSION TEST STAGE:\n";
649 print "(time -p make $MAKEOPTS check) > $dejagnu_output 2>&1\n";
650 }
651
652 #Run the feature and regression tests, results are put into testrun.sum
653 #Full log in testrun.log
654 system "(time -p make $MAKEOPTS check) > $dejagnu_output 2>&1";
655
656 #Copy the testrun.log and testrun.sum to our webdir
657 CopyFile("test/testrun.log", $DejagnuLog);
658 CopyFile("test/testrun.sum", $DejagnuSum);
659 #can be done on server
660 $DejagnuTestResults = GetDejagnuTestResults($DejagnuSum, $DejagnuLog);
661 $unexpfail_tests = $DejagnuTestResults;
662}
663#Extract time of dejagnu tests
664my $DejagnuTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$dejagnu_output";
665my $DejagnuTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$dejagnu_output";
666$DejagnuTime = $DejagnuTimeU+$DejagnuTimeS; # DejagnuTime = User+System
667$DejagnuWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$dejagnu_output";
668$DejagnuTestResults = "Dejagnu skipped by user choice." unless $DejagnuTestResults;
669$DejagnuTime = "0.0" unless $DejagnuTime;
670$DejagnuWallTime = "0.0" unless $DejagnuWallTime;
671
672if ($DEBUG) {
673 print $DejagnuTestResults;
674}
675
676##############################################################
677#
678# Get warnings from the build
679#
680##############################################################
681if(!$NODEJAGNU){
682
683if ( $VERBOSE ) { print "BUILD INFORMATION COLLECTION STAGE\n"; }
684my @Warn = split "\n", `egrep 'warning:|Entering dir' $BuildLog`;
685my @Warnings;
686my $CurDir = "";
687
688foreach $Warning (@Warn) {
689 if ($Warning =~ m/Entering directory \`([^\`]+)\'/) {
690 $CurDir = $1; # Keep track of directory warning is in...
691 if ($CurDir =~ m#$BuildDir/llvm/(.*)#) { # Remove buildir prefix if included
692 $CurDir = $1;
693 }
694 } else {
695 push @Warnings, "$CurDir/$Warning"; # Add directory to warning...
696 }
697}
698my $WarningsFile = join "\n", @Warnings;
699$WarningsFile =~ s/:[0-9]+:/::/g;
700
701# Emit the warnings file, so we can diff...
702WriteFile "$WebDir/$DATE-Warnings.txt", $WarningsFile . "\n";
Patrick Jenkinsd0a7c2b2006-07-06 22:32:15 +0000703my ($WarningsAdded, $WarningsRemoved) = DiffFiles "-Warnings.txt";
Patrick Jenkins0e316b42006-07-06 21:19:32 +0000704
705# Output something to stdout if something has changed
706#print "ADDED WARNINGS:\n$WarningsAdded\n\n" if (length $WarningsAdded);
707#print "REMOVED WARNINGS:\n$WarningsRemoved\n\n" if (length $WarningsRemoved);
708
709#my @TmpWarningsAdded = split "\n", $WarningsAdded; ~PJ on upgrade
710#my @TmpWarningsRemoved = split "\n", $WarningsRemoved; ~PJ on upgrade
711
712} #endif !NODEGAGNU
713
714##############################################################
715#
716# If we built the tree successfully, run the nightly programs tests...
717#
718# A set of tests to run is passed in (i.e. "SingleSource" "MultiSource" "External")
719#
720##############################################################
721sub TestDirectory {
722 my $SubDir = shift;
723
724 ChangeDir( "projects/llvm-test/$SubDir", "Programs Test Subdirectory" );
725
726 my $ProgramTestLog = "$Prefix-$SubDir-ProgramTest.txt";
727 #my $ProgramTestLog = "$Prefix-MultiSource-ProgramTest.txt"; #CHANGE ME!
728
729 # Run the programs tests... creating a report.nightly.csv file
730 if (!$NOTEST) {
731 print "make -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv "
732 . "TEST=nightly > $ProgramTestLog 2>&1\n";
733 system "make -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv "
734 . "TEST=nightly > $ProgramTestLog 2>&1";
735 $llcbeta_options=`make print-llcbeta-option`;
736 }
737
738 my $ProgramsTable;
739 if (`grep '^make[^:]: .*Error' $ProgramTestLog | wc -l` + 0){
740 $TestError = 1;
741 $ProgramsTable="Error running test $SubDir\n";
742 print "ERROR TESTING\n";
743 } elsif (`grep '^make[^:]: .*No rule to make target' $ProgramTestLog | wc -l` + 0) {
744 $TestError = 1;
745 $ProgramsTable="Makefile error running tests $SubDir!\n";
746 print "ERROR TESTING\n";
747 } else {
748 $TestError = 0;
749
750 #
751 # Create a list of the tests which were run...
752 #
753 system "egrep 'TEST-(PASS|FAIL)' < $ProgramTestLog "
754 . "| sort > $Prefix-multisourceprogramstable.txt";
755 }
756 $ProgramsTable = ReadFile "report.nightly.csv";
757
758 ChangeDir( "../../..", "Programs Test Parent Directory" );
759 return ($ProgramsTable, $llcbeta_options);
760}
761
762$patrickjenkins=1;
763if(!$patrickjenkins){
764 if ( $VERBOSE ) {
765 print "Modified Multisource Olden test stage\n";
766 }
767 ($MultiSourceProgramsTable, $multisource_llcbeta_options) = TestDirectory("MultiSource/");
768 ChangeDir( "../../..", "Programs Test Parent Directory" );
769
770
771 WriteFile "$WebDir/multisourceprogramstable.txt", $MultiSourceProgramsTable;
772}
773if (!$BuildError && $patrickjenkins) {
774 if ( $VERBOSE ) {
775 print "SingleSource TEST STAGE\n";
776 }
Patrick Jenkins26d5bd52006-07-13 16:56:48 +0000777 ($SingleSourceProgramsTable, $llcbeta_options) = TestDirectory("SingleSource");
Patrick Jenkins0e316b42006-07-06 21:19:32 +0000778 WriteFile "$Prefix-singlesourceprogramstable.txt", $SingleSourceProgramsTable;
779 if ( $VERBOSE ) {
780 print "MultiSource TEST STAGE\n";
781 }
Patrick Jenkins26d5bd52006-07-13 16:56:48 +0000782 ($MultiSourceProgramsTable, $llcbeta_options) = TestDirectory("MultiSource");
Patrick Jenkins0e316b42006-07-06 21:19:32 +0000783 WriteFile "$Prefix-multisourceprogramstable.txt", $MultiSourceProgramsTable;
784 if ( ! $NOEXTERNALS ) {
785 if ( $VERBOSE ) {
786 print "External TEST STAGE\n";
787 }
Patrick Jenkinsfd95b692006-07-13 16:58:42 +0000788 ($ExternalProgramsTable, $llcbeta_options) = TestDirectory("External");
Patrick Jenkins44ebd5a2006-07-10 16:36:19 +0000789 WriteFile "$Prefix-externalprogramstable.txt", $ExternalProgramsTable;
Patrick Jenkins0e316b42006-07-06 21:19:32 +0000790 system "cat $Prefix-singlesourceprogramstable.txt $Prefix-multisourceprogramstable.txt ".
791 " $Prefix-externalprogramstable.txt | sort > $Prefix-Tests.txt";
792 } else {
793 $ExternalProgramsTable = "External TEST STAGE SKIPPED\n";
794 if ( $VERBOSE ) {
795 print "External TEST STAGE SKIPPED\n";
796 }
797 system "cat $Prefix-singlesourceprogramstable.txt $Prefix-multisourceprogramstable.txt ".
798 " | sort > $Prefix-Tests.txt";
799 }
800 WriteFile "$Prefix-externalprogramstable.txt", $ExternalProgramsTable;
801
802}
803
804##############################################################
805#
806#
807# gathering tests added removed broken information here
808#
809#
810##############################################################
811my ($TestsAdded, $TestsRemoved, $TestsFixed, $TestsBroken) = ("","","","");
812
813if ($TestError) {
814 $TestsAdded = "<b>error testing</b><br>";
815 $TestsRemoved = "<b>error testing</b><br>";
816 $TestsFixed = "<b>error testing</b><br>";
817 $TestsBroken = "<b>error testing</b><br>";
818} else {
Patrick Jenkinsd0a7c2b2006-07-06 22:32:15 +0000819 my ($RTestsAdded, $RTestsRemoved) = DiffFiles "-Tests.txt";
Patrick Jenkins0e316b42006-07-06 21:19:32 +0000820
821 my @RawTestsAddedArray = split '\n', $RTestsAdded;
822 my @RawTestsRemovedArray = split '\n', $RTestsRemoved;
823
824 my %OldTests = map {GetRegex('TEST-....: (.+)', $_)=>$_}
825 @RawTestsRemovedArray;
826 my %NewTests = map {GetRegex('TEST-....: (.+)', $_)=>$_}
827 @RawTestsAddedArray;
828
829 foreach $Test (keys %NewTests) {
830 if (!exists $OldTests{$Test}) { # TestAdded if in New but not old
831 $TestsAdded = "$TestsAdded$Test\n";
832 } else {
833 if ($OldTests{$Test} =~ /TEST-PASS/) { # Was the old one a pass?
834 $TestsBroken = "$TestsBroken$Test\n"; # New one must be a failure
835 } else {
836 $TestsFixed = "$TestsFixed$Test\n"; # No, new one is a pass.
837 }
838 }
839 }
840 foreach $Test (keys %OldTests) { # TestRemoved if in Old but not New
841 $TestsRemoved = "$TestsRemoved$Test\n" if (!exists $NewTests{$Test});
842 }
843
844 #print "\nTESTS ADDED: \n\n$TestsAdded\n\n" if (length $TestsAdded);
845 #print "\nTESTS REMOVED:\n\n$TestsRemoved\n\n" if (length $TestsRemoved);
846 #print "\nTESTS FIXED: \n\n$TestsFixed\n\n" if (length $TestsFixed);
847 #print "\nTESTS BROKEN: \n\n$TestsBroken\n\n" if (length $TestsBroken);
848
849 #$TestsAdded = AddPreTag $TestsAdded;
850 #$TestsRemoved = AddPreTag $TestsRemoved;
851 #$TestsFixed = AddPreTag $TestsFixed;
852 #$TestsBroken = AddPreTag $TestsBroken;
853}
854
855##############################################################
856#
857# If we built the tree successfully, runs of the Olden suite with
858# LARGE_PROBLEM_SIZE on so that we can get some "running" statistics.
859#
860##############################################################
861if (!$BuildError) {
862 if ( $VERBOSE ) { print "OLDEN TEST SUITE STAGE\n"; }
863 my ($NATTime, $CBETime, $LLCTime, $JITTime, $OptTime, $BytecodeSize,
864 $MachCodeSize) = ("","","","","","","");
865 if (!$NORUNNINGTESTS) {
866 ChangeDir( "$BuildDir/llvm/projects/llvm-test/MultiSource/Benchmarks/Olden",
867 "Olden Test Directory");
868
869 # Clean out previous results...
870 system "$NICE make $MAKEOPTS clean > /dev/null 2>&1";
871
872 # Run the nightly test in this directory, with LARGE_PROBLEM_SIZE and
873 # GET_STABLE_NUMBERS enabled!
874 if( $VERBOSE ) { print "make -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv.out TEST=nightly " .
875 " LARGE_PROBLEM_SIZE=1 GET_STABLE_NUMBERS=1 > /dev/null 2>&1\n"; }
876 system "make -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv.out TEST=nightly " .
877 " LARGE_PROBLEM_SIZE=1 GET_STABLE_NUMBERS=1 > /dev/null 2>&1";
878 system "cp report.nightly.csv $OldenTestsLog";
879 } #else {
880 #system "gunzip ${OldenTestsLog}.gz";
881 #}
882
883 # Now we know we have $OldenTestsLog as the raw output file. Split
884 # it up into records and read the useful information.
885 #my @Records = split />>> ========= /, ReadFile "$OldenTestsLog";
886 #shift @Records; # Delete the first (garbage) record
887
888 # Loop over all of the records, summarizing them into rows for the running
889 # totals file.
890 #my $WallTimeRE = "Time: ([0-9.]+) seconds \\([0-9.]+ wall clock";
891 #foreach $Rec (@Records) {
892 #my $rNATTime = GetRegex 'TEST-RESULT-nat-time: program\s*([.0-9m]+)', $Rec;
893 #my $rCBETime = GetRegex 'TEST-RESULT-cbe-time: program\s*([.0-9m]+)', $Rec;
894 #my $rLLCTime = GetRegex 'TEST-RESULT-llc-time: program\s*([.0-9m]+)', $Rec;
895 #my $rJITTime = GetRegex 'TEST-RESULT-jit-time: program\s*([.0-9m]+)', $Rec;
896 #my $rOptTime = GetRegex "TEST-RESULT-compile: .*$WallTimeRE", $Rec;
897 #my $rBytecodeSize = GetRegex 'TEST-RESULT-compile: *([0-9]+)', $Rec;
898
899 #$NATTime .= " " . FormatTime($rNATTime);
900 #$CBETime .= " " . FormatTime($rCBETime);
901 #$LLCTime .= " " . FormatTime($rLLCTime);
902 #$JITTime .= " " . FormatTime($rJITTime);
903 #$OptTime .= " $rOptTime";
904 #$BytecodeSize .= " $rBytecodeSize";
905 #}
906 #
907 # Now that we have all of the numbers we want, add them to the running totals
908 # files.
909 #AddRecord($NATTime, "running_Olden_nat_time.txt", $WebDir);
910 #AddRecord($CBETime, "running_Olden_cbe_time.txt", $WebDir);
911 #AddRecord($LLCTime, "running_Olden_llc_time.txt", $WebDir);
912 #AddRecord($JITTime, "running_Olden_jit_time.txt", $WebDir);
913 #AddRecord($OptTime, "running_Olden_opt_time.txt", $WebDir);
914 #AddRecord($BytecodeSize, "running_Olden_bytecode.txt", $WebDir);
915}
916
Patrick Jenkinsf976a5c2006-07-07 18:50:51 +0000917##############################################################
918#
919# Getting end timestamp
920#
921##############################################################
922$endtime = `date`;
923
Patrick Jenkins0e316b42006-07-06 21:19:32 +0000924
925##############################################################
926#
927# Place all the logs neatly into one humungous file
928#
929##############################################################
930
931if ( $VERBOSE ) { print "PREPARING LOGS TO BE SENT TO SERVER\n"; }
932
933$machine_data = "uname: ".`uname -a`.
934 "hardware: ".`uname -m`.
935 "os: ".`uname -sr`.
936 "name: ".`uname -n`.
937 "date: ".`date \"+20%y-%m-%d\"`.
938 "time: ".`date +\"%H:%M:%S\"`;
939
940my @CVS_DATA;
941my $cvs_data;
942@CVS_DATA = ReadFile "$CVSLog";
943$cvs_data = join("\n", @CVS_DATA);
944
945my @BUILD_DATA;
946my $build_data;
947@BUILD_DATA = ReadFile "$BuildLog";
948$build_data = join("\n", @BUILD_DATA);
949
950my @DEJAGNU_LOG;
951my @DEJAGNU_SUM;
952my $dejagnutests_log;
953my $dejagnutests_sum;
954@DEJAGNU_LOG = ReadFile "$DejagnuLog";
955@DEJAGNU_SUM = ReadFile "$DejagnuSum";
956$dejagnutests_log = join("\n", @DEJAGNU_LOG);
957$dejagnutests_sum = join("\n", @DEJAGNU_SUM);
958
959my @DEJAGNULOG_FULL;
960my $dejagnulog_full;
961@DEJAGNULOG_FULL = ReadFile "$DejagnuTestsLog";
962$dejagnulog_full = join("\n", @DEJAGNULOG_FULL);
963
Patrick Jenkinsf9bafae2006-07-18 21:21:53 +0000964my $gcc_version_long="";
Patrick Jenkinsbe254602006-07-18 17:21:30 +0000965if($GCCPATH ne ""){
Patrick Jenkinsf9bafae2006-07-18 21:21:53 +0000966 $gcc_version_long = `$GCCPATH/gcc --version`;
Patrick Jenkinsbe254602006-07-18 17:21:30 +0000967 print "$GCCPATH/gcc --version\n";
Patrick Jenkins9536ec72006-07-14 20:44:09 +0000968}
969else{
Patrick Jenkinsf9bafae2006-07-18 21:21:53 +0000970 $gcc_version_long = `gcc --version`;
Patrick Jenkinsbe254602006-07-18 17:21:30 +0000971 print "gcc --version\n";
Patrick Jenkins9536ec72006-07-14 20:44:09 +0000972}
Patrick Jenkinsf9bafae2006-07-18 21:21:53 +0000973@GCC_VERSION = split '\n', $gcc_version_long;
Patrick Jenkins0e316b42006-07-06 21:19:32 +0000974my $gcc_version = $GCC_VERSION[0];
975
976##############################################################
977#
978# Send data via a post request
979#
980##############################################################
981
982if ( $VERBOSE ) { print "SEND THE DATA VIA THE POST REQUEST\n"; }
983
984
985my $host = "llvm.org";
986my $file = "/nightlytest/NightlyTestAccept.cgi";
987my %hash_of_data = ('machine_data' => $machine_data,
988 'build_data' => $build_data,
989 'gcc_version' => $gcc_version,
990 'nickname' => $nickname,
991 'dejagnutime_wall' => $DejagnuWallTime,
992 'dejagnutime_cpu' => $DejagnuTime,
993 'cvscheckouttime_wall' => $CVSCheckoutTime_Wall,
994 'cvscheckouttime_cpu' => $CVSCheckoutTime_CPU,
995 'configtime_wall' => $ConfigWallTime,
996 'configtime_cpu'=> $ConfigTime,
997 'buildtime_wall' => $BuildWallTime,
998 'buildtime_cpu' => $BuildTime,
999 'warnings' => $WarningsFile,
1000 'cvsusercommitlist' => $UserCommitList,
1001 'cvsuserupdatelist' => $UserUpdateList,
1002 'cvsaddedfiles' => $CVSAddedFiles,
1003 'cvsmodifiedfiles' => $CVSModifiedFiles,
1004 'cvsremovedfiles' => $CVSRemovedFiles,
1005 'lines_of_code' => $LOC,
1006 'cvs_file_count' => $NumFilesInCVS,
1007 'cvs_dir_count' => $NumDirsInCVS,
1008 'buildstatus' => $BuildStatus,
1009 'singlesource_programstable' => $SingleSourceProgramsTable,
1010 'multisource_programstable' => $MultiSourceProgramsTable,
Patrick Jenkins19ecfb02006-07-07 21:40:34 +00001011 'externalsource_programstable' => $ExternalProgramsTable,
Patrick Jenkins0e316b42006-07-06 21:19:32 +00001012 'llcbeta_options' => $multisource_llcbeta_options,
1013 'warnings_removed' => $WarningsRemoved,
1014 'warnings_added' => $WarningsAdded,
1015 'newly_passing_tests' => $TestsFixed,
1016 'newly_failing_tests' => $TestsBroken,
1017 'new_tests' => $TestsAdded,
1018 'removed_tests' => $TestsRemoved,
1019 'unexpfail_tests' => $unexpfail_tests,
1020 'dejagnutests_log' => $dejagnutests_log,
Patrick Jenkinsee9985b2006-07-07 21:47:24 +00001021 'dejagnutests_sum' => $dejagnutests_sum,
Patrick Jenkinsf976a5c2006-07-07 18:50:51 +00001022 'starttime' => $starttime,
1023 'endtime' => $endtime);
Patrick Jenkins0e316b42006-07-06 21:19:32 +00001024
1025$TESTING = 0;
1026
1027if($TESTING){
1028 print "============================\n";
1029 foreach $x(keys %hash_of_data){
1030 print "$x => $hash_of_data{$x}\n";
1031 }
1032}
1033else{
1034 my $response = SendData $host,$file,\%hash_of_data;
1035 print "============================\n$response";
1036}
1037
1038##############################################################
1039#
1040# Remove the cvs tree...
1041#
1042##############################################################
1043system ( "$NICE rm -rf $BuildDir") if (!$NOCHECKOUT and !$NOREMOVE);
Patrick Jenkins26d5bd52006-07-13 16:56:48 +00001044system ( "$NICE rm -rf $WebDir") if (!$NOCHECKOUT and !$NOREMOVE and !$NOREMOVERESULTS);
Patrick Jenkins0e316b42006-07-06 21:19:32 +00001045
1046