The issue was raised on the Oslo Hackathon that it would be cool
if we could keep the tests around so that they can be executed
later again making sure that even after one has upgraded other
parts of his system the previously installed modules still work as
expected.

AFAIK the issue did not get anywhere but as I have just seen on
the Fedora packagers mailing list
https://www.redhat.com/archives/fedora-perl-devel-list/2008-April/msg00095.html
there too is some request for this. There they also point out the
documentary value of the test files.


So let's see what needs to be done in order to be able to keep
the test files and run them later.


There are two concerns I could immediately see.
1) Tests might assume a certain directory structure, they might say
     use lib 'lib';
     use lib 't/lib';
     or other things.
2) Tests might use other files outside the t/ directory.
3) What else do you think might be problematic?


I wonder if we could put together some guidelines amending the
"Testing Best Practices" that will allow the easy distribution and
and later execution of the test files?

I know many people create helper modules in t/lib/...
some would call these helper packages My::Package::Test and
then say use lib 't/lib' in the test suit while others - I saw in
the code of AdamK - name their packages t::lib::Test so
they don't have to change @INC.

Both assume the current directory to be the parent of /t

Testing examples:
At least in one module I test the example scripts living in the
eg/ directory. I might not be the only one.
What should we do about this?


For now I think

Checking if all this can work:
CPANTS cannot do that without actually executing the tests
but the smokers could have a mode where - after unzipping
the tarball - they move the whole t/ directory to some other
place, move blib to another place and chdir to a  3rd place
and run the tests then.

If they did this for packages that have already passed their
tests and then report the possible issues we could have an
understanding how many of the distributions might actually
be tested after installation?

regards
    Gabor

-- 
Gabor Szabo
http://www.szabgab.com/

Reply via email to