S5NPXZG34PZZ5FIIAQ2IO72G6PAQC4JZ2WS2CVKTO623BNQKGMHAC
YDW2NUIW4XY4JQLAS53A7XJMULRXRSGHXVI3RZ34EFWTVEM3BDYQC
5SMQ2PLKIUCWCHY2LZIKI4SRZYKKMZKWZR5QSKE6ZM22HPRH54EQC
3RL7VFKEVVQBVKLKM7ZS3M67BOGGJ3OWPARHG64AOUTZTPPYCHLQC
FAIJDQKZH6SUUNCKW5RIOZ37YRAO5ACS6FX76MHRNN53LDBWO6ZQC
HX4QYOYAKKFKK4KF6SZ6FQCM5ZF7ZFDTQUR4GS5WPPTYZASYZZUAC
RBZRCTALK2SLKX6HDMBS25BRNYPK3GK364MGAVCXP3MW5CEW5TKQC
W6J4PVRPLX2IBH2KO4A5DSZBJUJYFJ3LYBSP4YKJIDFBXYVD2DWQC
HE3GX5IPS6XA7KLNP5WZY2YU27WQS663WSKAL5FHWBSJ5GMM633AC
G2ZB6464XGPBIMSZIPSB24EIXSCCGV4XWC3IWPS2CXYPDSUZSU5QC
DES4PSRLLJVWA3JYCJ2XRMAEJKRFSUBJBNUUORMBGTTOTXX6CHDAC
D6EL7KR6W6QAUXIW36G24U56GXT57BZ5DASIGAEYCNJ5NOOCHINAC
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->finished == 1 && $newbuild->buildstatus == $expected, "Build '".$build->job->name."' from jobs/basic.nix should have buildstatus $expected");
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->finished == 1 && $newbuild->buildstatus == $expected, "Build '".$build->job->name."' from jobs/basic.nix should have buildstatus $expected");
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->finished == 1 && $newbuild->buildstatus == 0, "Build '".$build->job->name."' from jobs/basic.nix should have buildstatus 0");
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->finished == 1 && $newbuild->buildstatus == 0, "Build '".$build->job->name."' from jobs/basic.nix should have buildstatus 0");
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->finished == 1 && $newbuild->buildstatus == 0, "Build '".$build->job->name."' from jobs/basic.nix should have buildstatus 0");
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->finished == 1 && $newbuild->buildstatus == 0, "Build '".$build->job->name."' from jobs/basic.nix should have buildstatus 0");
my $scmName = $scm->{"name"};
my $nixexpr = $scm->{"nixexpr"};
my $type = $scm->{"type"};
my $uri = $scm->{"uri"};
my $update = $scm->{"update"};
$jobset = createJobsetWithOneInput($scmName, $nixexpr, "src", $type, $uri);
my $scmName = $scm->{"name"};
my $nixexpr = $scm->{"nixexpr"};
my $type = $scm->{"type"};
my $uri = $scm->{"uri"};
my $update = $scm->{"update"};
$jobset = createJobsetWithOneInput($scmName, $nixexpr, "src", $type, $uri);
# Verify that it can be fetched and possibly queued.
ok(evalSucceeds($jobset), "$scmName:$state.$c: Evaluating nix-expression."); $c++;
# Verify that it can be fetched and possibly queued.
ok(evalSucceeds($jobset), "$scmName:$state.$c: Evaluating nix-expression."); $c++;
# Verify that the evaluation has queued a new job and evaluate again to ...
if ($updated) {
$q++;
ok(nrQueuedBuildsForJobset($jobset) == $q, "$scmName:$state.$c: Expect $q jobs in the queue."); $c++;
ok(evalSucceeds($jobset), "$scmName:$state.$c: Evaluating nix-expression again."); $c++;
}
# Verify that the evaluation has queued a new job and evaluate again to ...
if ($updated) {
$q++;
ok(nrQueuedBuildsForJobset($jobset) == $q, "$scmName:$state.$c: Expect $q jobs in the queue."); $c++;
ok(evalSucceeds($jobset), "$scmName:$state.$c: Evaluating nix-expression again."); $c++;
}
# ... check that it is deterministic and not queued again.
ok(nrQueuedBuildsForJobset($jobset) == $q, "$scmName:$state.$c: Expect $q jobs in the queue."); $c++;
# ... check that it is deterministic and not queued again.
ok(nrQueuedBuildsForJobset($jobset) == $q, "$scmName:$state.$c: Expect $q jobs in the queue."); $c++;
my $title = "Basic select query for $source";
if ($source eq "SchemaVersion") {
ok(scalar($db->resultset($source)->all) == 1, $title);
} elsif( $source !~ m/^(LatestSucceeded|JobStatus|ActiveJobs)/) {
ok(scalar($db->resultset($source)->all) == 0, $title);
} else {
ok(scalar($db->resultset($source)->search({},{ bind => ["", "", ""] })) == 0, $title);
}
my $title = "Basic select query for $source";
if ($source eq "SchemaVersion") {
ok(scalar($db->resultset($source)->all) == 1, $title);
} elsif( $source !~ m/^(LatestSucceeded|JobStatus|ActiveJobs)/) {
ok(scalar($db->resultset($source)->all) == 0, $title);
} else {
ok(scalar($db->resultset($source)->search({},{ bind => ["", "", ""] })) == 0, $title);
}