From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8E5331384B4 for ; Fri, 11 Dec 2015 21:07:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D97CB21C09D; Fri, 11 Dec 2015 21:04:01 +0000 (UTC) Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.220]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A4DD521C05C for ; Fri, 11 Dec 2015 21:03:57 +0000 (UTC) X-RZG-AUTH: :LWIAZ0WpaN8ZbZokUUbkjK1FlhWAPobRR6CE01MhpOKB+5jY/DVlPOa8rOHZrOuQs+JEAQ== X-RZG-CLASS-ID: mo00 Received: from pinacolada.akhuettel.de (88-133-183-17.hsi.glasfaser-ostbayern.de [88.133.183.17]) by smtp.strato.de (RZmta 37.14 AUTH) with ESMTPSA id a00681rBBL3tF6U (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Fri, 11 Dec 2015 22:03:55 +0100 (CET) Received: by pinacolada.akhuettel.de (Postfix, from userid 1000) id 679C6300117; Fri, 11 Dec 2015 22:03:55 +0100 (CET) From: dilfridge@gentoo.org To: gentoo-dev@lists.gentoo.org Cc: "Andreas K. Huettel (dilfridge)" Subject: [gentoo-dev] [PATCH 10/15] perl-module.eclass: Rename SRC_TEST to DIST_TEST in EAPI=6 and default to "do parallel" Date: Fri, 11 Dec 2015 22:03:06 +0100 Message-Id: <1449867791-30513-10-git-send-email-dilfridge@gentoo.org> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1449867791-30513-1-git-send-email-dilfridge@gentoo.org> References: <201512112201.15354.dilfridge@gentoo.org> <1449867791-30513-1-git-send-email-dilfridge@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: f557db8c-40e3-4bbd-a625-e0ed2284ea03 X-Archives-Hash: 6442a60f1abb3dca281f7dfc5309e31e From: "Andreas K. Huettel (dilfridge)" --- 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 + # @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 -- 2.6.3