diff options
author | Kent Fredric <kentfredric@gmail.com> | 2009-09-03 02:45:36 +1200 |
---|---|---|
committer | Kent Fredric <kentfredric@gmail.com> | 2009-09-03 02:45:36 +1200 |
commit | a59381112c555fa8db928752674757b79c353cfb (patch) | |
tree | 43c35f097af85bdfcd5d8d1d6dca68b1f353d927 /eclass | |
parent | Bumped Padre to 0.45 (diff) | |
download | perl-overlay-a59381112c555fa8db928752674757b79c353cfb.tar.gz perl-overlay-a59381112c555fa8db928752674757b79c353cfb.tar.bz2 perl-overlay-a59381112c555fa8db928752674757b79c353cfb.zip |
Tidied up the verboseness constraint in the eclass, attempted to
autopopulate test::harness parallel testing support by extracting the
-j parameter from your MAKEOPTS
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/perl-module.eclass | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass index 8a01c4918..090eff747 100644 --- a/eclass/perl-module.eclass +++ b/eclass/perl-module.eclass @@ -131,14 +131,27 @@ perl-module_src_compile() { fi } +# For testers: +# This code attempts to work out your threadingness from MAKEOPTS +# and apply them to Test::Harness. +# +# If you want more verbose testing, set TEST_VERBOSE=1 in your bashrc +# + perl-module_src_test() { - VERBOSE=${TEST_VERBOSE:-0} + MULTI=$( \ + echo $MAKEOPTS |\ + sed -n -r "/-j[0-9]/s/^.*-j([0-9]+).*$/\1/p" \ + ); + if [[ $MULTI != "" ]]; then + HARNESS_OPTIONS=j${MULTI}; + fi; if [[ ${SRC_TEST} == "do" ]] ; then ${perlinfo_done} || perlinfo if [[ -f Build ]] ; then ./Build test || die "test failed" elif [[ -f Makefile ]] ; then - emake test TEST_VERBOSE=${VERBOSE} || die "test failed" + emake test TEST_VERBOSE=${TEST_VERBOSE:-0} || die "test failed" fi fi } |