forked from lix-project/hydra
Use is in evaluate-dependent-jobsets
This commit is contained in:
parent
9590bababc
commit
0b693ad8e8
1 changed files with 7 additions and 5 deletions
|
@ -16,19 +16,21 @@ hydra_setup($db);
|
||||||
my $jobset = createJobsetWithOneInput("build-output-as-input", "build-output-as-input.nix", "build1", "build", "build1");
|
my $jobset = createJobsetWithOneInput("build-output-as-input", "build-output-as-input.nix", "build1", "build", "build1");
|
||||||
|
|
||||||
ok(evalSucceeds($jobset), "Evaluating jobs/build-output-as-input.nix should exit with return code 0");
|
ok(evalSucceeds($jobset), "Evaluating jobs/build-output-as-input.nix should exit with return code 0");
|
||||||
ok(nrQueuedBuildsForJobset($jobset) == 1 , "Evaluating jobs/build-output-as-input.nix for first time should result in 1 build in queue");
|
is(nrQueuedBuildsForJobset($jobset), 1 , "Evaluating jobs/build-output-as-input.nix for first time should result in 1 build in queue");
|
||||||
for my $build (queuedBuildsForJobset($jobset)) {
|
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/build-output-as-input.nix should exit with code 0");
|
||||||
my $newbuild = $db->resultset('Builds')->find($build->id);
|
my $newbuild = $db->resultset('Builds')->find($build->id);
|
||||||
ok($newbuild->finished == 1 && $newbuild->buildstatus == 0, "Build '".$build->job."' from jobs/basic.nix should have buildstatus 0");
|
is($newbuild->finished, 1, "Build '".$build->job."' from jobs/build-output-as-input.nix should be finished.");
|
||||||
|
is($newbuild->buildstatus, 0, "Build '".$build->job."' from jobs/build-output-as-input.nix should have buildstatus 0.");
|
||||||
}
|
}
|
||||||
|
|
||||||
ok(evalSucceeds($jobset), "Evaluating jobs/build-output-as-input.nix for second time should exit with return code 0");
|
ok(evalSucceeds($jobset), "Evaluating jobs/build-output-as-input.nix for second time should exit with return code 0");
|
||||||
ok(nrQueuedBuildsForJobset($jobset) == 1 , "Evaluating jobs/build-output-as-input.nix for second time after building build1 should result in 1 build in queue");
|
is(nrQueuedBuildsForJobset($jobset), 1 , "Evaluating jobs/build-output-as-input.nix for second time after building build1 should result in 1 build in queue");
|
||||||
for my $build (queuedBuildsForJobset($jobset)) {
|
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 code 0");
|
||||||
my $newbuild = $db->resultset('Builds')->find($build->id);
|
my $newbuild = $db->resultset('Builds')->find($build->id);
|
||||||
ok($newbuild->finished == 1 && $newbuild->buildstatus == 0, "Build '".$build->job."' from jobs/basic.nix should have buildstatus 0");
|
is($newbuild->finished, 1, "Build '".$build->job."' from jobs/build-output-as-input.nix should be finished.");
|
||||||
|
is($newbuild->buildstatus, 0, "Build '".$build->job."' from jobs/build-output-as-input.nix should have buildstatus 0.");
|
||||||
}
|
}
|
||||||
|
|
||||||
done_testing;
|
done_testing;
|
||||||
|
|
Loading…
Reference in a new issue