Permalink
Browse files

exit with non-zero status if tests failed. (works better in automated…

… testing environments and consistent with "prove" command)
  • Loading branch information...
Darrell Fuhriman
Darrell Fuhriman committed Aug 21, 2009
1 parent 044831f commit a32b6a4819d9ef67772f28e6e3697f46bbc230e2
Showing with 8 additions and 1 deletion.
  1. +8 −1 bin/pg_prove
View
@@ -116,7 +116,7 @@ if ( $opts->{archive} ) {
my $verbosity = $opts->{verbose} || $ENV{TEST_VERBOSE};
# Make it so!
-$harness_class->new({
+my $return = $harness_class->new({
verbosity => $verbosity,
failures => !$verbosity,
( TAP::Harness->VERSION ge '3.17' ? (comments => !$verbosity) : ()),
@@ -127,6 +127,13 @@ $harness_class->new({
exec => \@command,
})->runtests( @{ $tests } );
+if ( $return->{'failed'} > 0 ) {
+ exit 1;
+} else {
+ exit 0;
+}
+
+
__END__
=encoding utf8

0 comments on commit a32b6a4

Please sign in to comment.