From: "Kent Fredric" <kentnl@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/perl-overlay:master commit in: eclass/
Date: Sun, 17 Sep 2017 00:51:57 +0000 (UTC) [thread overview]
Message-ID: <1505608778.827cfafd22e458208ed384e48e71e57c9c333b05.kentnl@gentoo> (raw)
commit: 827cfafd22e458208ed384e48e71e57c9c333b05
Author: Kent Fredric <kentnl <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 16 06:25:35 2017 +0000
Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org>
CommitDate: Sun Sep 17 00:39:38 2017 +0000
URL: https://gitweb.gentoo.org/proj/perl-overlay.git/commit/?id=827cfafd
perl-module.eclass: Reimplement src_test using perl_has_test_opt
eclass/perl-module.eclass | 77 ++++++++++++++++++++++++++---------------------
1 file changed, 43 insertions(+), 34 deletions(-)
diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index 5789d96bf..d94a3d554 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -316,7 +316,8 @@ perl-module_src_compile() {
fi
}
-# Starting 2014-10-12:
+# Historical notes for EAPI5 only on perl-experimental
+# Starting 2014-10-12
#
# AUTHORS:
#
@@ -344,51 +345,59 @@ perl-module_src_compile() {
# SRC_TEST:
# No longer used and completely ignored
+# @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"
+# If neither "do" nor "parallel" is recognized, tests are skipped.
+# (In EAPI=5 the variable is called SRC_TEST, defaults to "skip", and
+# recognizes fewer options.)
+# The following space-separated keywords are recognized:
+# do : run tests
+# parallel : run tests in parallel
+# verbose : increase test verbosity
+# network : do not try to disable network tests
+
+# @ECLASS-VARIABLE: DIST_TEST_OVERRIDE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# (EAPI=6) Variable that controls if tests are run in the test phase
+# at all, and if yes under which conditions. It is intended for use in
+# make.conf or the environment by ebuild authors during testing, and
+# accepts the same values as DIST_TEST. If set, it overrides DIST_TEST
+# completely. DO NOT USE THIS IN EBUILDS!
+
+# @FUNCTION: perl-module_src-test
+# @DESCRIPTION:
+# This code attempts to work out your threadingness and runs tests
+# according to the settings of DIST_TEST using Test::Harness.
perl-module_src_test() {
debug-print-function $FUNCNAME "$@"
+ local my_test_verbose=0
- # Turn it off globally per user choice.
- if has 'parallel-test' ${USER_PERL_RESTRICT}; then
- einfo "Disabling Parallel Testing: USER_PERL_RESTRICT=parallel-test";
- export HARNESS_OPTIONS="";
-
- # If user has TEST_VERBOSE globally, disable parallelism because verboseness
- # can break parallel testing.
- elif ! has "${TEST_VERBOSE:-0}" 0; then
- einfo "Disabling Parallel Testing: TEST_VERBOSE=${TEST_VERBOSE}";
- export HARNESS_OPTIONS="";
-
- # If ebuild says parallel tests dont work, turn them off.
- elif has 'parallel-test' ${PERL_RESTRICT}; then
- einfo "Disabling Parallel Testing: PERL_RESTRICT=parallel-test";
- export HARNESS_OPTIONS="";
- else
- # Default is on.
+
+ if perl_has_test_opt skip; then
+ return;
+ fi
+
+ perl_has_test_opt verbose && my_test_verbose=1
+
+ if perl_has_test_opt parallel; then
einfo "Test::Harness Jobs=$(makeopts_jobs)"
export HARNESS_OPTIONS=j$(makeopts_jobs)
+ else
+ export HARNESS_OPTIONS=""
fi
- # If a user says "USER_PERL_RESTRICT=network-test",
- # then assume many CPAN dists will respect NO_NETWORK_TESTING and friends
- # even if Gentoo haven't made the entire dist "no network testing"
- if has 'network-test' ${USER_PERL_RESTRICT}; then
+ if ! perl_has_test_opt network; then
export NO_NETWORK_TESTING=1
fi
- # However, if CPAN don't auto trigger on the above, Gentoo
- # Can still disable them package wide with PERL_RESTRICT=network-test
- # But they'll run by default unless USER_PERL_RESTRICT=network-test
- if has 'network-test' ${USER_PERL_RESTRICT} && has 'network-test' ${PERL_RESTRICT}; then
- einfo "Skipping Tests: USER_PERL_RESTRICT=network-test && PERL_RESTRICT=network-test";
- return true;
- fi
-
- ${perlinfo_done} || perl_set_version
-
+ perl_set_version
if [[ -f Build ]] ; then
- ./Build test verbose=${TEST_VERBOSE:-0} || die "test failed"
+ ./Build test verbose=${my_test_verbose} || die "test failed"
elif [[ -f Makefile ]] ; then
- emake test TEST_VERBOSE=${TEST_VERBOSE:-0} || die "test failed"
+ emake test TEST_VERBOSE=${my_test_verbose} || die "test failed"
fi
}
next reply other threads:[~2017-09-17 0:52 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-17 0:51 Kent Fredric [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-09-17 0:51 [gentoo-commits] proj/perl-overlay:master commit in: eclass/ Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2015-06-25 1:26 Kent Fredric
2015-06-21 0:39 Kent Fredric
2015-06-21 0:39 Kent Fredric
2015-06-20 22:13 Kent Fredric
2015-06-20 22:13 Kent Fredric
2015-06-20 22:13 Kent Fredric
2015-06-20 22:13 Kent Fredric
2015-03-26 12:14 Kent Fredric
2015-03-15 17:06 Kent Fredric
2015-03-15 5:10 Kent Fredric
2015-03-15 5:10 Kent Fredric
2014-12-23 18:19 Kent Fredric
2014-12-23 18:19 Kent Fredric
2014-12-23 14:43 Kent Fredric
2014-10-11 18:46 Kent Fredric
2014-10-11 18:46 Kent Fredric
2014-10-11 18:46 Kent Fredric
2014-08-26 19:06 Kent Fredric
2014-08-24 13:56 Kent Fredric
2014-08-20 13:24 Kent Fredric
2014-04-04 23:09 Kent Fredric
2013-09-17 4:35 Kent Fredric
2013-09-17 4:28 Kent Fredric
2013-04-28 16:53 Kent Fredric
2012-09-15 16:58 Torsten Veller
2012-06-07 6:06 Torsten Veller
2012-06-05 18:22 Torsten Veller
2012-06-05 18:22 Torsten Veller
2012-04-23 13:04 Torsten Veller
2012-04-23 13:04 Torsten Veller
2012-04-23 13:04 Torsten Veller
2011-08-16 17:02 Torsten Veller
2011-04-24 8:37 Torsten Veller
2011-02-04 8:15 tove
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1505608778.827cfafd22e458208ed384e48e71e57c9c333b05.kentnl@gentoo \
--to=kentnl@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox