X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FExtUtils%2FCommand%2FMM.pm;h=b57386cd18d0873db32df7f43e0d908753b58fad;hb=80a5d8e74b5512d4ab704d0e83466ae41247ce55;hp=702353a1ef96a3b9cc5ae76580f7f7bdb6914494;hpb=004283b80f6094bb85aba6f48a74e3c5c34ea24f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/ExtUtils/Command/MM.pm b/lib/ExtUtils/Command/MM.pm index 702353a..b57386c 100644 --- a/lib/ExtUtils/Command/MM.pm +++ b/lib/ExtUtils/Command/MM.pm @@ -34,18 +34,21 @@ Any $(FOO) used in the examples are make variables, not Perl. =item B - perl -MExtUtils::Command::MM -e "test_harness($(TEST_VERBOSE))" t/*.t + test_harness($verbose, @test_libs); -Runs the given tests via Test::Harness. Will exit with non-zero if -the test fails. - -Typically used with t/*.t files. +Runs the tests on @ARGV via Test::Harness passing through the $verbose +flag. Any @test_libs will be unshifted onto the test's @INC. =cut sub test_harness { require Test::Harness; + require File::Spec; + $Test::Harness::verbose = shift; + + local @INC = @INC; + unshift @INC, map { File::Spec->rel2abs($_) } @_; Test::Harness::runtests(@ARGV); }