From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 19D231396D0 for ; Sun, 17 Sep 2017 00:52:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0DE901FC0D3; Sun, 17 Sep 2017 00:52:02 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E31C11FC0D3 for ; Sun, 17 Sep 2017 00:52:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 033D333BF1C for ; Sun, 17 Sep 2017 00:52:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9E95B9092 for ; Sun, 17 Sep 2017 00:51:57 +0000 (UTC) From: "Kent Fredric" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Kent Fredric" Message-ID: <1505608777.a02c6eaf26f440d9cdca673672f7cccf3fc1535f.kentnl@gentoo> Subject: [gentoo-commits] proj/perl-overlay:master commit in: eclass/ X-VCS-Repository: proj/perl-overlay X-VCS-Files: eclass/perl-functions.eclass X-VCS-Directories: eclass/ X-VCS-Committer: kentnl X-VCS-Committer-Name: Kent Fredric X-VCS-Revision: a02c6eaf26f440d9cdca673672f7cccf3fc1535f X-VCS-Branch: master Date: Sun, 17 Sep 2017 00:51:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 0983f8bb-5ef2-43ed-b773-84adaf6be759 X-Archives-Hash: bf6b492f0d65927b702a32e316f1bfc1 commit: a02c6eaf26f440d9cdca673672f7cccf3fc1535f Author: Kent Fredric gentoo org> AuthorDate: Sat Sep 16 02:12:17 2017 +0000 Commit: Kent Fredric gentoo org> CommitDate: Sun Sep 17 00:39:37 2017 +0000 URL: https://gitweb.gentoo.org/proj/perl-overlay.git/commit/?id=a02c6eaf perl-functions.eclass: add internal option-decoder for eapi5 This is an internal function that produces a canonical option string as per EAPI5 as per the deviated API I introduced on overlay eclass/perl-functions.eclass | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/eclass/perl-functions.eclass b/eclass/perl-functions.eclass index 21fe60592..28657799f 100644 --- a/eclass/perl-functions.eclass +++ b/eclass/perl-functions.eclass @@ -740,3 +740,46 @@ perl_check_eapi() { eerror "Your ebuild/env contains eclass variables that are known invalid/legacy and indicate author oversight." die "Please file a bug for this ebuild as per above details." } + +# Internal: this is specific to EAPI5 on the overlay +_perl_get_test_opts_eapi5() { + local can_test=1 + local is_parallel=1 + local is_verbose=0 + local is_network=1 + debug-print-function $FUNCNAME "$@" + + if has 'parallel-test' ${USER_PERL_RESTRICT}; then + ewarn "Parallel tests disabled via USER_PERL_RESTRICT=parallel-test" + is_parallel=0 + elif ! has "${TEST_VERBOSE:-0}" 0; then + ewarn "Parallel tests disabled via TEST_VERBOSE=1" + ewarn "Verbose tests enabled via TEST_VERBOSE=1" + is_verbose=1 + is_parallel=0 + elif has 'parallel-test' ${PERL_RESTRICT}; then + ewarn "Parallel tests disabled via PERL_RESTRICT=parallel-test" + is_parallel=0 + fi + + if has 'network-test' ${USER_PERL_RESTRICT} && has 'network-test' ${PERL_RESTRICT}; then + ewarn "Tests disabled via USER_PERL_RESTRICT & PERL_RESTRICT = network-test" + can_test=0 + elif has 'network-test' ${USER_PERL_RESTRICT}; then + ewarn "Network tests disabled via USER_PERL_RESTRICT=network-test" + is_network=0 + fi + + if [[ ${can_test} == 0 ]]; then + printf "skip\n" + return; + fi + + printf "test " + [[ ${is_parallel} == 1 ]] && printf "parallel " + [[ ${is_verbose} == 1 ]] && printf "verbose " + [[ ${is_network} == 1 ]] && printf "network " + printf "\n" + return +} +