----- Original Message ----
From: Ken Williams

> Yes, I've been thinking about this for a long time.  In fact, in the
> most recent M::B beta I made some steps toward it, by adding a
> 'retest' action that's just like 'test' except that it doesn't look
> in blib/, just in @INC.  Functionally that actually covers a lot of
> the same ground you're after.

Sweet!

>   4) Many distributions, including many of the most crucial and well-
> used ones, have some extra set-up steps in their build/install
> sequences.  Others make assumptions in their test suites about where
> various files are located relative to the test code or relative to
> the current working directory.  It's quite possible that in order for
> "installed" tests to work correctly it could take some serious
> coöperation by modules' authors.

In that case, ./Build install could be this (or something similar):

  ./Build install --with-tests 

Then, after the module is installed, the installed tests are run against the 
installed version and if there's a failure, the user could be given the option 
to uninstall them.

>   5) Where should tests be installed?  Where would any other
> supporting materials be installed?

Don't ask me :)

> >> 1.  How does one install tests for modules already installed?
 
> For your #1 above, I'd say just perform a reinstall.

This is often very difficult in a corporate environment, but that's the 
environment for which installed tests might be the most useful.

> >> 2.  If you install a module with already failing tests, you need
 > >> to track what the failures are so you can note different failures

> For #2, maybe
> just punt - is there much of a need for that? 

Yes!  Handling this correctly is critical to its success.  Consider that I 
install Foo::Bar and tests 4 and 8 fail.  Subsequent runs should either skip 
those tests suites entirely, mark 4 and 8 as 'TODO' or have some other method 
of ensuring that running the full installed test suite doesn't report a bunch 
of failures.  If it does report a bunch of failures, developers are going to 
learn to ignore failures and that makes the entire project useless.

Cheers,
Ovid

--

Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/


Reply via email to