# to the environment variables TOP (mandatory),
# BIN_D, TEST_D and RESULT_D.
+my $end_with_bailout = 0;
+
sub quotify;
sub __top_file {
$directories{TEST} = $ENV{TEST_D} || catdir($directories{TOP},"test");
$directories{RESULTS} = $ENV{RESULT_D} || $directories{TEST};
+ $end_with_bailout = $ENV{STOPTEST} ? 1 : 0;
+
BAIL_OUT("setup() expects the file Configure in the \$TOP directory")
unless -f top_file("Configure");
return $display_cmd;
}
+END {
+ my $tb = Test::More->builder;
+ my $failure = scalar(grep { $_ == 0; } $tb->summary);
+ if ($failure && $end_with_bailout) {
+ BAIL_OUT("Stoptest!");
+ }
+}
sub run {
my ($cmd, $display_cmd, %errlogs) = shift->(0);
my %opts = @_;