forked from OSchip/llvm-project
Clean up nightly tester to use Perl's File::Find.
Patch by Benjamin Kramer. llvm-svn: 73772
This commit is contained in:
parent
c55f0cdaa0
commit
646ac6ac8a
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
use POSIX qw(strftime);
|
use POSIX qw(strftime);
|
||||||
use File::Copy;
|
use File::Copy;
|
||||||
|
use File::Find;
|
||||||
use Socket;
|
use Socket;
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -787,40 +788,20 @@ if (!$BuildError) {
|
||||||
print "Organizing size of .o and .a files\n"
|
print "Organizing size of .o and .a files\n"
|
||||||
if ( $VERBOSE );
|
if ( $VERBOSE );
|
||||||
ChangeDir( "$BuildDir/llvm", "Build Directory" );
|
ChangeDir( "$BuildDir/llvm", "Build Directory" );
|
||||||
$afiles.= `find utils/ -iname '*.a' -ls`;
|
|
||||||
$afiles.= `find lib/ -iname '*.a' -ls`;
|
my @dirs = ('utils', 'lib', 'tools');
|
||||||
$afiles.= `find tools/ -iname '*.a' -ls`;
|
|
||||||
if($BUILDTYPE eq "release"){
|
if($BUILDTYPE eq "release"){
|
||||||
$afiles.= `find Release/ -iname '*.a' -ls`;
|
push @dirs, 'Release';
|
||||||
} elsif($BUILDTYPE eq "release-asserts") {
|
} elsif($BUILDTYPE eq "release-asserts") {
|
||||||
$afiles.= `find Release-Asserts/ -iname '*.a' -ls`;
|
push @dirs, 'Release-Asserts';
|
||||||
} else {
|
} else {
|
||||||
$afiles.= `find Debug/ -iname '*.a' -ls`;
|
push @dirs, 'Debug';
|
||||||
}
|
}
|
||||||
|
|
||||||
$ofiles.= `find utils/ -iname '*.o' -ls`;
|
find(sub {
|
||||||
$ofiles.= `find lib/ -iname '*.o' -ls`;
|
$a_file_sizes .= (-s $_)." $File::Find::name $BUILDTYPE\n" if /\.a$/i;
|
||||||
$ofiles.= `find tools/ -iname '*.o' -ls`;
|
$o_file_sizes .= (-s $_)." $File::Find::name $BUILDTYPE\n" if /\.o$/i;
|
||||||
if($BUILDTYPE eq "release"){
|
}, @dirs);
|
||||||
$ofiles.= `find Release/ -iname '*.o' -ls`;
|
|
||||||
} elsif($BUILDTYPE eq "release-asserts") {
|
|
||||||
$ofiles.= `find Release-Asserts/ -iname '*.o' -ls`;
|
|
||||||
} else {
|
|
||||||
$ofiles.= `find Debug/ -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 $BUILDTYPE\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 $BUILDTYPE\n";
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$a_file_sizes="No data due to a bad build.";
|
$a_file_sizes="No data due to a bad build.";
|
||||||
$o_file_sizes="No data due to a bad build.";
|
$o_file_sizes="No data due to a bad build.";
|
||||||
|
|
Loading…
Reference in New Issue