Fix handling of IPC::Run::run exit status
Turns out that the exit status is returned in $?, not as the return value of run(). So our error checking was completely bogus.
This commit is contained in:
@ -24,18 +24,19 @@ TESTS = \
|
||||
query-all-tables.pl \
|
||||
evaluation-tests.pl
|
||||
|
||||
clean :
|
||||
clean:
|
||||
chmod -R a+w nix || true
|
||||
rm -rf db.sqlite data nix git-repo hg-repo svn-repo svn-checkout svn-checkout-repo bzr-repo bzr-checkout-repo
|
||||
rm -f .*-state
|
||||
|
||||
check_SCRIPTS = db.sqlite repos
|
||||
|
||||
db.sqlite : $(top_srcdir)/src/sql/hydra-sqlite.sql
|
||||
db.sqlite: $(top_srcdir)/src/sql/hydra-sqlite.sql
|
||||
$(TESTS_ENVIRONMENT) $(top_srcdir)/src/script/hydra-init
|
||||
|
||||
repos : dirs
|
||||
repos: dirs
|
||||
|
||||
dirs :
|
||||
dirs:
|
||||
mkdir -p data
|
||||
touch data/hydra.conf
|
||||
mkdir -p nix
|
||||
|
@ -66,20 +66,20 @@ sub evalSucceeds {
|
||||
print STDERR "Evaluation errors for jobset ".$jobset->project->name.":".$jobset->name.": \n".$jobset->errormsg."\n" if $jobset->errormsg;
|
||||
print STDERR "STDOUT: $stdout\n" if $stdout ne "";
|
||||
print STDERR "STDERR: $stderr\n" if $stderr ne "";
|
||||
return $res;
|
||||
return !$res;
|
||||
}
|
||||
|
||||
sub runBuild {
|
||||
my ($build) = @_;
|
||||
my ($res, $stdout, $stderr) = captureStdoutStderr(60, ("../src/script/hydra-build", $build->id));
|
||||
print "STDERR: $stderr" if $res;
|
||||
return ($res, $stdout, $stderr);
|
||||
print "STDERR: $stderr" if $stderr ne "";
|
||||
return !$res;
|
||||
}
|
||||
|
||||
sub updateRepository {
|
||||
my ($scm, $update) = @_;
|
||||
my ($res, $stdout, $stderr) = captureStdoutStderr(60, ($update, $scm));
|
||||
die "Unexpected update error with $scm: $stderr\n" unless $res;
|
||||
die "unexpected update error with $scm: $stderr\n" if $res;
|
||||
my ($message, $loop, $status) = $stdout =~ m/::(.*) -- (.*) -- (.*)::/;
|
||||
print STDOUT "Update $scm repository: $message\n";
|
||||
return ($loop eq "continue", $status eq "updated");
|
||||
|
Reference in New Issue
Block a user