X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=utils%2FNewNightlyTest.pl;h=447165fd613d735cfd92deea23395173e90c67b9;hb=84701836bfb1889e2e26e361ebd5d29d972ab396;hp=58d8d48451c204f6a28d9d6bacd608db10f43733;hpb=d3f341a2013ee9b43a8bc6cffe90167609e09937;p=oota-llvm.git diff --git a/utils/NewNightlyTest.pl b/utils/NewNightlyTest.pl index 58d8d48451c..447165fd613 100755 --- a/utils/NewNightlyTest.pl +++ b/utils/NewNightlyTest.pl @@ -29,10 +29,13 @@ use Socket; # -nodejagnu Do not run feature or regression tests # -parallel Run two parallel jobs with GNU Make. # -release Build an LLVM Release version +# -release-asserts Build an LLVM ReleaseAsserts version # -enable-llcbeta Enable testing of beta features in llc. +# -enable-lli Enable testing of lli (interpreter) features, default is off # -disable-llc Disable LLC tests in the nightly tester. # -disable-jit Disable JIT tests in the nightly tester. # -disable-cbe Disable C backend tests in the nightly tester. +# -disable-lto Disable link time optimization. # -verbose Turn on some debug output # -debug Print information useful only to maintainers of this script. # -nice Checkout/Configure/Build with "nice" to reduce impact @@ -43,6 +46,8 @@ use Socket; # -gccpath Path to gcc/g++ used to build LLVM # -cvstag Check out a specific CVS tag to build LLVM (useful for # testing release branches) +# -usecvs Check code out from the (old) CVS Repository instead of from +# the standard Subversion repository. # -target Specify the target triplet # -cflags Next argument specifies that C compilation options that # override the default. @@ -67,8 +72,9 @@ use Socket; # webserver # -submit-script Specifies which script to call on the submit server. If # this option is not specified it defaults to -# /nightlytest/NightlyTestAccept.cgi. This is basically +# /nightlytest/NightlyTestAccept.php. This is basically # everything after the www.yourserver.org. +# -nosubmit Do not report the test results back to a submit server. # # CVSROOT is the CVS repository from which the tree will be checked out, # specified either in the full :method:user@host:/dir syntax, or @@ -89,6 +95,8 @@ use Socket; # ############################################################## my $HOME = $ENV{'HOME'}; +my $SVNURL = $ENV{"SVNURL"}; +$SVNURL = 'https://llvm.org/svn/llvm-project' unless $SVNURL; my $CVSRootDir = $ENV{'CVSROOT'}; $CVSRootDir = "/home/vadve/shared/PublicCVS" unless $CVSRootDir; my $BuildDir = $ENV{'BUILDDIR'}; @@ -114,10 +122,12 @@ my $TestStartTime = gmtime() . "GMT
" . localtime() . " (local)"; $CONFIGUREARGS=""; $nickname=""; $NOTEST=0; +$USESVN=1; $NORUNNINGTESTS=0; $MAKECMD="make"; $SUBMITSERVER = "llvm.org"; -$SUBMITSCRIPT = "/nightlytest/NightlyTestAccept.cgi"; +$SUBMITSCRIPT = "/nightlytest/NightlyTestAccept.php"; +$SUBMIT = 1; while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) { shift; @@ -133,12 +143,20 @@ while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) { if (/^-parallel$/) { $MAKEOPTS = "$MAKEOPTS -j2 -l3.0"; next; } if (/^-release$/) { $MAKEOPTS = "$MAKEOPTS ENABLE_OPTIMIZED=1 ". "OPTIMIZE_OPTION=-O2"; $BUILDTYPE="release"; next;} + if (/^-release-asserts$/){ $MAKEOPTS = "$MAKEOPTS ENABLE_OPTIMIZED=1 ". + "DISABLE-ASSERTIONS=1 ". + "OPTIMIZE_OPTION=-O2"; + $BUILDTYPE="release-asserts"; next;} if (/^-enable-llcbeta$/) { $PROGTESTOPTS .= " ENABLE_LLCBETA=1"; next; } + if (/^-enable-lli$/) { $PROGTESTOPTS .= " ENABLE_LLI=1"; + $CONFIGUREARGS .= " --enable-lli"; next; } if (/^-disable-llc$/) { $PROGTESTOPTS .= " DISABLE_LLC=1"; $CONFIGUREARGS .= " --disable-llc_diffs"; next; } if (/^-disable-jit$/) { $PROGTESTOPTS .= " DISABLE_JIT=1"; $CONFIGUREARGS .= " --disable-jit"; next; } if (/^-disable-cbe$/) { $PROGTESTOPTS .= " DISABLE_CBE=1"; next; } + if (/^-disable-lto$/) { $PROGTESTOPTS .= " DISABLE_LTO=1"; next; } + if (/^-test-opts$/) { $PROGTESTOPTS .= " $ARGV[0]"; shift; next; } if (/^-verbose$/) { $VERBOSE = 1; next; } if (/^-debug$/) { $DEBUG = 1; next; } if (/^-nice$/) { $NICE = "nice "; next; } @@ -148,6 +166,7 @@ while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) { shift; next; } if (/^-submit-server/) { $SUBMITSERVER = "$ARGV[0]"; shift; next; } if (/^-submit-script/) { $SUBMITSCRIPT = "$ARGV[0]"; shift; next; } + if (/^-nosubmit$/) { $SUBMIT = 0; next; } if (/^-nickname$/) { $nickname = "$ARGV[0]"; shift; next; } if (/^-gccpath/) { $CONFIGUREARGS .= " CC=$ARGV[0]/gcc CXX=$ARGV[0]/g++"; @@ -155,6 +174,7 @@ while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) { else { $GCCPATH=""; } if (/^-cvstag/) { $CVSCOOPT .= " -r $ARGV[0]"; shift; next; } else { $CVSCOOPT="";} + if (/^-usecvs/) { $USESVN = 0; } if (/^-target/) { $CONFIGUREARGS .= " --target=$ARGV[0]"; shift; next; } if (/^-cflags/) { $MAKEOPTS = "$MAKEOPTS C.Flags=\'$ARGV[0]\'"; @@ -165,7 +185,6 @@ while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) { shift; next; } if (/^-compileflags/) { $MAKEOPTS = "$MAKEOPTS $ARGV[0]"; shift; next; } if (/^-use-gmake/) { $MAKECMD = "gmake"; shift; next; } - if (/^-compileflags/) { $MAKEOPTS = "$MAKEOPTS $ARGV[0]"; shift; next; } if (/^-extraflags/) { $CONFIGUREARGS .= " --with-extra-options=\'$ARGV[0]\'"; shift; next;} if (/^-noexternals$/) { $NOEXTERNALS = 1; next; } @@ -176,7 +195,12 @@ while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) { if ($ENV{'LLVMGCCDIR'}) { $CONFIGUREARGS .= " --with-llvmgccdir=" . $ENV{'LLVMGCCDIR'}; + $LLVMGCCPATH = $ENV{'LLVMGCCDIR'}; +} +else { + $LLVMGCCPATH = ""; } + if ($CONFIGUREARGS !~ /--disable-jit/) { $CONFIGUREARGS .= " --enable-jit"; } @@ -206,7 +230,7 @@ if ($nickname eq "") { "\"-nickname \""); } -if ($BUILDTYPE ne "release") { +if ($BUILDTYPE ne "release" && $BUILDTYPE ne "release-asserts") { $BUILDTYPE = "debug"; } @@ -217,7 +241,7 @@ if ($BUILDTYPE ne "release") { ############################################################## my $Prefix = "$WebDir/$DATE"; my $BuildLog = "$Prefix-Build-Log.txt"; -my $CVSLog = "$Prefix-CVS-Log.txt"; +my $COLog = "$Prefix-CVS-Log.txt"; my $OldenTestsLog = "$Prefix-Olden-tests.txt"; my $SingleSourceLog = "$Prefix-SingleSource-ProgramTest.txt.gz"; my $MultiSourceLog = "$Prefix-MultiSource-ProgramTest.txt.gz"; @@ -227,16 +251,22 @@ my $DejagnuSum = "$Prefix-Dejagnu-testrun.sum"; my $DejagnuTestsLog = "$Prefix-DejagnuTests-Log.txt"; if (! -d $WebDir) { mkdir $WebDir, 0777; - warn "$WebDir did not exist; creating it.\n"; + if($VERBOSE){ + warn "$WebDir did not exist; creating it.\n"; + } } if ($VERBOSE) { print "INITIALIZED\n"; - print "CVS Root = $CVSRootDir\n"; + if ($USESVN) { + print "SVN URL = $SVNURL\n"; + } else { + print "CVS Root = $CVSRootDir\n"; + } + print "COLog = $COLog\n"; print "BuildDir = $BuildDir\n"; print "WebDir = $WebDir\n"; print "Prefix = $Prefix\n"; - print "CVSLog = $CVSLog\n"; print "BuildLog = $BuildLog\n"; } @@ -365,64 +395,38 @@ sub FormatTime { } #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# This function is meant to read in the dejagnu sum file and +# return a string with only the results (i.e. PASS/FAIL/XPASS/ +# XFAIL). +# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub GetDejagnuTestResults { # (filename, log) - my ($filename, $DejagnuLog) = @_; - my @lines; - my $firstline; - $/ = "\n"; #Make sure we're going line at a time. - - if( $VERBOSE) { print "DEJAGNU TEST RESULTS:\n"; } - - if (open SRCHFILE, $filename) { -# Process test results - my $first_list = 1; - my $should_break = 1; - my $nocopy = 0; - my $readingsum = 0; - while ( ) { - if ( length($_) > 1 ) { - chomp($_); - if ( m/^XPASS:/ || m/^FAIL:/ ) { - $nocopy = 0; - if ( $first_list ) { - push(@lines, "UNEXPECTED TEST RESULTS\n"); - $first_list = 0; - $should_break = 1; - push(@lines, "$_\n"); - if( $VERBOSE) { print " $_\n"; } - } else { - push(@lines, "$_\n"); - if( $VERBOSE) { print " $_\n"; } + my ($filename, $DejagnuLog) = @_; + my @lines; + $/ = "\n"; #Make sure we're going line at a time. + + if( $VERBOSE) { print "DEJAGNU TEST RESULTS:\n"; } + + if (open SRCHFILE, $filename) { + # Process test results + while ( ) { + if ( length($_) > 1 ) { + chomp($_); + if ( m/^(PASS|XPASS|FAIL|XFAIL): .*\/llvm\/test\/(.*)$/ ) { + push(@lines, "$1: test/$2"); } - } #elsif ( m/Summary/ ) { - # if ( $first_list ) { - # push(@lines, "PERFECT!"); - # print " PERFECT!\n"; - # } else { - # push(@lines, "\n"); - # } - # push(@lines, "STATISTICS\n"); - # print "\nDEJAGNU STATISTICS:\n"; - # $should_break = 0; - # $nocopy = 0; - # $readingsum = 1; - #} - elsif ( $readingsum ) { - push(@lines,"$_\n"); - if( $VERBOSE) { print " $_\n"; } } - } } - } - close SRCHFILE; + close SRCHFILE; - my $content = join("", @lines); - return $content; + my $content = join("\n", @lines); + return $content; } + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # This function acts as a mini web browswer submitting data @@ -452,6 +456,7 @@ sub SendData{ $length = length($content); my $send= "POST $file HTTP/1.0\n"; + $send.= "Host: $host\n"; $send.= "Content-Type: application/x-www-form-urlencoded\n"; $send.= "Content-length: $length\n\n"; $send.= "$content"; @@ -493,40 +498,49 @@ if (!$NOCHECKOUT) { print "Build directory exists! Removing it\n"; } system "rm -rf $BuildDir"; + mkdir $BuildDir or die "Could not create checkout directory $BuildDir!"; } else { - die "CVS checkout directory $BuildDir already exists!"; + if ( $VERBOSE ) { + print "Build directory exists!\n"; + } } + } else { + mkdir $BuildDir or die "Could not create checkout directory $BuildDir!"; } - mkdir $BuildDir or die "Could not create CVS checkout directory $BuildDir!"; } -ChangeDir( $BuildDir, "CVS checkout directory" ); +ChangeDir( $BuildDir, "checkout directory" ); ############################################################## # -# Check out the llvm tree, saving CVS messages to the cvs log... +# Check out the llvm tree, using either SVN or CVS # ############################################################## -my $CVSOPT = ""; -# Use compression if going over ssh. -$CVSOPT = "-z3" - if $CVSRootDir =~ /^:ext:/; -my $CVSCMD = "$NICE cvs $CVSOPT -d $CVSRootDir co $CVSCOOPT"; if (!$NOCHECKOUT) { - if ( $VERBOSE ) { - print "CHECKOUT STAGE:\n"; - print "( time -p $CVSCMD llvm; cd llvm/projects ; $CVSCMD llvm-test ) " . - "> $CVSLog 2>&1\n"; + if ( $VERBOSE ) { print "CHECKOUT STAGE:\n"; } + if ($USESVN) { + my $SVNCMD = "$NICE svn co $SVNURL"; + if ($VERBOSE) { + print "( time -p $SVNCMD/llvm/trunk llvm; cd llvm/projects ; " . + "$SVNCMD/test-suite/trunk llvm-test ) > $COLog 2>&1\n"; + } + system "( time -p $SVNCMD/llvm/trunk llvm; cd llvm/projects ; " . + "$SVNCMD/test-suite/trunk llvm-test ) > $COLog 2>&1\n"; + } else { + my $CVSOPT = ""; + $CVSOPT = "-z3" # Use compression if going over ssh. + if $CVSRootDir =~ /^:ext:/; + my $CVSCMD = "$NICE cvs $CVSOPT -d $CVSRootDir co -P $CVSCOOPT"; + if ($VERBOSE) { + print "( time -p $CVSCMD llvm; cd llvm/projects ; " . + "$CVSCMD llvm-test ) > $COLog 2>&1\n"; + } + system "( time -p $CVSCMD llvm; cd llvm/projects ; " . + "$CVSCMD llvm-test ) > $COLog 2>&1\n"; } - system "( time -p $CVSCMD llvm; cd llvm/projects ; " . - "$CVSCMD llvm-test ) > $CVSLog 2>&1"; - ChangeDir( $BuildDir , "CVS Checkout directory") ; } +ChangeDir( $BuildDir , "Checkout directory") ; ChangeDir( "llvm" , "llvm source directory") ; -if (!$NOCHECKOUT) { - if ( $VERBOSE ) { print "UPDATE STAGE\n"; } - system "$NICE cvs update -PdRA >> $CVSLog 2>&1" ; -} ############################################################## # @@ -535,14 +549,20 @@ if (!$NOCHECKOUT) { # This can probably be put on the server side # ############################################################## -my $CVSCheckoutTime_Wall = GetRegex "([0-9.]+)", `grep '^real' $CVSLog`; -my $CVSCheckoutTime_User = GetRegex "([0-9.]+)", `grep '^user' $CVSLog`; -my $CVSCheckoutTime_Sys = GetRegex "([0-9.]+)", `grep '^sys' $CVSLog`; -my $CVSCheckoutTime_CPU = $CVSCheckoutTime_User + $CVSCheckoutTime_Sys; - -my $NumFilesInCVS = `egrep '^U' $CVSLog | wc -l` + 0; -my $NumDirsInCVS = - `egrep '^cvs (checkout|server|update):' $CVSLog | wc -l` + 0; +my $CheckoutTime_Wall = GetRegex "([0-9.]+)", `grep '^real' $COLog`; +my $CheckoutTime_User = GetRegex "([0-9.]+)", `grep '^user' $COLog`; +my $CheckoutTime_Sys = GetRegex "([0-9.]+)", `grep '^sys' $COLog`; +my $CheckoutTime_CPU = $CVSCheckoutTime_User + $CVSCheckoutTime_Sys; + +my $NumFilesInCVS = 0; +my $NumDirsInCVS = 0; +if ($USESVN) { + $NumFilesInCVS = `egrep '^A' $COLog | wc -l` + 0; + $NumDirsInCVS = `sed -e 's#/[^/]*\$##' $COLog | sort | uniq | wc -l` + 0; +} else { + $NumFilesInCVS = `egrep '^U' $COLog | wc -l` + 0; + $NumDirsInCVS = `egrep '^cvs (checkout|server|update):' $COLog | wc -l` + 0; +} ############################################################## # @@ -552,49 +572,112 @@ my $NumDirsInCVS = # ############################################################## -my (%AddedFiles, %ModifiedFiles, %RemovedFiles, %UsersCommitted, %UsersUpdated); - -if(!$NOCVSSTATS){ - - if ($VERBOSE) { print "CVS HISTORY ANALYSIS STAGE\n"; } - @CVSHistory = split "\n", `cvs history -D '1 day ago' -a -xAMROCGUW`; -#print join "\n", @CVSHistory; print "\n"; +# This just computes a reasonably accurate #of seconds since 2000. It doesn't +# have to be perfect as its only used for comparing date ranges within a couple +# of days. +sub ConvertToSeconds { + my ($sec, $min, $hour, $day, $mon, $yr) = @_; + my $Result = ($yr - 2000) * 12; + $Result += $mon; + $Result *= 31; + $Result += $day; + $Result *= 24; + $Result += $hour; + $Result *= 60; + $Result += $min; + $Result *= 60; + $Result += $sec; + return $Result; +} - my $DateRE = '[-/:0-9 ]+\+[0-9]+'; +my (%AddedFiles, %ModifiedFiles, %RemovedFiles, %UsersCommitted, %UsersUpdated); -# Loop over every record from the CVS history, filling in the hashes. - foreach $File (@CVSHistory) { - my ($Type, $Date, $UID, $Rev, $Filename); - if ($File =~ /([AMRUGC]) ($DateRE) ([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+)/) { - ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, $4, "$6/$5"); - } elsif ($File =~ /([W]) ($DateRE) ([^ ]+)/) { - ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, "", ""); - } elsif ($File =~ /([O]) ($DateRE) ([^ ]+) +([^ ]+)/) { - ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, "", "$4/"); - } else { - print "UNMATCHABLE: $File\n"; - next; +if (!$NOCVSSTATS) { + if ($VERBOSE) { print "CHANGE HISTORY ANALYSIS STAGE\n"; } + + if ($USESVN) { + @SVNHistory = split /(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})/){ + $Year = $1; $Month = $2; $Day = $3; $Hour = $4; $Min = $5; $Sec = $6; } - # print "$File\nTy = $Type Date = '$Date' UID=$UID Rev=$Rev File = '$Filename'\n"; - - if ($Filename =~ /^llvm/) { - if ($Type eq 'M') { # Modified - $ModifiedFiles{$Filename} = 1; - $UsersCommitted{$UID} = 1; - } elsif ($Type eq 'A') { # Added - $AddedFiles{$Filename} = 1; - $UsersCommitted{$UID} = 1; - } elsif ($Type eq 'R') { # Removed - $RemovedFiles{$Filename} = 1; - $UsersCommitted{$UID} = 1; + my $Then = ConvertToSeconds($Sec, $Min, $Hour, $Day, $Month, $Year); + # Get the current date and compute when "yesterday" is. + my ($NSec, $NMin, $NHour, $NDay, $NMon, $NYear) = gmtime(); + my $Now = ConvertToSeconds( $NSec, $NMin, $NHour, $NDay, $NMon, $NYear); + if (($Now - 24*60*60) > $Then) { + next; + } + if ($Lines[1] =~ / revision="([0-9]*)">/) { + $Revision = $1; + } + if ($Lines[2] =~ /([^<]*)<\/author>/) { + $Author = $1; + } + $UsersCommitted{$Author} = 1; + $Date = $Year . "-" . $Month . "-" . $Day; + $Time = $Hour . ":" . $Min . ":" . $Sec; + print "Rev: $Revision, Author: $Author, Date: $Date, Time: $Time\n"; + for ($i = 6; $i < $#Lines; $i += 2 ) { + if ($Lines[$i] =~ /^ action="(.)">([^<]*) $Prefix-multisourceprogramstable.txt"; + "| sort > $Prefix-$SubDir-Tests.txt"; } $ProgramsTable = ReadFile "report.nightly.csv"; @@ -832,70 +917,75 @@ sub TestDirectory { return ($ProgramsTable, $llcbeta_options); } #end sub TestDirectory +############################################################## +# +# Calling sub TestDirectory +# +############################################################## if (!$BuildError) { if ( $VERBOSE ) { print "SingleSource TEST STAGE\n"; } ($SingleSourceProgramsTable, $llcbeta_options) = TestDirectory("SingleSource"); - WriteFile "$Prefix-singlesourceprogramstable.txt", $SingleSourceProgramsTable; + WriteFile "$Prefix-SingleSource-Performance.txt", $SingleSourceProgramsTable; if ( $VERBOSE ) { - print "MultiSource TEST STAGE\n"; + print "MultiSource TEST STAGE\n"; } ($MultiSourceProgramsTable, $llcbeta_options) = TestDirectory("MultiSource"); - WriteFile "$Prefix-multisourceprogramstable.txt", $MultiSourceProgramsTable; + WriteFile "$Prefix-MultiSource-Performance.txt", $MultiSourceProgramsTable; if ( ! $NOEXTERNALS ) { if ( $VERBOSE ) { print "External TEST STAGE\n"; } ($ExternalProgramsTable, $llcbeta_options) = TestDirectory("External"); - WriteFile "$Prefix-externalprogramstable.txt", $ExternalProgramsTable; - system "cat $Prefix-singlesourceprogramstable.txt " . - "$Prefix-multisourceprogramstable.txt ". - "$Prefix-externalprogramstable.txt | sort > $Prefix-Tests.txt"; + WriteFile "$Prefix-External-Performance.txt", $ExternalProgramsTable; + system "cat $Prefix-SingleSource-Tests.txt " . + "$Prefix-MultiSource-Tests.txt ". + "$Prefix-External-Tests.txt | sort > $Prefix-Tests.txt"; + system "cat $Prefix-SingleSource-Performance.txt " . + "$Prefix-MultiSource-Performance.txt ". + "$Prefix-External-Performance.txt | sort > $Prefix-Performance.txt"; } else { $ExternalProgramsTable = "External TEST STAGE SKIPPED\n"; if ( $VERBOSE ) { print "External TEST STAGE SKIPPED\n"; } - system "cat $Prefix-singlesourceprogramstable.txt " . - "$Prefix-multisourceprogramstable.txt ". + system "cat $Prefix-SingleSource-Tests.txt " . + "$Prefix-MultiSource-Tests.txt ". " | sort > $Prefix-Tests.txt"; + system "cat $Prefix-SingleSource-Performance.txt " . + "$Prefix-MultiSource-Performance.txt ". + " | sort > $Prefix-Performance.txt"; } - WriteFile "$Prefix-externalprogramstable.txt", $ExternalProgramsTable; -} -############################################################## -# -# -# gathering tests added removed broken information here -# -# -############################################################## -my $dejagnu = ReadFile $DejagnuSum; -my @DEJAGNU = split "\n", $dejagnu; -my $dejagnu_test_list=""; - -my $passes="", -my $fails=""; -my $xfails=""; - -if(!$NODEJAGNU) { - for ($x=0; $x<@DEJAGNU; $x++) { - if ($DEJAGNU[$x] =~ m/^PASS:/) { - $passes.="$DEJAGNU[$x]\n"; - $dejagnu_test_list.="$DEJAGNU[$x]\n"; - } - elsif ($DEJAGNU[$x] =~ m/^FAIL:/) { - $fails.="$DEJAGNU[$x]\n"; - $dejagnu_test_list.="$DEJAGNU[$x]\n"; - } - elsif ($DEJAGNU[$x] =~ m/^XFAIL:/) { - $xfails.="$DEJAGNU[$x]\n"; - $dejagnu_test_list.="$DEJAGNU[$x]\n"; + ############################################################## + # + # + # gathering tests added removed broken information here + # + # + ############################################################## + my $dejagnu_test_list = ReadFile "$Prefix-Tests.txt"; + my @DEJAGNU = split "\n", $dejagnu_test_list; + my ($passes, $fails, $xfails) = ""; + + if(!$NODEJAGNU) { + for ($x=0; $x<@DEJAGNU; $x++) { + if ($DEJAGNU[$x] =~ m/^PASS:/) { + $passes.="$DEJAGNU[$x]\n"; + } + elsif ($DEJAGNU[$x] =~ m/^FAIL:/) { + $fails.="$DEJAGNU[$x]\n"; + } + elsif ($DEJAGNU[$x] =~ m/^XFAIL:/) { + $xfails.="$DEJAGNU[$x]\n"; + } } } -} + +} #end if !$BuildError + ############################################################## # @@ -952,7 +1042,7 @@ $machine_data = "uname: ".`uname -a`. my @CVS_DATA; my $cvs_data; -@CVS_DATA = ReadFile "$CVSLog"; +@CVS_DATA = ReadFile "$COLog"; $cvs_data = join("\n", @CVS_DATA); my @BUILD_DATA; @@ -960,30 +1050,41 @@ my $build_data; @BUILD_DATA = ReadFile "$BuildLog"; $build_data = join("\n", @BUILD_DATA); -my @DEJAGNU_LOG; -my @DEJAGNU_SUM; -my $dejagnutests_log; -my $dejagnutests_sum; -@DEJAGNU_LOG = ReadFile "$DejagnuLog"; -@DEJAGNU_SUM = ReadFile "$DejagnuSum"; -$dejagnutests_log = join("\n", @DEJAGNU_LOG); -$dejagnutests_sum = join("\n", @DEJAGNU_SUM); - -my @DEJAGNULOG_FULL; -my $dejagnulog_full; -@DEJAGNULOG_FULL = ReadFile "$DejagnuTestsLog"; -$dejagnulog_full = join("\n", @DEJAGNULOG_FULL); - -my $gcc_version_long=""; +my (@DEJAGNU_LOG, @DEJAGNU_SUM, @DEJAGNULOG_FULL, @GCC_VERSION); +my ($dejagnutests_log ,$dejagnutests_sum, $dejagnulog_full) = ""; +my ($gcc_version, $gcc_version_long) = ""; + +$gcc_version_long=""; if ($GCCPATH ne "") { - $gcc_version_long = `$GCCPATH/gcc --version`; + $gcc_version_long = `$GCCPATH/gcc --version`; +} elsif ($ENV{"CC"}) { + $gcc_version_long = `$ENV{"CC"} --version`; } else { - $gcc_version_long = `gcc --version`; + $gcc_version_long = `gcc --version`; } @GCC_VERSION = split '\n', $gcc_version_long; -my $gcc_version = $GCC_VERSION[0]; +$gcc_version = $GCC_VERSION[0]; -my $all_tests = ReadFile "$Prefix-Tests.txt"; +$llvmgcc_version_long=""; +if ($LLVMGCCPATH ne "") { + $llvmgcc_version_long = `$LLVMGCCPATH/llvm-gcc -v 2>&1`; +} else { + $llvmgcc_version_long = `llvm-gcc -v 2>&1`; +} +@LLVMGCC_VERSION = split '\n', $llvmgcc_version_long; +$llvmgcc_versionTarget = $LLVMGCC_VERSION[1]; +$llvmgcc_versionTarget =~ /Target: (.+)/; +$targetTriple = $1; + +if(!$BuildError){ + @DEJAGNU_LOG = ReadFile "$DejagnuLog"; + @DEJAGNU_SUM = ReadFile "$DejagnuSum"; + $dejagnutests_log = join("\n", @DEJAGNU_LOG); + $dejagnutests_sum = join("\n", @DEJAGNU_SUM); + + @DEJAGNULOG_FULL = ReadFile "$DejagnuTestsLog"; + $dejagnulog_full = join("\n", @DEJAGNULOG_FULL); +} ############################################################## # @@ -1000,8 +1101,8 @@ my %hash_of_data = ( 'nickname' => $nickname, 'dejagnutime_wall' => $DejagnuWallTime, 'dejagnutime_cpu' => $DejagnuTime, - 'cvscheckouttime_wall' => $CVSCheckoutTime_Wall, - 'cvscheckouttime_cpu' => $CVSCheckoutTime_CPU, + 'cvscheckouttime_wall' => $CheckoutTime_Wall, + 'cvscheckouttime_cpu' => $CheckoutTime_CPU, 'configtime_wall' => $ConfigWallTime, 'configtime_cpu'=> $ConfigTime, 'buildtime_wall' => $BuildWallTime, @@ -1028,24 +1129,23 @@ my %hash_of_data = ( 'all_tests' => $dejagnu_test_list, 'new_tests' => "", 'removed_tests' => "", - 'dejagnutests_log' => $dejagnutests_log, - 'dejagnutests_sum' => $dejagnutests_sum, + 'dejagnutests_results' => $DejagnuTestResults, + 'dejagnutests_log' => $dejagnulog_full, 'starttime' => $starttime, 'endtime' => $endtime, 'o_file_sizes' => $o_file_sizes, - 'a_file_sizes' => $a_file_sizes + 'a_file_sizes' => $a_file_sizes, + 'target_triple' => $targetTriple ); -$TESTING = 0; - -if ($TESTING) { +if ($SUBMIT) { + my $response = SendData $SUBMITSERVER,$SUBMITSCRIPT,\%hash_of_data; + if( $VERBOSE) { print "============================\n$response"; } +} else { print "============================\n"; foreach $x(keys %hash_of_data){ print "$x => $hash_of_data{$x}\n"; } -} else { - my $response = SendData $SUBMITSERVER,$SUBMITSCRIPT,\%hash_of_data; - if( $VERBOSE) { print "============================\n$response"; } } ##############################################################