Improve tests around constituents
- Test how shorter names are preferred when multiple jobs resolve to the same derivation. - Test the exact aggregate map we get, by looking in the DB.
This commit is contained in:
@ -172,7 +172,6 @@ sub makeAndEvaluateJobset {
|
||||
}
|
||||
|
||||
my $jobsdir = $opts{'jobsdir'} // $self->jobsdir;
|
||||
my $should_build = $opts{'build'} // 0;
|
||||
|
||||
my %args = (
|
||||
jobsdir => $jobsdir,
|
||||
@ -184,12 +183,28 @@ sub makeAndEvaluateJobset {
|
||||
$args{flake} = $flake;
|
||||
}
|
||||
my $jobsetCtx = $self->makeJobset(%args);
|
||||
my $jobset = $jobsetCtx->{"jobset"};
|
||||
|
||||
return $self->evaluateJobset(
|
||||
jobset => $jobsetCtx->{"jobset"},
|
||||
expression => $expression,
|
||||
flake => $flake,
|
||||
build => $opts{"build"} // 0,
|
||||
)
|
||||
}
|
||||
|
||||
sub evaluateJobset {
|
||||
my ($self, %opts) = @_;
|
||||
|
||||
my $jobset = $opts{'jobset'};
|
||||
|
||||
my $expression = $opts{'expression'} // $opts{'flake'};
|
||||
|
||||
evalSucceeds($jobset) or die "Evaluating jobs/$expression should exit with return code 0.\n";
|
||||
|
||||
my $builds = {};
|
||||
|
||||
my $should_build = $opts{'build'};
|
||||
|
||||
for my $build ($jobset->builds) {
|
||||
if ($should_build) {
|
||||
runBuild($build) or die "Build '".$build->job."' from jobs/$expression should exit with return code 0.\n";
|
||||
|
Reference in New Issue
Block a user