No bug. Fix rooting analysis error handling. DONTBUILD

This commit is contained in:
Steve Fink 2013-05-03 12:57:46 -07:00
parent 9399757035
commit f82f6382fe

View File

@ -63,7 +63,7 @@ GetOptions("build-root|b=s" => \$build_dir,
"annotations-file|annotations|a=s" => \$ann_file,
"old-dir|old=s" => \$old_dir,
"foreground!" => \$foreground,
"buildcommand=s" => \$builder,
"buildcommand=s" => \$builder,
)
or die;
@ -99,7 +99,7 @@ sub clean_project {
# code to build the project from $build_dir.
sub build_project {
return system($builder);
return system($builder) >> 8;
}
# commands to start the various xgill binaries. timeouts can be specified
@ -164,9 +164,10 @@ close(OUT);
for my $pid (@waitpids) {
waitpid($pid, 0);
$status ||= $?;
$status ||= $s? >> 8;
}
print "Exiting run_complete with status $status\n";
exit $status;
# get the IP address which a freshly created manager is listening on.
@ -179,7 +180,7 @@ sub get_manager_address
my $log_data = `cat $log_file`;
my ($port) = $log_data =~ /Listening on ([\.\:0-9]*)/
or die "no manager found";
or die "no manager found";
print OUT "Connecting to manager on port $port\n";
print "Connecting to manager on port $port.\n";
return $1;
@ -231,19 +232,19 @@ sub run_build
system("$xsource -remote=$address -end-manager");
# wait for the manager to clean up and terminate.
print "Waiting for manager to finish...\n";
print "Waiting for manager to finish (build status $exit_status)...\n";
waitpid($pid, 0);
# build is finished, the complete run can resume.
# return value only useful if --foreground
print "Exiting with status " . ($? || $exit_status) . "\n";
exit($? || $exit_status);
}
# this is the complete process, wait for the build to finish.
waitpid($pid, 0);
my $status = $?;
print "build finished: ";
my $status = $? >> 8;
print "build finished (status $status): ";
print scalar(localtime());
print "\n";