Skip to content

Commit eda98f9

Browse files
mohawk2preaction
authored andcommitted
xt/run_backend_tests.pl exit 1 if failure
1 parent 43832a9 commit eda98f9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

xt/run_backend_tests.pl

+5-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ =head1 SEE ALSO
138138
},
139139
);
140140

141-
141+
my $status = 0;
142142
DB: for my $db ( @tests ) {
143143
if ( !$tests{ $db } ) {
144144
say "No test for $db. Available tests: " . join ", ", keys %tests;
@@ -151,6 +151,7 @@ =head1 SEE ALSO
151151
system $cmd;
152152
if ( $? != 0 ) {
153153
say "Error setting up test: $?";
154+
$status = 1;
154155
next DB;
155156
}
156157
}
@@ -160,16 +161,19 @@ =head1 SEE ALSO
160161
system( qw( prove -lr ), @j1, @files );
161162
if ( $? != 0 ) {
162163
say "Test failure ($db): $?";
164+
$status = 1;
163165
last;
164166
}
165167

166168
for my $cmd ( @{ $test->{teardown} || [] } ) {
167169
system $cmd;
168170
if ( $? != 0 ) {
169171
say "Error tearing down test: $?";
172+
$status = 1;
170173
}
171174
}
172175

173176
say "-- Passed test: $db";
174177
}
175178

179+
exit $status;

0 commit comments

Comments
 (0)