Automatic testing of your reverse dependencies with Test::BrewBuild

My Test::Brewbuild module and front-end script ``brewbuild'' are now in a very workable state.

The purpose of the module is to seamlessly and automatically run your module's unit tests across any number of perl instances within your Unix perlbrew and Windows berrybrew installations. However, I have also added the ability for it to test all of your modules down-river (reverse dependencies) modules against the module you're working on, as it currently sits.

cd ~/devel/repos/mock-sub

brewbuild --revdep

- working on reverse dependencies: File-Edit-Portable, Devel-Examine-Subs, Test-BrewBuild, Devel-Trace-Subs

File::Edit::Portable
5.10.1 :: PASS
5.18.4 :: PASS
5.22.1 :: PASS

Devel::Examine::Subs
5.10.1 :: PASS
5.18.4 :: PASS
5.22.1 :: PASS

Test::BrewBuild
5.10.1 :: PASS
5.18.4 :: PASS
5.22.1 :: PASS

Devel::Trace::Subs
5.10.1 :: PASS
5.18.4 :: PASS
5.22.1 :: FAIL

``-R'' could also be used in place of ``--revdep''.

On any failure, we save the output of the build into a local 'bblog' directory, which will get removed at the commencement of the next run, as to not fail any 'manifest.t' tests.

ls bblog

Devel-Trace-Subs-5.22.1.bblog
stderr.bblog

The 'stderr.bblog' appears if the build tools throw anything to STDERR. In this case, the logs tell me that I'm trying to build HTML::Template as a dependency, but on v5.20+, CGI was removed from core, and the maintainers haven't updated PREREQ_PM (I've tried to contact the authors, and there is a PR in place).

The rest of the features of the program focus on managing your *brew perl instances, and testing a single module. I'd only run the ``--revdep | -R'' execution when I'm very ready to upload to CPAN.

A few other handy features:

# uninstall all perls, install three random new ones and test against those three
# pristine instances

brewbuild -r -n 3

# run only on select instances (only on Unix; I have a PR open for this on
# Windows berrybrew)

brewbuild -o 5.16.4 -o 5.8.9

# install specific versions, and test on them (and any others that may already be
# installed)

brewbuild -i 5.22.1 -i 5.18.4

# display test server setup instructions

brewbuild --setup

# display list of all options

brewbuild -h

2 Comments

I wrote a module, Test::DependentModules, that also tests reverse deps. It might be nice to use that instead of re-rolling this if your implementation is doing the same thing.

Leave a comment

About Steve Bertrand

user-pic Just Another Perl Hacker