miyagawa/cpanminus — pull request #189 by kaoru (2013-01-30 20:38:52+00:00)
Title: Added a "retry without parallel tests" option.

When the tests fail, if --prompt was specified, cpanm will prompt you
with a few options for how you want to proceed. This change adds an
additional option:

o) retry with test parallelism turned off

If chosen this mode manipulates the environment and then re-runs the
tests. Test suites being incompatible with parallelism is a common flaw
and this change makes it easier to proceed without resorting to using
the "look" and "force install" options.

----------------

Here's an example of me using the feature successfully.

alex@yuzu:~/Documents/Git/cpanminus$ perl /home/alex/perl5/perlbrew/perls/perl-5.16.2/bin/cpanm File::NFSLock --reinstall --prompt
--> Working on File::NFSLock
Fetching http://www.cpan.org/authors/id/B/BB/BBB/File-NFSLock-1.21.tar.gz ... OK
Configuring File-NFSLock-1.21 ... OK
Building and testing File-NFSLock-1.21 ... FAIL
Testing File-NFSLock-1.21 failed.
You can s)kip, r)etry, o) retry with test parallelism turned off, f)orce install, e)xamine build log, or l)ook ? [s] r
Testing File-NFSLock-1.21 failed.
You can s)kip, r)etry, o) retry with test parallelism turned off, f)orce install, e)xamine build log, or l)ook ? [s] o
Successfully reinstalled File-NFSLock-1.21
1 distribution installed

Before this my pattern was to use the "look" option, try "make test", try "TEST_HARNESS=j1 make test", and then if that succeeded to use "force install" to install as though the tests passed. It was too manual!

-------------------

I considered using "R" as the answer for this option, but the existing implementation was that the answers were all lower-cased before comparison so that wouldn't have worked, so I went with "o".

Hope you'll consider this for inclusion! Thanks for all your great work on cpanminus :-)