From: Nicholas Clark Date: Sun, 11 Oct 2009 14:12:15 +0000 (+0100) Subject: Run tests in ext/ and dist/ with relative paths for perl and @INC. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=55d965ca4f960e5184aee9d61160d29af04301f1;p=p5sagit%2Fp5-mst-13.2.git Run tests in ext/ and dist/ with relative paths for perl and @INC. Also, as only tests in cpan/ are using %no_abs and %temp_no_core, only consult these look-up hashes for tests in cpan/ --- diff --git a/t/TEST b/t/TEST index 56441a2..096417a 100755 --- a/t/TEST +++ b/t/TEST @@ -193,17 +193,19 @@ sub _scan_test { my $dir = $1; my $testswitch = $dir_to_switch{$dir}; if (!defined $testswitch) { - if ($test =~ s!^(\.\./(?:cpan|dist|ext)/[^/]+)/t!t!) { + if ($test =~ s!^(\.\./(cpan|dist|ext)/[^/]+)/t!t!) { $run_dir = $1; $return_dir = '../../t'; $lib = '../../lib'; $perl = '../../t/perl'; $testswitch = "-I../.. -MTestInit=U2T"; - if (!$no_abs{$run_dir}) { - $testswitch = $testswitch . ',A'; - } - if ($temp_no_core{$run_dir}) { - $testswitch = $testswitch . ',NC'; + if ($2 eq 'cpan') { + if(!$no_abs{$run_dir}) { + $testswitch = $testswitch . ',A'; + } + if ($temp_no_core{$run_dir}) { + $testswitch = $testswitch . ',NC'; + } } } else { $testswitch = '-I.. -MTestInit'; # -T will remove . from @INC