abd39864 broke t/harness when $ENV{TEST_JOBS} was not set. Oops. Fixed.
authorNicholas Clark <nick@ccl4.org>
Tue, 25 Aug 2009 21:06:28 +0000 (22:06 +0100)
committerNicholas Clark <nick@ccl4.org>
Tue, 25 Aug 2009 21:06:28 +0000 (22:06 +0100)
t/harness

index e1f4233..afd4b6f 100644 (file)
--- a/t/harness
+++ b/t/harness
@@ -241,25 +241,25 @@ my $h = TAP::Harness->new({
     jobs        => $jobs,
     verbosity   => $Verbose,
 });
-if ($jobs) {
-    if ($state) {
-       $h->callback(
-                    after_test => sub {
-                        $state->observe_test(@_);
-                    }
-                   );
-       $h->callback(
-                    after_runtests => sub {
-                        $state->commit(@_);
-                    }
-                   );
-    }
+
+if ($state) {
     $h->callback(
-                parser_args => sub {
-                    my ( $args, $test ) = @_;
-                    push @{ $args->{switches} }, '-I../lib';
+                after_test => sub {
+                    $state->observe_test(@_);
                 }
-               );
+                );
+    $h->callback(
+                after_runtests => sub {
+                    $state->commit(@_);
+                }
+                );
 }
+
+$h->callback(
+            parser_args => sub {
+                my ( $args, $test ) = @_;
+                push @{ $args->{switches} }, '-I../lib';
+            }
+            );
 $h->runtests(@tests);
 exit(0);