diff options
author | Patrick Jenkins <pjenkins@apple.com> | 2006-07-23 21:38:07 +0000 |
---|---|---|
committer | Patrick Jenkins <pjenkins@apple.com> | 2006-07-23 21:38:07 +0000 |
commit | 169357e3dd5dc4690542ef54b9c290832da40767 (patch) | |
tree | fd009a148fbf167b69779973f846d60e773e2145 /utils | |
parent | b76ea74845849e7a499603bb04bfe1614101e910 (diff) | |
download | external_llvm-169357e3dd5dc4690542ef54b9c290832da40767.zip external_llvm-169357e3dd5dc4690542ef54b9c290832da40767.tar.gz external_llvm-169357e3dd5dc4690542ef54b9c290832da40767.tar.bz2 |
When the ability to gather .a and .o file sizes was added, it changed the directory the perl script was in so when we tried to run dejagnu tests, everything failed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29269 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/NewNightlyTest.pl | 57 |
1 files changed, 32 insertions, 25 deletions
diff --git a/utils/NewNightlyTest.pl b/utils/NewNightlyTest.pl index c61bafa..395c9ad 100755 --- a/utils/NewNightlyTest.pl +++ b/utils/NewNightlyTest.pl @@ -200,7 +200,7 @@ my $CVSLog = "$Prefix-CVS-Log.txt"; my $OldenTestsLog = "$Prefix-Olden-tests.txt"; my $SingleSourceLog = "$Prefix-SingleSource-ProgramTest.txt.gz"; my $MultiSourceLog = "$Prefix-MultiSource-ProgramTest.txt.gz"; -my $ExternalLog = "$Prefix-External-ProgramTest.txt.gz"; +my $ExternalLog = "$Prefix-External-ProgramTest.txt.gz" my $DejagnuLog = "$Prefix-Dejagnu-testrun.log"; my $DejagnuSum = "$Prefix-Dejagnu-testrun.sum"; my $DejagnuTestsLog = "$Prefix-DejagnuTests-Log.txt"; @@ -278,7 +278,8 @@ sub ChangeDir { # directory, logical name my ($dir,$name) = @_; chomp($dir); if ( $VERBOSE ) { print "Changing To: $name ($dir)\n"; } - chdir($dir) || die "Cannot change directory to: $name ($dir) "; + chdir($dir) || (print "Cannot change directory to: $name ($dir) " && return -1); + return 0; } #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -610,28 +611,6 @@ if (!$NOCHECKOUT && !$NOBUILD) { #my $NumLibraries = scalar(grep(!/executable/, @Linked)); #my $NumObjects = `grep ']\: Compiling ' $BuildLog | wc -l` + 0; -my $a_file_sizes=""; -my $o_file_sizes=""; -if(!$BuildError){ - if ( $VERBOSE ){ - print "Organizing size of .o and .a files\n"; - } - ChangeDir( "$BuildDir", "Build Directory" ); - $afiles = `find . -iname '*.a' -ls`; - $ofiles = `find . -iname '*.o' -ls`; - @AFILES = split "\n", $afiles; - $a_file_sizes=""; - foreach $x (@AFILES){ - $x =~ m/.+\s+.+\s+.+\s+.+\s+.+\s+.+\s+(.+)\s+.+\s+.+\s+.+\s+(.+)/; - $a_file_sizes.="$1 $2\n"; - } - @OFILES = split "\n", $ofiles; - $o_file_sizes=""; - foreach $x (@OFILES){ - $x =~ m/.+\s+.+\s+.+\s+.+\s+.+\s+.+\s+(.+)\s+.+\s+.+\s+.+\s+(.+)/; - $o_file_sizes.="$1 $2\n"; - } -} my $ConfigTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$BuildLog"; my $ConfigTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$BuildLog"; @@ -662,6 +641,34 @@ elsif (`grep '^make[^:]*: .*Error' $BuildLog | wc -l` + 0 || } if ($BuildError) { $NODEJAGNU=1; } +my $a_file_sizes=""; +my $o_file_sizes=""; +if(!$BuildError){ + if ( $VERBOSE ){ + print "Organizing size of .o and .a files\n"; + } + ChangeDir( "$BuildDir/llvm", "Build Directory" ); + $afiles = `find . -iname '*.a' -ls`; + $ofiles = `find . -iname '*.o' -ls`; + @AFILES = split "\n", $afiles; + $a_file_sizes=""; + foreach $x (@AFILES){ + $x =~ m/.+\s+.+\s+.+\s+.+\s+.+\s+.+\s+(.+)\s+.+\s+.+\s+.+\s+(.+)/; + $a_file_sizes.="$1 $2\n"; + } + @OFILES = split "\n", $ofiles; + $o_file_sizes=""; + foreach $x (@OFILES){ + $x =~ m/.+\s+.+\s+.+\s+.+\s+.+\s+.+\s+(.+)\s+.+\s+.+\s+.+\s+(.+)/; + $o_file_sizes.="$1 $2\n"; + } +} +else{ + $a_file_sizes="No data due to a bad build."; + $o_file_sizes="No data due to a bad build."; +} + + ############################################################## # # Running dejagnu tests @@ -748,7 +755,7 @@ my ($WarningsAdded, $WarningsRemoved) = DiffFiles "-Warnings.txt"; sub TestDirectory { my $SubDir = shift; - ChangeDir( "projects/llvm-test/$SubDir", "Programs Test Subdirectory" ); + ChangeDir( "projects/llvm-test/$SubDir", "Programs Test Subdirectory" ) || return ("", ""); my $ProgramTestLog = "$Prefix-$SubDir-ProgramTest.txt"; #my $ProgramTestLog = "$Prefix-MultiSource-ProgramTest.txt"; #CHANGE ME! |