summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-03-08 14:52:56 +0000
committerNicholas Clark <nick@ccl4.org>2009-03-08 14:52:56 +0000
commite8fb11d7f7d16f6c0b6f3a98e09e713284cbe555 (patch)
tree48705b67ec1d92f4fdf506ef65291c3e706f26a9
parenta4876a67e7306b223739a3f572d8a5cfe380e599 (diff)
downloadperl-e8fb11d7f7d16f6c0b6f3a98e09e713284cbe555.tar.gz
Update t/harness to reflect behaviour changes in TAP::Harness 3.16
Explicitly add -I../lib to the switches, rather than rely on TAP::Harness or Test::Harness picking -I../lib up from $ENV{PERL5LIB}. (Test::Harness hasn't changed, but TAP::Harness has). Test::Harness does, however, spot that we've altered our own @INC, and passes this on to tests. So there is no need to set $ENV{PERL5LIB} to effect changes to @INC in tests. So don't set $ENV{PERL5LIB} to -I../lib. Instead set it to '', to avoid contamination from our environment.
-rw-r--r--t/harness8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/harness b/t/harness
index b087cc5b15..21d0c98ced 100644
--- a/t/harness
+++ b/t/harness
@@ -6,8 +6,8 @@
BEGIN {
chdir 't' if -d 't';
@INC = '../lib'; # pick up only this build's lib
- $ENV{PERL5LIB} = '../lib'; # so children will see it too
}
+delete $ENV{PERL5LIB};
my $torture; # torture testing?
@@ -244,6 +244,12 @@ if ($jobs) {
}
);
}
+ $h->callback(
+ parser_args => sub {
+ my ( $args, $test ) = @_;
+ push @{ $args->{switches} }, '-I../lib';
+ }
+ );
$h->runtests(@tests);
} else {
Test::Harness::runtests @tests;