How can I change the directory holding the test files in ExtUtils::Makemaker?

154 Views Asked by At

How can you change the default tests path in Makefile.PL from the default value t/*.t? There's an attribute mentioned in the documentation but it does not work. Anybody know how to that?

2

There are 2 best solutions below

5
On BEST ANSWER

In Makefile.PL:

WriteMakefile(
    test => { TESTS => 'tests/*.t'},
    ....

Will make make test run the tests scripts in tests instead of t.

1
On

Manni's suggestion allows you to have the glob pattern that MakeMaker will use in the test targets, but that's still rather limited. I wrote Test::Manifest so that I could override those portions to do exactly what I needed to do. Even if you don't want to do the same thing that Test::Manifest does, you can look at the source to see what I did.