forked from lix-project/hydra
Tighten up 'should exit with return code'
This commit is contained in:
parent
bf5c76feb6
commit
cb8929b7ed
|
@ -23,7 +23,7 @@ ok(evalSucceeds($jobset), "Evaluating jobs/basic.nix should exit w
|
|||
is(nrQueuedBuildsForJobset($jobset), 3, "Evaluating jobs/basic.nix should result in 3 builds");
|
||||
my ($build, @builds) = queuedBuildsForJobset($jobset);
|
||||
|
||||
ok(runBuild($build), "Build '".$build->job."' from jobs/basic.nix should exit with code 0");
|
||||
ok(runBuild($build), "Build '".$build->job."' from jobs/basic.nix should exit with return code 0");
|
||||
|
||||
subtest "/build/ID/evals" => sub {
|
||||
my $evals = request(GET '/build/' . $build->id . '/evals');
|
||||
|
|
|
@ -29,7 +29,7 @@ ok(evalSucceeds($jobset));
|
|||
is(nrQueuedBuildsForJobset($jobset), 4);
|
||||
|
||||
for my $build (queuedBuildsForJobset($jobset)) {
|
||||
ok(runBuild($build), "Build '".$build->job."' should exit with code 0");
|
||||
ok(runBuild($build), "Build '".$build->job."' should exit with return code 0");
|
||||
my $newbuild = $db->resultset('Builds')->find($build->id);
|
||||
is($newbuild->finished, 1, "Build '".$build->job."' should be finished.");
|
||||
is($newbuild->buildstatus, 0, "Build '".$build->job."' should have buildstatus 0.");
|
||||
|
|
|
@ -21,7 +21,7 @@ is(nrQueuedBuildsForJobset($jobset), 2, "Evaluating jobs/build-products.nix shou
|
|||
|
||||
for my $build (queuedBuildsForJobset($jobset)) {
|
||||
subtest "For the build job '" . $build->job . "'" => sub {
|
||||
ok(runBuild($build), "Build should exit with code 0");
|
||||
ok(runBuild($build), "Build should exit with return code 0");
|
||||
my $newbuild = $db->resultset('Builds')->find($build->id);
|
||||
|
||||
is($newbuild->finished, 1, "Build should have finished");
|
||||
|
|
|
@ -21,7 +21,7 @@ ok(evalSucceeds($jobset), "Evaluating jobs/basic.nix should exit w
|
|||
is(nrQueuedBuildsForJobset($jobset), 3, "Evaluating jobs/basic.nix should result in 3 builds");
|
||||
|
||||
for my $build (queuedBuildsForJobset($jobset)) {
|
||||
ok(runBuild($build), "Build '".$build->job."' from jobs/basic.nix should exit with code 0");
|
||||
ok(runBuild($build), "Build '".$build->job."' from jobs/basic.nix should exit with return code 0");
|
||||
my $newbuild = $db->resultset('Builds')->find($build->id);
|
||||
is($newbuild->finished, 1, "Build '".$build->job."' from jobs/basic.nix should be finished.");
|
||||
my $expected = $build->job eq "fails" ? 1 : $build->job =~ /with_failed/ ? 6 : 0;
|
||||
|
|
|
@ -21,7 +21,7 @@ subtest "For the 'build1' job" => sub {
|
|||
my ($build) = queuedBuildsForJobset($jobset);
|
||||
is($build->job, "build1", "Verify the only job we got is for 'build1'");
|
||||
|
||||
ok(runBuild($build), "Build should exit with code 0");
|
||||
ok(runBuild($build), "Build should exit with return code 0");
|
||||
my $newbuild = $db->resultset('Builds')->find($build->id);
|
||||
is($newbuild->finished, 1, "Build should be finished.");
|
||||
is($newbuild->buildstatus, 0, "Build should have buildstatus 0.");
|
||||
|
@ -33,7 +33,7 @@ subtest "For the 'build2' job" => sub {
|
|||
my ($build) = queuedBuildsForJobset($jobset);
|
||||
is($build->job, "build2", "Verify the only job we got is for 'build2'");
|
||||
|
||||
ok(runBuild($build), "Build should exit with code 0");
|
||||
ok(runBuild($build), "Build should exit with return code 0");
|
||||
my $newbuild = $db->resultset('Builds')->find($build->id);
|
||||
is($newbuild->finished, 1, "Build should be finished.");
|
||||
is($newbuild->buildstatus, 0, "Build should have buildstatus 0.");
|
||||
|
|
|
@ -30,7 +30,7 @@ is(nrQueuedBuildsForJobset($jobset), 1, "Evaluating jobs/runcommand.nix should r
|
|||
(my $build) = queuedBuildsForJobset($jobset);
|
||||
|
||||
is($build->job, "metrics", "The only job should be metrics");
|
||||
ok(runBuild($build), "Build should exit with code 0");
|
||||
ok(runBuild($build), "Build should exit with return code 0");
|
||||
my $newbuild = $db->resultset('Builds')->find($build->id);
|
||||
is($newbuild->finished, 1, "Build should be finished.");
|
||||
is($newbuild->buildstatus, 0, "Build should have buildstatus 0.");
|
||||
|
|
|
@ -24,7 +24,7 @@ ok(evalSucceeds($jobset), "Evaluating jobs/default-machine-file.ni
|
|||
is(nrQueuedBuildsForJobset($jobset), 1, "Evaluating jobs/default-machine-file.nix should result in 1 build");
|
||||
|
||||
for my $build (queuedBuildsForJobset($jobset)) {
|
||||
ok(runBuild($build), "Build '".$build->job."' from jobs/default-machine-file.nix should exit with code 0");
|
||||
ok(runBuild($build), "Build '".$build->job."' from jobs/default-machine-file.nix should exit with return code 0");
|
||||
my $newbuild = $db->resultset('Builds')->find($build->id);
|
||||
is($newbuild->finished, 1, "Build '".$build->job."' from jobs/default-machine-file.nix should be finished.");
|
||||
my $expected = $build->job eq "fails" ? 1 : $build->job =~ /with_failed/ ? 6 : 0;
|
||||
|
|
|
@ -88,7 +88,7 @@ my @builds = queuedBuildsForJobset($jobset);
|
|||
|
||||
subtest "Build: substitutable, canbesubstituted" => sub {
|
||||
my ($build) = grep { $_->nixname eq "can-be-substituted" } @builds;
|
||||
ok(runBuild($build), "Build should exit with code 0");
|
||||
ok(runBuild($build), "Build should exit with return code 0");
|
||||
|
||||
my $newbuild = $db->resultset('Builds')->find($build->id);
|
||||
is($newbuild->finished, 1, "Build should be finished.");
|
||||
|
@ -107,7 +107,7 @@ subtest "Build: substitutable, canbesubstituted" => sub {
|
|||
|
||||
subtest "Build: not substitutable, unsubstitutable" => sub {
|
||||
my ($build) = grep { $_->nixname eq "unsubstitutable" } @builds;
|
||||
ok(runBuild($build), "Build should exit with code 0");
|
||||
ok(runBuild($build), "Build should exit with return code 0");
|
||||
|
||||
my $newbuild = $db->resultset('Builds')->find($build->id);
|
||||
is($newbuild->finished, 1, "Build should be finished.");
|
||||
|
|
Loading…
Reference in a new issue