forked from lix-project/hydra
HydraTestContext: add \n's to various dies
This commit is contained in:
parent
074a2f96bf
commit
a582e4c485
|
@ -801,7 +801,7 @@ sub checkJobsetWrapped {
|
||||||
next unless $job->{constituents};
|
next unless $job->{constituents};
|
||||||
|
|
||||||
if (defined $job->{error}) {
|
if (defined $job->{error}) {
|
||||||
die "aggregate job ‘$job->{jobName}’ failed with the error: $job->{error}";
|
die "aggregate job ‘$job->{jobName}’ failed with the error: $job->{error}\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
my $x = $drvPathToId{$job->{drvPath}} or
|
my $x = $drvPathToId{$job->{drvPath}} or
|
||||||
|
|
|
@ -145,7 +145,7 @@ sub nix_state_dir {
|
||||||
sub makeAndEvaluateJobset {
|
sub makeAndEvaluateJobset {
|
||||||
my ($self, %opts) = @_;
|
my ($self, %opts) = @_;
|
||||||
|
|
||||||
my $expression = $opts{'expression'} || die "Mandatory 'expression' option not passed to makeAndEvaluateJobset.";
|
my $expression = $opts{'expression'} || die "Mandatory 'expression' option not passed to makeAndEvaluateJobset.\n";
|
||||||
my $jobsdir = $opts{'jobsdir'} // $self->jobsdir;
|
my $jobsdir = $opts{'jobsdir'} // $self->jobsdir;
|
||||||
my $should_build = $opts{'build'} // 0;
|
my $should_build = $opts{'build'} // 0;
|
||||||
|
|
||||||
|
@ -155,13 +155,13 @@ sub makeAndEvaluateJobset {
|
||||||
);
|
);
|
||||||
my $jobset = $jobsetCtx->{"jobset"};
|
my $jobset = $jobsetCtx->{"jobset"};
|
||||||
|
|
||||||
evalSucceeds($jobset) or die "Evaluating jobs/$expression should exit with return code 0";
|
evalSucceeds($jobset) or die "Evaluating jobs/$expression should exit with return code 0.\n";
|
||||||
|
|
||||||
my $builds = {};
|
my $builds = {};
|
||||||
|
|
||||||
for my $build ($jobset->builds) {
|
for my $build ($jobset->builds) {
|
||||||
if ($should_build) {
|
if ($should_build) {
|
||||||
runBuild($build) or die "Build '".$build->job."' from jobs/$expression should exit with return code 0";
|
runBuild($build) or die "Build '".$build->job."' from jobs/$expression should exit with return code 0.\n";
|
||||||
$build->discard_changes();
|
$build->discard_changes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ sub makeAndEvaluateJobset {
|
||||||
sub makeJobset {
|
sub makeJobset {
|
||||||
my ($self, %opts) = @_;
|
my ($self, %opts) = @_;
|
||||||
|
|
||||||
my $expression = $opts{'expression'} || die "Mandatory 'expression' option not passed to makeJobset.";
|
my $expression = $opts{'expression'} || die "Mandatory 'expression' option not passed to makeJobset.\n";
|
||||||
my $jobsdir = $opts{'jobsdir'} // $self->jobsdir;
|
my $jobsdir = $opts{'jobsdir'} // $self->jobsdir;
|
||||||
|
|
||||||
# Create a new user for this test
|
# Create a new user for this test
|
||||||
|
@ -227,7 +227,7 @@ sub DESTROY
|
||||||
|
|
||||||
sub write_file {
|
sub write_file {
|
||||||
my ($path, $text) = @_;
|
my ($path, $text) = @_;
|
||||||
open(my $fh, '>', $path) or die "Could not open file '$path' $!";
|
open(my $fh, '>', $path) or die "Could not open file '$path' $!\n.";
|
||||||
print $fh $text || "";
|
print $fh $text || "";
|
||||||
close $fh;
|
close $fh;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue