diff options
author | Matoro Mahri <matoro@users.noreply.github.com> | 2023-10-14 18:53:53 -0400 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-10-16 10:26:14 +0100 |
commit | 6a4601492180cce23233e15762156e3682147936 (patch) | |
tree | 91e3ff7ef4587327825357f9583d55b65ae4cae1 /eclass | |
parent | package.mask: Last rite dev-perl/PathTools (diff) | |
download | gentoo-6a4601492180cce23233e15762156e3682147936.tar.gz gentoo-6a4601492180cce23233e15762156e3682147936.tar.bz2 gentoo-6a4601492180cce23233e15762156e3682147936.zip |
perl-module.eclass: extend DIST_TEST="do" to cover make-based tests
For packages using make to run tests rather than Test::Harness,
DIST_TEST="do" is ineffective at disabling parallelization. This forces
-j1 on these packages when set.
Bug: https://bugs.gentoo.org/909051
Signed-off-by: Matoro Mahri <matoro@users.noreply.github.com>
Closes: https://github.com/gentoo/gentoo/pull/33354
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/perl-module.eclass | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass index 32cd603c7be5..7bb02abed8c5 100644 --- a/eclass/perl-module.eclass +++ b/eclass/perl-module.eclass @@ -335,6 +335,7 @@ perl-module_src_test() { local my_test_control local my_test_verbose + local my_test_makeopts [[ -n "${DIST_TEST_OVERRIDE}" ]] && ewarn "DIST_TEST_OVERRIDE is set to ${DIST_TEST_OVERRIDE}" my_test_control=${DIST_TEST_OVERRIDE:-${DIST_TEST:-do parallel}} @@ -344,6 +345,10 @@ perl-module_src_test() { return 0 fi + if has 'do' ${my_test_control} && ! has 'parallel' ${my_test_control} ; then + my_test_makeopts="-j1" + fi + if has verbose ${my_test_control} ; then my_test_verbose=1 else @@ -383,7 +388,7 @@ perl-module_src_test() { if [[ -f Build ]] ; then ./Build test verbose=${my_test_verbose} || die "test failed" elif [[ -f Makefile ]] ; then - emake test TEST_VERBOSE=${my_test_verbose} + emake ${my_test_makeopts} test TEST_VERBOSE=${my_test_verbose} fi } |