forked from lix-project/hydra
Fix "make check"
This commit is contained in:
parent
13f4636436
commit
93efae0c23
|
@ -21,7 +21,7 @@ sub nrBuildsForJobset {
|
|||
|
||||
sub queuedBuildsForJobset {
|
||||
my ($jobset) = @_;
|
||||
return $jobset->builds->search({},{ join => 'schedulingInfo' });
|
||||
return $jobset->builds->search({finished => 0});
|
||||
}
|
||||
|
||||
sub nrQueuedBuildsForJobset {
|
||||
|
|
|
@ -30,7 +30,7 @@ for my $build (queuedBuildsForJobset($jobset)) {
|
|||
ok(runBuild($build), "Build '".$build->job->name."' from jobs/basic.nix should exit with code 0");
|
||||
my $newbuild = $db->resultset('Builds')->find($build->id);
|
||||
my $expected = $build->job->name eq "fails" ? 1 : 0;
|
||||
ok($newbuild->buildresultinfo->buildstatus == $expected, "Build '".$build->job->name."' from jobs/basic.nix should have buildstatus $expected");
|
||||
ok($newbuild->finished == 1 && $newbuild->buildstatus == $expected, "Build '".$build->job->name."' from jobs/basic.nix should have buildstatus $expected");
|
||||
}
|
||||
|
||||
# Test jobset with 2 jobs, one has parameter of succeeded build of the other
|
||||
|
@ -41,7 +41,7 @@ ok(nrQueuedBuildsForJobset($jobset) == 1 , "Evaluating jobs/build-output-as-inpu
|
|||
for my $build (queuedBuildsForJobset($jobset)) {
|
||||
ok(runBuild($build), "Build '".$build->job->name."' from jobs/basic.nix should exit with code 0");
|
||||
my $newbuild = $db->resultset('Builds')->find($build->id);
|
||||
ok($newbuild->buildresultinfo->buildstatus == 0, "Build '".$build->job->name."' from jobs/basic.nix should have buildstatus 0");
|
||||
ok($newbuild->finished == 1 && $newbuild->buildstatus == 0, "Build '".$build->job->name."' from jobs/basic.nix should have buildstatus 0");
|
||||
}
|
||||
|
||||
ok(evalSucceeds($jobset), "Evaluating jobs/build-output-as-input.nix for second time should exit with return code 0");
|
||||
|
@ -49,7 +49,7 @@ ok(nrQueuedBuildsForJobset($jobset) == 1 , "Evaluating jobs/build-output-as-inpu
|
|||
for my $build (queuedBuildsForJobset($jobset)) {
|
||||
ok(runBuild($build), "Build '".$build->job->name."' from jobs/basic.nix should exit with code 0");
|
||||
my $newbuild = $db->resultset('Builds')->find($build->id);
|
||||
ok($newbuild->buildresultinfo->buildstatus == 0, "Build '".$build->job->name."' from jobs/basic.nix should have buildstatus 0");
|
||||
ok($newbuild->finished == 1 && $newbuild->buildstatus == 0, "Build '".$build->job->name."' from jobs/basic.nix should have buildstatus 0");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ my $db = openHydraDB;
|
|||
my @sources = $db->sources;
|
||||
my $nrtables = scalar(@sources);
|
||||
|
||||
use Test::Simple tests => 44;
|
||||
use Test::Simple tests => 42;
|
||||
|
||||
foreach my $source (@sources) {
|
||||
my $title = "Basic select query for $source";
|
||||
|
|
Loading…
Reference in a new issue