@ISA @EXPORT @EXPORT_OK);
$have_devel_corestack = 0;
-$VERSION = "1.1601";
+$VERSION = "1.1602";
+
+# Some experimental versions of OS/2 build have broken $?
+my $ignore_exitcode = $ENV{HARNESS_IGNORE_EXITCODE};
+
+my $tests_skipped = 0;
+my $subtests_skipped = 0;
@ISA=('Exporter');
@EXPORT= qw(&runtests);
}
}
$fh->close; # must close to reap child resource values
- my $wstatus = $?;
+ my $wstatus = $ignore_exitcode ? 0 : $?; # Can trust $? ?
my $estatus;
$estatus = ($^O eq 'VMS'
? eval 'use vmsish "status"; $estatus = $?'
print "ok\n";
} else {
print "skipping test on this platform\n";
+ $tests_skipped++;
}
$good++;
} elsif ($max) {
estat => '', wstat => '',
};
}
+ $subtests_skipped += $skipped;
}
my $t_total = timediff(new Benchmark, $t_start);
$bonusmsg = (" ($totbonus subtest".($totbonus>1?'s':'').
" UNEXPECTEDLY SUCCEEDED)")
if $totbonus;
+ if ($tests_skipped) {
+ $bonusmsg .= ", $tests_skipped test" . ($tests_skipped != 1 ? 's' : '') .
+ ' skipped';
+ }
+ if ($subtests_skipped) {
+ $bonusmsg .= ($tests_skipped ? ', plus ' : ', ').
+ "$subtests_skipped subtest"
+ . ($subtests_skipped != 1 ? 's' : '') .
+ " skipped";
+ }
if ($bad == 0 && $totmax) {
print "All tests successful$bonusmsg.\n";
} elsif ($total==0){
write;
}
if ($bad) {
+ $bonusmsg =~ s/^,\s*//;
+ print "$bonusmsg.\n" if $bonusmsg;
die "Failed $bad/$total test scripts, $pct% okay.$subpct\n";
}
}
=back
+=head1 ENVIRONMENT
+
+Setting C<HARNESS_IGNORE_EXITCODE> makes it ignore the exit status
+of child processes.
+
=head1 SEE ALSO
L<Test> for writing test scripts and also L<Benchmark> for the