2021-02-22 21:52:38 +00:00
|
|
|
use feature 'unicode_strings';
|
|
|
|
use strict;
|
2021-08-19 20:36:43 +00:00
|
|
|
use warnings;
|
2021-02-22 21:52:38 +00:00
|
|
|
use Setup;
|
|
|
|
use Test2::V0;
|
|
|
|
|
2021-12-08 18:31:34 +00:00
|
|
|
my $ctx = test_context();
|
2021-02-22 21:52:38 +00:00
|
|
|
|
2021-12-15 01:25:54 +00:00
|
|
|
my $builds = $ctx->makeAndEvaluateJobset(
|
|
|
|
expression => "basic.nix",
|
|
|
|
build => 1
|
|
|
|
);
|
2021-02-22 21:52:38 +00:00
|
|
|
|
2021-12-15 01:25:54 +00:00
|
|
|
subtest "Build: succeed_with_failed" => sub {
|
|
|
|
my $build = $builds->{"succeed_with_failed"};
|
2021-02-22 21:52:38 +00:00
|
|
|
|
2021-12-15 01:25:54 +00:00
|
|
|
is($build->finished, 1, "Build should be finished.");
|
|
|
|
is($build->buildstatus, 6, "succeeeded-but-failed should have buildstatus 6.");
|
|
|
|
};
|
2021-02-22 21:52:38 +00:00
|
|
|
|
2021-12-15 01:25:54 +00:00
|
|
|
subtest "Build: empty_dir" => sub {
|
|
|
|
my $build = $builds->{"empty_dir"};
|
|
|
|
|
|
|
|
is($build->finished, 1, "Build should be finished.");
|
|
|
|
is($build->buildstatus, 0, "Should have succeeded.");
|
|
|
|
};
|
|
|
|
|
|
|
|
subtest "Build: fails" => sub {
|
|
|
|
my $build = $builds->{"fails"};
|
|
|
|
|
|
|
|
is($build->finished, 1, "Build should be finished.");
|
|
|
|
is($build->buildstatus, 1, "Should have failed.");
|
|
|
|
};
|
2021-02-22 21:52:38 +00:00
|
|
|
|
2021-03-05 01:22:37 +00:00
|
|
|
done_testing;
|