forked from lix-project/hydra
input-types: use is() for test comparisons
This commit is contained in:
parent
371826f931
commit
611d7b71f2
|
@ -83,6 +83,8 @@ my @scminputs = (
|
|||
|
||||
foreach my $scm ( @scminputs ) {
|
||||
my $scmName = $scm->{"name"};
|
||||
|
||||
subtest "With the SCM input named $scmName" => sub {
|
||||
my $nixexpr = $scm->{"nixexpr"};
|
||||
my $type = $scm->{"type"};
|
||||
my $uri = $scm->{"uri"};
|
||||
|
@ -93,24 +95,25 @@ foreach my $scm ( @scminputs ) {
|
|||
my $q = 0;
|
||||
my ($loop, $updated) = updateRepository($scmName, $update);
|
||||
while($loop) {
|
||||
my $c = 0;
|
||||
|
||||
subtest "Mutation number $state" => sub {
|
||||
# Verify that it can be fetched and possibly queued.
|
||||
ok(evalSucceeds($jobset), "$scmName:$state.$c: Evaluating nix-expression."); $c++;
|
||||
ok(evalSucceeds($jobset), "Evaluating nix-expression.");
|
||||
|
||||
# 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++;
|
||||
is(nrQueuedBuildsForJobset($jobset), $q, "Expect $q jobs in the queue.");
|
||||
ok(evalSucceeds($jobset), "Evaluating nix-expression again.");
|
||||
}
|
||||
|
||||
# ... check that it is deterministic and not queued again.
|
||||
ok(nrQueuedBuildsForJobset($jobset) == $q, "$scmName:$state.$c: Expect $q jobs in the queue."); $c++;
|
||||
is(nrQueuedBuildsForJobset($jobset), $q, "Expect deterministic evaluation.");
|
||||
|
||||
$state++;
|
||||
($loop, $updated) = updateRepository($scmName, $update, getcwd . "/$scmName-repo/");
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
done_testing;
|
||||
|
|
Loading…
Reference in a new issue