On Sep 11, 2006, at 8:02 AM, Ovid wrote:
Last week I was at a testing conference with Acme and he came up
with the idea of installing tests. He looked into hacking
Module::Build and ExtUtils::MakeMaker. He also considered hacking
CPAN.pm and CPANPLUS.pm. While I don't know if he plans to
continue working on this idea, he said he didn't mind me posting
his idea here for others to consider.
Basically, installing tests would be good because then you can run
your full test suite against *installed* modules. That would be
nice because then you could install a module and rerun your tests
for your entire installation and see what broke.
I love this idea, but here are some issues that we spotted:
1. How does one install tests for modules already installed?
2. If you install a module with already failing tests, you need to
track what the failures are so you can note different failures when
you run the test suite in the future.
3. What's the best way to install them? Should a separate tool
just for this be built?
Anyone want to take a crack at this?
I'm also going to post this to Perlmonks.
Interesting. A setup like this would have solved a recent bug in
Text-PDF-0.27 where installation failed silently due to a bogus
pm_to_blib file.
However, why install the tests? Why not just keep the latests
tarballs for each installed module and periodically do the following
for each of the tarballs:
tar -xzvf Foo-1.00.tgz
cd Foo-1.00
perl Makefile.PL
make test
cd ..
rm -rf Foo-1.00
That seems significantly less fragile than creating a new
infrastructure, and still exercises all of the non-Foo dependencies.
The most significant drawback of that approach is that it doesn't
exercise the installed copy of Foo itself. Perhaps that can be
accomplished by simply deleting lib and blib in Foo-1.00 before
running tests?
Chris
--
Chris Dolan, Software Developer, Clotho Advanced Media Inc.
608-294-7900, fax 294-7025, 1435 E Main St, Madison WI 53703
vCard: http://www.chrisdolan.net/ChrisDolan.vcf
Clotho Advanced Media, Inc. - Creators of MediaLandscape Software
(http://www.media-landscape.com/) and partners in the revolutionary
Croquet project (http://www.opencroquet.org/)