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?
my @next = qw(comp cmd run io op uni mro lib);
push @next, 'japh' if $torture;
push @next, 'win32' if $^O eq 'MSWin32';
+ push @next, 'benchmark' if $ENV{PERL_BENCHMARK};
# Hopefully TAP::Parser::Scheduler will support this syntax soon.
# my $next = { par => '{' . join (',', @next) . '}/*.t' };
my $next = { par => [
my $mani = File::Spec->catfile(File::Spec->updir, "MANIFEST");
if (open(MANI, $mani)) {
my @manitests = ();
- my $ext_pat = $^O eq 'MSWin32' ? '(?:win32/)?ext' : 'ext';
while (<MANI>) { # similar code in t/TEST
- if (m!^($ext_pat/(\S+)/+(?:[^/\s]+\.t|test\.pl)|lib/\S+?(?:\.t|test\.pl))\s!) {
+ if (m!^(ext/(\S+)/+(?:[^/\s]+\.t|test\.pl)|lib/\S+?(?:\.t|test\.pl))\s!) {
my ($test, $extension) = ($1, $2);
if (defined $extension) {
$extension =~ s!/t$!!;
} else {
warn "$0: cannot open $mani: $!\n";
}
- push @last, <Module_Pluggable/*.t>;
push @last, <pod/*.t>;
push @last, <x2p/*.t>;
}
);
}
+ $h->callback(
+ parser_args => sub {
+ my ( $args, $test ) = @_;
+ push @{ $args->{switches} }, '-I../lib';
+ }
+ );
$h->runtests(@tests);
} else {
Test::Harness::runtests @tests;