Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Installing Tests

by kwilliams (Sexton)
on Sep 12, 2006 at 01:42 UTC ( #572437=note: print w/replies, xml ) Need Help??

in reply to Installing Tests

Randy Sims was kind enough to forward me Ovid's post to the Perl-QA list on this topic, here's my response:

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.

What I like about the 'retest' approach is that it's very easy and it's much more likely to work. It also makes it possible to run old tests against a new installation, or vice versa. What I don't like about it is that the user has to find the tarball again that they previously installed. I can imagine that in some situations that wouldn't be trivial. In other situations, when people can plan ahead, it's probably not a big deal.

I think there are some larger issues than 1,2,3 above that you might have missed, too:

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.

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

For your #1 above, I'd say just perform a reinstall. For #2, maybe just punt - is there much of a need for that? For #3, I think we can work it into Module::Build as an action or flag(s) to the 'install' action. For EU::MM-based modules I'm not sure what the best approach would be, but probably I don't have to think about it. =)


Replies are listed 'Best First'.
Re^2: Installing Tests
by ysth (Canon) on Sep 12, 2006 at 02:07 UTC
    retest sounds nice; it would let you run the tests for shiny new Foo-1.23 against the installed Foo-1.2 before deciding to install the new version. (Yes, this has issues if 1.23 is a feature release, not just a bugfix release.)

    With a retest action in place, I'm not sure there's a need for installing the tests; just keep the module build directory intact and run retest as desired. I like to do that anyway, with {config,make,test,install}.log files saved in it to preserve record of any problems during the original install.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://572437]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2021-06-13 04:44 GMT
Find Nodes?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)

    Results (54 votes). Check out past polls.