blob: 6eabad1e377a49f945a61c96ba45cd881a25673d [file] [log] [blame]
Patrick Jenkinsfe030d72006-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 Jenkinsa5c04d62006-07-07 17:31:38 +000023# -noremoveresults Do not remove the WEBDIR after it has been built.
Patrick Jenkinsfe030d72006-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 Jenkinsfe030d72006-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 Jenkins215b48f2006-07-07 18:50:51 +000054# -compileflags Next argument specifies extra options passed to make when
55# building LLVM.
Patrick Jenkinsfe030d72006-07-06 21:19:32 +000056#
57# ---------------- Options to configure llvm-test ----------------------------
Patrick Jenkins215b48f2006-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 Jenkinsfe030d72006-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 Jenkinsa5c04d62006-07-07 17:31:38 +0000121 if (/^-noremoveresults$/) { $NOREMOVERESULTS = 1; next; }
Patrick Jenkinsfe030d72006-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; }
125 if (/^-release$/) { $MAKEOPTS = "$MAKEOPTS ENABLE_OPTIMIZED=1 OPTIMIZE_OPTION=-O2"; next; }
126 if (/^-enable-llcbeta$/) { $PROGTESTOPTS .= " ENABLE_LLCBETA=1"; next; }
127 if (/^-disable-llc$/) { $PROGTESTOPTS .= " DISABLE_LLC=1";
128 $CONFIGUREARGS .= " --disable-llc_diffs"; next; }
129 if (/^-disable-jit$/) { $PROGTESTOPTS .= " DISABLE_JIT=1";
130 $CONFIGUREARGS .= " --disable-jit"; next; }
131 if (/^-verbose$/) { $VERBOSE = 1; next; }
132 if (/^-debug$/) { $DEBUG = 1; next; }
133 if (/^-nice$/) { $NICE = "nice "; next; }
134 if (/^-f2c$/) {
135 $CONFIGUREARGS .= " --with-f2c=$ARGV[0]"; shift; next;
136 }
137 if (/^-with-externals/) {
138 $CONFIGUREARGS .= "--with-externals=$ARGV[0]"; shift; next;
139 }
140 if (/^-nickname$/) { $nickname = "$ARGV[0]"; shift; next; }
Patrick Jenkins79fbf7f2006-07-14 20:44:09 +0000141 if (/^-gccpath/) { $CONFIGUREARGS .= " CC=$ARGV[0]/gcc CXX=$ARGV[0]/g++";
142 $GCCPATH=$ARGV[0];
143 shift;
144 next;}
Patrick Jenkinsfe030d72006-07-06 21:19:32 +0000145 if (/^-cvstag/) { $CVSCOOPT .= " -r $ARGV[0]"; shift; next; } else{ $CVSCOOPT="";}
146 if (/^-target/) {
147 $CONFIGUREARGS .= " --target=$ARGV[0]"; shift; next;
148 }
149 if (/^-cflags/) {
150 $MAKEOPTS = "$MAKEOPTS C.Flags=\'$ARGV[0]\'"; shift; next;
151 }
152 if (/^-cxxflags/) {
153 $MAKEOPTS = "$MAKEOPTS CXX.Flags=\'$ARGV[0]\'"; shift; next;
154 }
155 if (/^-ldflags/) {
156 $MAKEOPTS = "$MAKEOPTS LD.Flags=\'$ARGV[0]\'"; shift; next;
157 }
158 if (/^-compileflags/) {
159 $MAKEOPTS = "$MAKEOPTS $ARGV[0]"; shift; next;
160 }
161 if (/^-extraflags/) {
162 $PROGTESTOPTS .= " EXTRA_FLAGS=\'$ARGV[0]\'"; shift; next;
163 }
164 if (/^-noexternals$/) { $NOEXTERNALS = 1; next; }
165 if (/^-nodejagnu$/) { $NODEJAGNU = 1; next; }
166 if (/^-nobuild$/) { $NOBUILD = 1; next; }
Patrick Jenkinsfe030d72006-07-06 21:19:32 +0000167 print "Unknown option: $_ : ignoring!\n";
168}
169
170if ($ENV{'LLVMGCCDIR'}) {
171 $CONFIGUREARGS .= " --with-llvmgccdir=" . $ENV{'LLVMGCCDIR'};
172}
173if ($CONFIGUREARGS !~ /--disable-jit/) {
174 $CONFIGUREARGS .= " --enable-jit";
175}
176
177die "Must specify 0 or 3 options!" if (@ARGV != 0 and @ARGV != 3);
178
179if (@ARGV == 3) {
180 $CVSRootDir = $ARGV[0];
181 $BuildDir = $ARGV[1];
182 $WebDir = $ARGV[2];
183}
184
185##############################################################
186#
187#define the file names we'll use
188#
189##############################################################
190my $Prefix = "$WebDir/$DATE";
191my $BuildLog = "$Prefix-Build-Log.txt";
192my $CVSLog = "$Prefix-CVS-Log.txt";
193my $OldenTestsLog = "$Prefix-Olden-tests.txt";
194my $SingleSourceLog = "$Prefix-SingleSource-ProgramTest.txt.gz";
195my $MultiSourceLog = "$Prefix-MultiSource-ProgramTest.txt.gz";
196my $ExternalLog = "$Prefix-External-ProgramTest.txt.gz";
197my $DejagnuLog = "$Prefix-Dejagnu-testrun.log";
198my $DejagnuSum = "$Prefix-Dejagnu-testrun.sum";
199my $DejagnuTestsLog = "$Prefix-DejagnuTests-Log.txt";
200if (! -d $WebDir) {
201 mkdir $WebDir, 0777;
202 warn "$WebDir did not exist; creating it.\n";
203}
204
205if ($VERBOSE) {
206 print "INITIALIZED\n";
207 print "CVS Root = $CVSRootDir\n";
208 print "BuildDir = $BuildDir\n";
209 print "WebDir = $WebDir\n";
210 print "Prefix = $Prefix\n";
211 print "CVSLog = $CVSLog\n";
212 print "BuildLog = $BuildLog\n";
213}
214
215##############################################################
216#
217# Helper functions
218#
219##############################################################
220sub GetDir {
221 my $Suffix = shift;
222 opendir DH, $WebDir;
223 my @Result = reverse sort grep !/$DATE/, grep /[-0-9]+$Suffix/, readdir DH;
224 closedir DH;
225 return @Result;
226}
227
228#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
229#
230# DiffFiles - Diff the current version of the file against the last version of
231# the file, reporting things added and removed. This is used to report, for
232# example, added and removed warnings. This returns a pair (added, removed)
233#
234#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
235sub DiffFiles {
236 my $Suffix = shift;
237 my @Others = GetDir $Suffix;
238 if (@Others == 0) { # No other files? We added all entries...
239 return (`cat $WebDir/$DATE$Suffix`, "");
240 }
241 # Diff the files now...
242 my @Diffs = split "\n", `diff $WebDir/$DATE$Suffix $WebDir/$Others[0]`;
243 my $Added = join "\n", grep /^</, @Diffs;
244 my $Removed = join "\n", grep /^>/, @Diffs;
245 $Added =~ s/^< //gm;
246 $Removed =~ s/^> //gm;
247 return ($Added, $Removed);
248}
249
250#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
251#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
252sub GetRegex { # (Regex with ()'s, value)
253 $_[1] =~ /$_[0]/m;
254 if (defined($1)) {
255 return $1;
256 }
257 return "0";
258}
259
260#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
261#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
262sub GetRegexNum {
263 my ($Regex, $Num, $Regex2, $File) = @_;
264 my @Items = split "\n", `grep '$Regex' $File`;
265 return GetRegex $Regex2, $Items[$Num];
266}
267
268#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
269#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
270sub ChangeDir { # directory, logical name
271 my ($dir,$name) = @_;
272 chomp($dir);
273 if ( $VERBOSE ) { print "Changing To: $name ($dir)\n"; }
274 chdir($dir) || die "Cannot change directory to: $name ($dir) ";
275}
276
277#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
278#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
279sub ReadFile {
280 if (open (FILE, $_[0])) {
281 undef $/;
282 my $Ret = <FILE>;
283 close FILE;
284 $/ = '\n';
285 return $Ret;
286 } else {
Patrick Jenkins7267bd62006-07-10 18:35:41 +0000287 print "Could not open file '$_[0]' for reading!\n";
Patrick Jenkinsfe030d72006-07-06 21:19:32 +0000288 return "";
289 }
290}
291
292#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
293#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
294sub WriteFile { # (filename, contents)
Patrick Jenkins7267bd62006-07-10 18:35:41 +0000295 open (FILE, ">$_[0]") or die "Could not open file '$_[0]' for writing!\n";
Patrick Jenkinsfe030d72006-07-06 21:19:32 +0000296 print FILE $_[1];
297 close FILE;
298}
299
300#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
301#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
302sub CopyFile { #filename, newfile
303 my ($file, $newfile) = @_;
304 chomp($file);
305 if ($VERBOSE) { print "Copying $file to $newfile\n"; }
306 copy($file, $newfile);
307}
308
309#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
310#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
311sub AddRecord {
312 my ($Val, $Filename,$WebDir) = @_;
313 my @Records;
314 if (open FILE, "$WebDir/$Filename") {
315 @Records = grep !/$DATE/, split "\n", <FILE>;
316 close FILE;
317 }
318 push @Records, "$DATE: $Val";
319 WriteFile "$WebDir/$Filename", (join "\n", @Records) . "\n";
320}
321
322#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
323#
324# FormatTime - Convert a time from 1m23.45 into 83.45
325#
326#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
327sub FormatTime {
328 my $Time = shift;
329 if ($Time =~ m/([0-9]+)m([0-9.]+)/) {
330 $Time = sprintf("%7.4f", $1*60.0+$2);
331 }
332 return $Time;
333}
334
335#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
336#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
337sub GetDejagnuTestResults { # (filename, log)
338 my ($filename, $DejagnuLog) = @_;
339 my @lines;
340 my $firstline;
341 $/ = "\n"; #Make sure we're going line at a time.
342
343 print "DEJAGNU TEST RESULTS:\n";
344
345 if (open SRCHFILE, $filename) {
346 # Process test results
347 my $first_list = 1;
348 my $should_break = 1;
349 my $nocopy = 0;
350 my $readingsum = 0;
351 while ( <SRCHFILE> ) {
352 if ( length($_) > 1 ) {
353 chomp($_);
354 if ( m/^XPASS:/ || m/^FAIL:/ ) {
355 $nocopy = 0;
356 if ( $first_list ) {
357 push(@lines, "UNEXPECTED TEST RESULTS\n");
358 $first_list = 0;
359 $should_break = 1;
360 push(@lines, "$_\n");
361 print " $_\n";
362 } else {
363 push(@lines, "$_\n");
364 print " $_\n";
365 }
366 } #elsif ( m/Summary/ ) {
367 # if ( $first_list ) {
368 # push(@lines, "PERFECT!");
369 # print " PERFECT!\n";
370 # } else {
371 # push(@lines, "</li></ol>\n");
372 # }
373 # push(@lines, "STATISTICS\n");
374 # print "\nDEJAGNU STATISTICS:\n";
375 # $should_break = 0;
376 # $nocopy = 0;
377 # $readingsum = 1;
378 #}
379 elsif ( $readingsum ) {
380 push(@lines,"$_\n");
381 print " $_\n";
382 }
383
384 }
385 }
386 }
387 close SRCHFILE;
388
389 my $content = join("", @lines);
390 return $content;
391}
392
393
394#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
395#
396# This function acts as a mini web browswer submitting data
397# to our central server via the post method
398#
399#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
400sub SendData{
401 $host = $_[0];
402 $file = $_[1];
403 $variables=$_[2];
404
405 $port=80;
406 $socketaddr= sockaddr_in $port, inet_aton $host or die "Bad hostname\n";
407 socket SOCK, PF_INET, SOCK_STREAM, getprotobyname('tcp') or die "Bad socket\n";
408 connect SOCK, $socketaddr or die "Bad connection\n";
409 select((select(SOCK), $| = 1)[0]);
410
411 #creating content here
412 my $content;
413 foreach $key (keys (%$variables)){
414 $value = $variables->{$key};
415 $value =~ s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;
416 $content .= "$key=$value&";
417 }
418
419 $length = length($content);
420
421 my $send= "POST $file HTTP/1.0\n";
422 $send.= "Content-Type: application/x-www-form-urlencoded\n";
423 $send.= "Content-length: $length\n\n";
424 $send.= "$content";
425
426 print SOCK $send;
427 my $result;
428 while(<SOCK>){
429 $result .= $_;
430 }
431 close(SOCK);
432
433 my $sentdata="";
Patrick Jenkins4c4e3562006-07-07 21:40:34 +0000434 foreach $x (keys (%$variables)){
Patrick Jenkins7267bd62006-07-10 18:35:41 +0000435 $value = $variables->{$x};
436 $sentdata.= "$x => $value\n";
Patrick Jenkinsfe030d72006-07-06 21:19:32 +0000437 }
438 WriteFile "$Prefix-sentdata.txt", $sentdata;
Patrick Jenkins4c4e3562006-07-07 21:40:34 +0000439
Patrick Jenkinsfe030d72006-07-06 21:19:32 +0000440
441 return $result;
442}
443
Patrick Jenkins215b48f2006-07-07 18:50:51 +0000444##############################################################
445#
446# Getting Start timestamp
447#
448##############################################################
449$starttime = `date`;
Patrick Jenkinsfe030d72006-07-06 21:19:32 +0000450
451##############################################################
452#
453# Create the CVS repository directory
454#
455##############################################################
456if (!$NOCHECKOUT) {
457 if (-d $BuildDir) {
458 if (!$NOREMOVE) {
459 system "rm -rf $BuildDir";
460 } else {
461 die "CVS checkout directory $BuildDir already exists!";
462 }
463 }
464 mkdir $BuildDir or die "Could not create CVS checkout directory $BuildDir!";
465}
466ChangeDir( $BuildDir, "CVS checkout directory" );
467
468
469##############################################################
470#
471# Check out the llvm tree, saving CVS messages to the cvs log...
472#
473##############################################################
474my $CVSOPT = "";
475# Use compression if going over ssh.
476$CVSOPT = "-z3" if $CVSRootDir =~ /^:ext:/;
477my $CVSCMD = "$NICE cvs $CVSOPT -d $CVSRootDir co $CVSCOOPT";
478if (!$NOCHECKOUT) {
479 if ( $VERBOSE )
480 {
481 print "CHECKOUT STAGE:\n";
482 print "( time -p $CVSCMD llvm; cd llvm/projects ; $CVSCMD llvm-test ) > $CVSLog 2>&1\n";
483 }
484 system "( time -p $CVSCMD llvm; cd llvm/projects ; " .
485 "$CVSCMD llvm-test ) > $CVSLog 2>&1";
486 ChangeDir( $BuildDir , "CVS Checkout directory") ;
487}
488ChangeDir( "llvm" , "llvm source directory") ;
489if (!$NOCHECKOUT) {
490 if ( $VERBOSE ) { print "UPDATE STAGE\n"; }
491 system "$NICE cvs update -PdRA >> $CVSLog 2>&1" ;
492}
493
494##############################################################
495#
496# Get some static statistics about the current state of CVS
497#
498# This can probably be put on the server side
499#
500##############################################################
501my $CVSCheckoutTime_Wall = GetRegex "([0-9.]+)", `grep '^real' $CVSLog`;
502my $CVSCheckoutTime_User = GetRegex "([0-9.]+)", `grep '^user' $CVSLog`;
503my $CVSCheckoutTime_Sys = GetRegex "([0-9.]+)", `grep '^sys' $CVSLog`;
504my $CVSCheckoutTime_CPU = $CVSCheckoutTime_User + $CVSCheckoutTime_Sys;
505
506my $NumFilesInCVS = `egrep '^U' $CVSLog | wc -l` + 0;
507my $NumDirsInCVS = `egrep '^cvs (checkout|server|update):' $CVSLog | wc -l` + 0;
508my $LOC = `utils/countloc.sh`;
509
510##############################################################
511#
512# Extract some information from the CVS history... use a hash so no duplicate
513# stuff is stored. This gets the history from the previous days worth
514# of cvs activit and parses it.
515#
516##############################################################
517
518my (%AddedFiles, %ModifiedFiles, %RemovedFiles, %UsersCommitted, %UsersUpdated);
519
520if(!$NOCVSSTATS){
521
522if ($VERBOSE) { print "CVS HISTORY ANALYSIS STAGE\n"; }
523@CVSHistory = split "\n", `cvs history -D '1 day ago' -a -xAMROCGUW`;
524#print join "\n", @CVSHistory; print "\n";
525
526my $DateRE = '[-/:0-9 ]+\+[0-9]+';
527
528# Loop over every record from the CVS history, filling in the hashes.
529foreach $File (@CVSHistory) {
530 my ($Type, $Date, $UID, $Rev, $Filename);
531 if ($File =~ /([AMRUGC]) ($DateRE) ([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+)/) {
532 ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, $4, "$6/$5");
533 } elsif ($File =~ /([W]) ($DateRE) ([^ ]+)/) {
534 ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, "", "");
535 } elsif ($File =~ /([O]) ($DateRE) ([^ ]+) +([^ ]+)/) {
536 ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, "", "$4/");
537 } else {
538 print "UNMATCHABLE: $File\n";
539 next;
540 }
541 # print "$File\nTy = $Type Date = '$Date' UID=$UID Rev=$Rev File = '$Filename'\n";
542
543 if ($Filename =~ /^llvm/) {
544 if ($Type eq 'M') { # Modified
545 $ModifiedFiles{$Filename} = 1;
546 $UsersCommitted{$UID} = 1;
547 } elsif ($Type eq 'A') { # Added
Patrick Jenkins4bde3bc2006-07-13 16:56:48 +0000548 $AddedFiles{$Filename} = 1;
Patrick Jenkinsfe030d72006-07-06 21:19:32 +0000549 $UsersCommitted{$UID} = 1;
550 } elsif ($Type eq 'R') { # Removed
551 $RemovedFiles{$Filename} = 1;
552 $UsersCommitted{$UID} = 1;
553 } else {
554 $UsersUpdated{$UID} = 1;
555 }
556 }
557}
558
559my $TestError = 1;
560
561}#!NOCVSSTATS
562
563my $CVSAddedFiles = join "\n", sort keys %AddedFiles;
564my $CVSModifiedFiles = join "\n", sort keys %ModifiedFiles;
565my $CVSRemovedFiles = join "\n", sort keys %RemovedFiles;
566my $UserCommitList = join "\n", sort keys %UsersCommitted;
567my $UserUpdateList = join "\n", sort keys %UsersUpdated;
568
569##############################################################
570#
571# Build the entire tree, saving build messages to the build log
572#
573##############################################################
574if (!$NOCHECKOUT && !$NOBUILD) {
Patrick Jenkins4bde3bc2006-07-13 16:56:48 +0000575 my $EXTRAFLAGS = "--enable-spec --with-objroot=.";
Patrick Jenkinsfe030d72006-07-06 21:19:32 +0000576 if ( $VERBOSE )
577 {
578 print "CONFIGURE STAGE:\n";
579 print "(time -p $NICE ./configure $CONFIGUREARGS $EXTRAFLAGS) > $BuildLog 2>&1\n";
580 }
581 system "(time -p $NICE ./configure $CONFIGUREARGS $EXTRAFLAGS) > $BuildLog 2>&1";
582 if ( $VERBOSE )
583 {
584 print "BUILD STAGE:\n";
585 print "(time -p $NICE make $MAKEOPTS) >> $BuildLog 2>&1\n";
586 }
587 # Build the entire tree, capturing the output into $BuildLog
588 system "(time -p $NICE make $MAKEOPTS) >> $BuildLog 2>&1";
589}
590
591
592##############################################################
593#
594# Get some statistics about the build...
595#
596##############################################################
597#this can de done on server
598#my @Linked = split '\n', `grep Linking $BuildLog`;
599#my $NumExecutables = scalar(grep(/executable/, @Linked));
600#my $NumLibraries = scalar(grep(!/executable/, @Linked));
601#my $NumObjects = `grep ']\: Compiling ' $BuildLog | wc -l` + 0;
602
603
604my $ConfigTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$BuildLog";
605my $ConfigTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$BuildLog";
606my $ConfigTime = $ConfigTimeU+$ConfigTimeS; # ConfigTime = User+System
607my $ConfigWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$BuildLog";
608
609$ConfigTime=-1 unless $ConfigTime;
610$ConfigWallTime=-1 unless $ConfigWallTime;
611
612my $BuildTimeU = GetRegexNum "^user", 1, "([0-9.]+)", "$BuildLog";
613my $BuildTimeS = GetRegexNum "^sys", 1, "([0-9.]+)", "$BuildLog";
614my $BuildTime = $BuildTimeU+$BuildTimeS; # BuildTime = User+System
615my $BuildWallTime = GetRegexNum "^real", 1, "([0-9.]+)","$BuildLog";
616
617$BuildTime=-1 unless $BuildTime;
618$BuildWallTime=-1 unless $BuildWallTime;
619
620my $BuildError = 0, $BuildStatus = "OK";
621if($NOBUILD){
622 $BuildStatus = "Skipped by user";
623 $BuildError = 1;
624}
625elsif (`grep '^make[^:]*: .*Error' $BuildLog | wc -l` + 0 ||
626 `grep '^make: \*\*\*.*Stop.' $BuildLog | wc -l`+0) {
627 $BuildStatus = "Error: compilation aborted";
628 $BuildError = 1;
629 print "\n***ERROR BUILDING TREE\n\n";
630}
631if ($BuildError) { $NODEJAGNU=1; }
632
633##############################################################
634#
635# Running dejagnu tests
636#
637##############################################################
638my $DejangnuTestResults; # String containing the results of the dejagnu
639my $dejagnu_output = "$DejagnuTestsLog";
640if(!$NODEJAGNU) {
641 if($VERBOSE)
642 {
643 print "DEJAGNU FEATURE/REGRESSION TEST STAGE:\n";
644 print "(time -p make $MAKEOPTS check) > $dejagnu_output 2>&1\n";
645 }
646
647 #Run the feature and regression tests, results are put into testrun.sum
648 #Full log in testrun.log
649 system "(time -p make $MAKEOPTS check) > $dejagnu_output 2>&1";
650
651 #Copy the testrun.log and testrun.sum to our webdir
652 CopyFile("test/testrun.log", $DejagnuLog);
653 CopyFile("test/testrun.sum", $DejagnuSum);
654 #can be done on server
655 $DejagnuTestResults = GetDejagnuTestResults($DejagnuSum, $DejagnuLog);
656 $unexpfail_tests = $DejagnuTestResults;
657}
658#Extract time of dejagnu tests
659my $DejagnuTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$dejagnu_output";
660my $DejagnuTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$dejagnu_output";
661$DejagnuTime = $DejagnuTimeU+$DejagnuTimeS; # DejagnuTime = User+System
662$DejagnuWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$dejagnu_output";
663$DejagnuTestResults = "Dejagnu skipped by user choice." unless $DejagnuTestResults;
664$DejagnuTime = "0.0" unless $DejagnuTime;
665$DejagnuWallTime = "0.0" unless $DejagnuWallTime;
666
667if ($DEBUG) {
668 print $DejagnuTestResults;
669}
670
671##############################################################
672#
673# Get warnings from the build
674#
675##############################################################
676if(!$NODEJAGNU){
677
678if ( $VERBOSE ) { print "BUILD INFORMATION COLLECTION STAGE\n"; }
679my @Warn = split "\n", `egrep 'warning:|Entering dir' $BuildLog`;
680my @Warnings;
681my $CurDir = "";
682
683foreach $Warning (@Warn) {
684 if ($Warning =~ m/Entering directory \`([^\`]+)\'/) {
685 $CurDir = $1; # Keep track of directory warning is in...
686 if ($CurDir =~ m#$BuildDir/llvm/(.*)#) { # Remove buildir prefix if included
687 $CurDir = $1;
688 }
689 } else {
690 push @Warnings, "$CurDir/$Warning"; # Add directory to warning...
691 }
692}
693my $WarningsFile = join "\n", @Warnings;
694$WarningsFile =~ s/:[0-9]+:/::/g;
695
696# Emit the warnings file, so we can diff...
697WriteFile "$WebDir/$DATE-Warnings.txt", $WarningsFile . "\n";
Patrick Jenkinsc6d945f2006-07-06 22:32:15 +0000698my ($WarningsAdded, $WarningsRemoved) = DiffFiles "-Warnings.txt";
Patrick Jenkinsfe030d72006-07-06 21:19:32 +0000699
700# Output something to stdout if something has changed
701#print "ADDED WARNINGS:\n$WarningsAdded\n\n" if (length $WarningsAdded);
702#print "REMOVED WARNINGS:\n$WarningsRemoved\n\n" if (length $WarningsRemoved);
703
704#my @TmpWarningsAdded = split "\n", $WarningsAdded; ~PJ on upgrade
705#my @TmpWarningsRemoved = split "\n", $WarningsRemoved; ~PJ on upgrade
706
707} #endif !NODEGAGNU
708
709##############################################################
710#
711# If we built the tree successfully, run the nightly programs tests...
712#
713# A set of tests to run is passed in (i.e. "SingleSource" "MultiSource" "External")
714#
715##############################################################
716sub TestDirectory {
717 my $SubDir = shift;
718
719 ChangeDir( "projects/llvm-test/$SubDir", "Programs Test Subdirectory" );
720
721 my $ProgramTestLog = "$Prefix-$SubDir-ProgramTest.txt";
722 #my $ProgramTestLog = "$Prefix-MultiSource-ProgramTest.txt"; #CHANGE ME!
723
724 # Run the programs tests... creating a report.nightly.csv file
725 if (!$NOTEST) {
726 print "make -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv "
727 . "TEST=nightly > $ProgramTestLog 2>&1\n";
728 system "make -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv "
729 . "TEST=nightly > $ProgramTestLog 2>&1";
730 $llcbeta_options=`make print-llcbeta-option`;
731 }
732
733 my $ProgramsTable;
734 if (`grep '^make[^:]: .*Error' $ProgramTestLog | wc -l` + 0){
735 $TestError = 1;
736 $ProgramsTable="Error running test $SubDir\n";
737 print "ERROR TESTING\n";
738 } elsif (`grep '^make[^:]: .*No rule to make target' $ProgramTestLog | wc -l` + 0) {
739 $TestError = 1;
740 $ProgramsTable="Makefile error running tests $SubDir!\n";
741 print "ERROR TESTING\n";
742 } else {
743 $TestError = 0;
744
745 #
746 # Create a list of the tests which were run...
747 #
748 system "egrep 'TEST-(PASS|FAIL)' < $ProgramTestLog "
749 . "| sort > $Prefix-multisourceprogramstable.txt";
750 }
751 $ProgramsTable = ReadFile "report.nightly.csv";
752
753 ChangeDir( "../../..", "Programs Test Parent Directory" );
754 return ($ProgramsTable, $llcbeta_options);
755}
756
757$patrickjenkins=1;
758if(!$patrickjenkins){
759 if ( $VERBOSE ) {
760 print "Modified Multisource Olden test stage\n";
761 }
762 ($MultiSourceProgramsTable, $multisource_llcbeta_options) = TestDirectory("MultiSource/");
763 ChangeDir( "../../..", "Programs Test Parent Directory" );
764
765
766 WriteFile "$WebDir/multisourceprogramstable.txt", $MultiSourceProgramsTable;
767}
768if (!$BuildError && $patrickjenkins) {
769 if ( $VERBOSE ) {
770 print "SingleSource TEST STAGE\n";
771 }
Patrick Jenkins4bde3bc2006-07-13 16:56:48 +0000772 ($SingleSourceProgramsTable, $llcbeta_options) = TestDirectory("SingleSource");
Patrick Jenkinsfe030d72006-07-06 21:19:32 +0000773 WriteFile "$Prefix-singlesourceprogramstable.txt", $SingleSourceProgramsTable;
774 if ( $VERBOSE ) {
775 print "MultiSource TEST STAGE\n";
776 }
Patrick Jenkins4bde3bc2006-07-13 16:56:48 +0000777 ($MultiSourceProgramsTable, $llcbeta_options) = TestDirectory("MultiSource");
Patrick Jenkinsfe030d72006-07-06 21:19:32 +0000778 WriteFile "$Prefix-multisourceprogramstable.txt", $MultiSourceProgramsTable;
779 if ( ! $NOEXTERNALS ) {
780 if ( $VERBOSE ) {
781 print "External TEST STAGE\n";
782 }
Patrick Jenkins0b7ae542006-07-13 16:58:42 +0000783 ($ExternalProgramsTable, $llcbeta_options) = TestDirectory("External");
Patrick Jenkins7b4bb602006-07-10 16:36:19 +0000784 WriteFile "$Prefix-externalprogramstable.txt", $ExternalProgramsTable;
Patrick Jenkinsfe030d72006-07-06 21:19:32 +0000785 system "cat $Prefix-singlesourceprogramstable.txt $Prefix-multisourceprogramstable.txt ".
786 " $Prefix-externalprogramstable.txt | sort > $Prefix-Tests.txt";
787 } else {
788 $ExternalProgramsTable = "External TEST STAGE SKIPPED\n";
789 if ( $VERBOSE ) {
790 print "External TEST STAGE SKIPPED\n";
791 }
792 system "cat $Prefix-singlesourceprogramstable.txt $Prefix-multisourceprogramstable.txt ".
793 " | sort > $Prefix-Tests.txt";
794 }
795 WriteFile "$Prefix-externalprogramstable.txt", $ExternalProgramsTable;
796
797}
798
799##############################################################
800#
801#
802# gathering tests added removed broken information here
803#
804#
805##############################################################
806my ($TestsAdded, $TestsRemoved, $TestsFixed, $TestsBroken) = ("","","","");
807
808if ($TestError) {
809 $TestsAdded = "<b>error testing</b><br>";
810 $TestsRemoved = "<b>error testing</b><br>";
811 $TestsFixed = "<b>error testing</b><br>";
812 $TestsBroken = "<b>error testing</b><br>";
813} else {
Patrick Jenkinsc6d945f2006-07-06 22:32:15 +0000814 my ($RTestsAdded, $RTestsRemoved) = DiffFiles "-Tests.txt";
Patrick Jenkinsfe030d72006-07-06 21:19:32 +0000815
816 my @RawTestsAddedArray = split '\n', $RTestsAdded;
817 my @RawTestsRemovedArray = split '\n', $RTestsRemoved;
818
819 my %OldTests = map {GetRegex('TEST-....: (.+)', $_)=>$_}
820 @RawTestsRemovedArray;
821 my %NewTests = map {GetRegex('TEST-....: (.+)', $_)=>$_}
822 @RawTestsAddedArray;
823
824 foreach $Test (keys %NewTests) {
825 if (!exists $OldTests{$Test}) { # TestAdded if in New but not old
826 $TestsAdded = "$TestsAdded$Test\n";
827 } else {
828 if ($OldTests{$Test} =~ /TEST-PASS/) { # Was the old one a pass?
829 $TestsBroken = "$TestsBroken$Test\n"; # New one must be a failure
830 } else {
831 $TestsFixed = "$TestsFixed$Test\n"; # No, new one is a pass.
832 }
833 }
834 }
835 foreach $Test (keys %OldTests) { # TestRemoved if in Old but not New
836 $TestsRemoved = "$TestsRemoved$Test\n" if (!exists $NewTests{$Test});
837 }
838
839 #print "\nTESTS ADDED: \n\n$TestsAdded\n\n" if (length $TestsAdded);
840 #print "\nTESTS REMOVED:\n\n$TestsRemoved\n\n" if (length $TestsRemoved);
841 #print "\nTESTS FIXED: \n\n$TestsFixed\n\n" if (length $TestsFixed);
842 #print "\nTESTS BROKEN: \n\n$TestsBroken\n\n" if (length $TestsBroken);
843
844 #$TestsAdded = AddPreTag $TestsAdded;
845 #$TestsRemoved = AddPreTag $TestsRemoved;
846 #$TestsFixed = AddPreTag $TestsFixed;
847 #$TestsBroken = AddPreTag $TestsBroken;
848}
849
850##############################################################
851#
852# If we built the tree successfully, runs of the Olden suite with
853# LARGE_PROBLEM_SIZE on so that we can get some "running" statistics.
854#
855##############################################################
856if (!$BuildError) {
857 if ( $VERBOSE ) { print "OLDEN TEST SUITE STAGE\n"; }
858 my ($NATTime, $CBETime, $LLCTime, $JITTime, $OptTime, $BytecodeSize,
859 $MachCodeSize) = ("","","","","","","");
860 if (!$NORUNNINGTESTS) {
861 ChangeDir( "$BuildDir/llvm/projects/llvm-test/MultiSource/Benchmarks/Olden",
862 "Olden Test Directory");
863
864 # Clean out previous results...
865 system "$NICE make $MAKEOPTS clean > /dev/null 2>&1";
866
867 # Run the nightly test in this directory, with LARGE_PROBLEM_SIZE and
868 # GET_STABLE_NUMBERS enabled!
869 if( $VERBOSE ) { print "make -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv.out TEST=nightly " .
870 " LARGE_PROBLEM_SIZE=1 GET_STABLE_NUMBERS=1 > /dev/null 2>&1\n"; }
871 system "make -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv.out TEST=nightly " .
872 " LARGE_PROBLEM_SIZE=1 GET_STABLE_NUMBERS=1 > /dev/null 2>&1";
873 system "cp report.nightly.csv $OldenTestsLog";
874 } #else {
875 #system "gunzip ${OldenTestsLog}.gz";
876 #}
877
878 # Now we know we have $OldenTestsLog as the raw output file. Split
879 # it up into records and read the useful information.
880 #my @Records = split />>> ========= /, ReadFile "$OldenTestsLog";
881 #shift @Records; # Delete the first (garbage) record
882
883 # Loop over all of the records, summarizing them into rows for the running
884 # totals file.
885 #my $WallTimeRE = "Time: ([0-9.]+) seconds \\([0-9.]+ wall clock";
886 #foreach $Rec (@Records) {
887 #my $rNATTime = GetRegex 'TEST-RESULT-nat-time: program\s*([.0-9m]+)', $Rec;
888 #my $rCBETime = GetRegex 'TEST-RESULT-cbe-time: program\s*([.0-9m]+)', $Rec;
889 #my $rLLCTime = GetRegex 'TEST-RESULT-llc-time: program\s*([.0-9m]+)', $Rec;
890 #my $rJITTime = GetRegex 'TEST-RESULT-jit-time: program\s*([.0-9m]+)', $Rec;
891 #my $rOptTime = GetRegex "TEST-RESULT-compile: .*$WallTimeRE", $Rec;
892 #my $rBytecodeSize = GetRegex 'TEST-RESULT-compile: *([0-9]+)', $Rec;
893
894 #$NATTime .= " " . FormatTime($rNATTime);
895 #$CBETime .= " " . FormatTime($rCBETime);
896 #$LLCTime .= " " . FormatTime($rLLCTime);
897 #$JITTime .= " " . FormatTime($rJITTime);
898 #$OptTime .= " $rOptTime";
899 #$BytecodeSize .= " $rBytecodeSize";
900 #}
901 #
902 # Now that we have all of the numbers we want, add them to the running totals
903 # files.
904 #AddRecord($NATTime, "running_Olden_nat_time.txt", $WebDir);
905 #AddRecord($CBETime, "running_Olden_cbe_time.txt", $WebDir);
906 #AddRecord($LLCTime, "running_Olden_llc_time.txt", $WebDir);
907 #AddRecord($JITTime, "running_Olden_jit_time.txt", $WebDir);
908 #AddRecord($OptTime, "running_Olden_opt_time.txt", $WebDir);
909 #AddRecord($BytecodeSize, "running_Olden_bytecode.txt", $WebDir);
910}
911
Patrick Jenkins215b48f2006-07-07 18:50:51 +0000912##############################################################
913#
914# Getting end timestamp
915#
916##############################################################
917$endtime = `date`;
918
Patrick Jenkinsfe030d72006-07-06 21:19:32 +0000919
920##############################################################
921#
922# Place all the logs neatly into one humungous file
923#
924##############################################################
925
926if ( $VERBOSE ) { print "PREPARING LOGS TO BE SENT TO SERVER\n"; }
927
928$machine_data = "uname: ".`uname -a`.
929 "hardware: ".`uname -m`.
930 "os: ".`uname -sr`.
931 "name: ".`uname -n`.
932 "date: ".`date \"+20%y-%m-%d\"`.
933 "time: ".`date +\"%H:%M:%S\"`;
934
935my @CVS_DATA;
936my $cvs_data;
937@CVS_DATA = ReadFile "$CVSLog";
938$cvs_data = join("\n", @CVS_DATA);
939
940my @BUILD_DATA;
941my $build_data;
942@BUILD_DATA = ReadFile "$BuildLog";
943$build_data = join("\n", @BUILD_DATA);
944
945my @DEJAGNU_LOG;
946my @DEJAGNU_SUM;
947my $dejagnutests_log;
948my $dejagnutests_sum;
949@DEJAGNU_LOG = ReadFile "$DejagnuLog";
950@DEJAGNU_SUM = ReadFile "$DejagnuSum";
951$dejagnutests_log = join("\n", @DEJAGNU_LOG);
952$dejagnutests_sum = join("\n", @DEJAGNU_SUM);
953
954my @DEJAGNULOG_FULL;
955my $dejagnulog_full;
956@DEJAGNULOG_FULL = ReadFile "$DejagnuTestsLog";
957$dejagnulog_full = join("\n", @DEJAGNULOG_FULL);
958
Patrick Jenkins79fbf7f2006-07-14 20:44:09 +0000959if($GCCPATH){
960 my $gcc_version_long = `$ARGV[0]/gcc --version`;
961}
962else{
963 my $gcc_version_long = `gcc --version`;
964}
Patrick Jenkinsfe030d72006-07-06 21:19:32 +0000965@GCC_VERSION = split "\n", $gcc_version_long;
966my $gcc_version = $GCC_VERSION[0];
967
968##############################################################
969#
970# Send data via a post request
971#
972##############################################################
973
974if ( $VERBOSE ) { print "SEND THE DATA VIA THE POST REQUEST\n"; }
975
976
977my $host = "llvm.org";
978my $file = "/nightlytest/NightlyTestAccept.cgi";
979my %hash_of_data = ('machine_data' => $machine_data,
980 'build_data' => $build_data,
981 'gcc_version' => $gcc_version,
982 'nickname' => $nickname,
983 'dejagnutime_wall' => $DejagnuWallTime,
984 'dejagnutime_cpu' => $DejagnuTime,
985 'cvscheckouttime_wall' => $CVSCheckoutTime_Wall,
986 'cvscheckouttime_cpu' => $CVSCheckoutTime_CPU,
987 'configtime_wall' => $ConfigWallTime,
988 'configtime_cpu'=> $ConfigTime,
989 'buildtime_wall' => $BuildWallTime,
990 'buildtime_cpu' => $BuildTime,
991 'warnings' => $WarningsFile,
992 'cvsusercommitlist' => $UserCommitList,
993 'cvsuserupdatelist' => $UserUpdateList,
994 'cvsaddedfiles' => $CVSAddedFiles,
995 'cvsmodifiedfiles' => $CVSModifiedFiles,
996 'cvsremovedfiles' => $CVSRemovedFiles,
997 'lines_of_code' => $LOC,
998 'cvs_file_count' => $NumFilesInCVS,
999 'cvs_dir_count' => $NumDirsInCVS,
1000 'buildstatus' => $BuildStatus,
1001 'singlesource_programstable' => $SingleSourceProgramsTable,
1002 'multisource_programstable' => $MultiSourceProgramsTable,
Patrick Jenkins4c4e3562006-07-07 21:40:34 +00001003 'externalsource_programstable' => $ExternalProgramsTable,
Patrick Jenkinsfe030d72006-07-06 21:19:32 +00001004 'llcbeta_options' => $multisource_llcbeta_options,
1005 'warnings_removed' => $WarningsRemoved,
1006 'warnings_added' => $WarningsAdded,
1007 'newly_passing_tests' => $TestsFixed,
1008 'newly_failing_tests' => $TestsBroken,
1009 'new_tests' => $TestsAdded,
1010 'removed_tests' => $TestsRemoved,
1011 'unexpfail_tests' => $unexpfail_tests,
1012 'dejagnutests_log' => $dejagnutests_log,
Patrick Jenkins00fbdf12006-07-07 21:47:24 +00001013 'dejagnutests_sum' => $dejagnutests_sum,
Patrick Jenkins215b48f2006-07-07 18:50:51 +00001014 'starttime' => $starttime,
1015 'endtime' => $endtime);
Patrick Jenkinsfe030d72006-07-06 21:19:32 +00001016
1017$TESTING = 0;
1018
1019if($TESTING){
1020 print "============================\n";
1021 foreach $x(keys %hash_of_data){
1022 print "$x => $hash_of_data{$x}\n";
1023 }
1024}
1025else{
1026 my $response = SendData $host,$file,\%hash_of_data;
1027 print "============================\n$response";
1028}
1029
1030##############################################################
1031#
1032# Remove the cvs tree...
1033#
1034##############################################################
1035system ( "$NICE rm -rf $BuildDir") if (!$NOCHECKOUT and !$NOREMOVE);
Patrick Jenkins4bde3bc2006-07-13 16:56:48 +00001036system ( "$NICE rm -rf $WebDir") if (!$NOCHECKOUT and !$NOREMOVE and !$NOREMOVERESULTS);
Patrick Jenkinsfe030d72006-07-06 21:19:32 +00001037
1038