Gentoo Archives: gentoo-dev

From: dilfridge@g.o
To: gentoo-dev@l.g.o
Cc: "Andreas K. Huettel (dilfridge)" <dilfridge@g.o>
Subject: [gentoo-dev] [PATCH 11/15] perl-module.eclass: Introduce DIST_TEST_OVERRIDE in EAPI=6
Date: Fri, 11 Dec 2015 21:06:52
Message-Id: 1449867791-30513-11-git-send-email-dilfridge@gentoo.org
In Reply to: [gentoo-dev] [PATCH 01/15] perl-module.eclass: Allow EAPI=6, ban PERL_EXPORT_PHASE_FUNCTIONS there, simplify perl dependency by dilfridge@gentoo.org
1 From: "Andreas K. Huettel (dilfridge)" <dilfridge@g.o>
2
3 ---
4 eclass/perl-module.eclass | 11 ++++++++++-
5 1 file changed, 10 insertions(+), 1 deletion(-)
6
7 diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
8 index 0d428d2..4dc39eb 100644
9 --- a/eclass/perl-module.eclass
10 +++ b/eclass/perl-module.eclass
11 @@ -328,6 +328,14 @@ perl-module_src_compile() {
12 # DIST_TEST=parallel
13 # DIST_TEST=skip
14
15 +# @ECLASS-VARIABLE: DIST_TEST_OVERRIDE
16 +# @DESCRIPTION:
17 +# (EAPI=6) Variable that controls if tests are run in the test phase
18 +# at all, and if yes under which conditions. It is intended for use in
19 +# make.conf or the environment by ebuild authors during testing, and
20 +# accepts the same values as DIST_TEST. If set, it overrides DIST_TEST
21 +# completely. DO NOT USE THIS IN EBUILDS!
22 +
23 # @FUNCTION: perl-module_src-test
24 # @USAGE: perl-module_src_test()
25 # @DESCRIPTION:
26 @@ -342,7 +350,8 @@ perl-module_src_test() {
27 if [[ ${EAPI:-0} = 5 ]] ; then
28 my_test_control=${SRC_TEST}
29 else
30 - my_test_control=${DIST_TEST:-do parallel}
31 + [[ -n "${DIST_TEST_OVERRIDE}" ]] && ewarn DIST_TEST_OVERRIDE is set to ${DIST_TEST_OVERRIDE}
32 + my_test_control=${DIST_TEST_OVERRIDE:-${DIST_TEST:-do parallel}}
33 fi
34
35 if has 'do' ${my_test_control} || has 'parallel' ${my_test_control} ; then
36 --
37 2.6.3

Replies