Dnia 11 grudnia 2015 22:03:06 CET, dilfri...@gentoo.org napisał(a): >From: "Andreas K. Huettel (dilfridge)" <dilfri...@gentoo.org> > >--- >eclass/perl-module.eclass | 40 +++++++++++++++++++++++----------------- > 1 file changed, 23 insertions(+), 17 deletions(-) > >diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass >index efcc47c..0d428d2 100644 >--- a/eclass/perl-module.eclass >+++ b/eclass/perl-module.eclass >@@ -154,6 +154,8 @@ if [[ ${EAPI:-0} = 5 ]] ; then > > SRC_URI="mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MODULE_AUTHOR}/${MODULE_SECTION:+${MODULE_SECTION}/}${MODULE_A}" > [[ -z "${HOMEPAGE}" ]] && \ > HOMEPAGE="http://search.cpan.org/dist/${MODULE_NAME}/" >+ >+ SRC_TEST="skip" > else > DIST_NAME=${DIST_NAME:-${PN}} > DIST_P=${DIST_NAME}-${DIST_VERSION:-${PV}} >@@ -168,7 +170,6 @@ else > fi > > SRC_PREP="no" >-SRC_TEST="skip" > PREFER_BUILDPL="yes" > > pm_echovar="" >@@ -315,6 +316,18 @@ perl-module_src_compile() { > fi > } > >+# @ECLASS-VARIABLE: DIST_TEST >+# @DESCRIPTION: >+# (EAPI=6) Variable that controls if tests are run in the test phase >+# at all, and if yes under which conditions. Defaults to "do parallel" >+# In EAPI=5 the variable is called SRC_TEST and defaults to "skip". >+# All of the following have been tested to work: >+# DIST_TEST="do parallel" >+# DIST_TEST="parallel" >+# DIST_TEST="parallel do" >+# DIST_TEST=parallel >+# DIST_TEST=skip
At this point, I'm starting to wonder why you aren't using PERL_ prefix... >+ > # @FUNCTION: perl-module_src-test > # @USAGE: perl-module_src_test() > # @DESCRIPTION: >@@ -323,24 +336,17 @@ perl-module_src_compile() { > # > # If you want more verbose testing, set TEST_VERBOSE=1 > # in your bashrc | /etc/portage/make.conf | ENV >-# >-# or ebuild writers: >-# If you wish to enable default tests w/ 'make test' , >-# >-# SRC_TEST="do" >-# >-# If you wish to have threads run in parallel ( using the users >makeopts ) >-# all of the following have been tested to work. >-# >-# SRC_TEST="do parallel" >-# SRC_TEST="parallel" >-# SRC_TEST="parallel do" >-# SRC_TEST=parallel >-# > perl-module_src_test() { > debug-print-function $FUNCNAME "$@" >- if has 'do' ${SRC_TEST} || has 'parallel' ${SRC_TEST} ; then >- if has "${TEST_VERBOSE:-0}" 0 && has 'parallel' ${SRC_TEST} ; >then >+ local my_test_control >+ if [[ ${EAPI:-0} = 5 ]] ; then >+ my_test_control=${SRC_TEST} >+ else >+ my_test_control=${DIST_TEST:-do parallel} >+ fi >+ >+ if has 'do' ${my_test_control} || has 'parallel' ${my_test_control} ; >then >+ if has "${TEST_VERBOSE:-0}" 0 && has 'parallel' >${my_test_control} ; >then > export HARNESS_OPTIONS=j$(makeopts_jobs) > einfo "Test::Harness Jobs=$(makeopts_jobs)" > fi -- Sent from my Android device with K-9 Mail. Please excuse my brevity.