dev-util/bats: respect "makeopts_jobs" in test suite

The fact that the testsuite might run a random number of jobs if
"sys-process/parallel" is installed was raised in a bug. While this
commit does not solve the bug in question, it makes the test respect
MAKEOPTS"-jX".

Bug: https://bugs.gentoo.org/734358
Signed-off-by: Henning Schild <henning@hennsch.de>
Closes: https://github.com/gentoo/gentoo/pull/21883
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
This commit is contained in:
Henning Schild
2021-08-15 17:46:03 +03:00
committed by Joonas Niilola
parent e21c12d096
commit ff3c1baa23
+6 -2
View File
@@ -3,7 +3,7 @@
EAPI=7
inherit optfeature
inherit multiprocessing optfeature
MY_PN="bats-core"
DESCRIPTION="Bats-core: Bash Automated Testing System"
@@ -20,7 +20,11 @@ RDEPEND="${DEPEND}"
S="${WORKDIR}/${MY_PN}-${PV}"
src_test() {
bin/bats --tap test || die "Tests failed"
local my_jobs=$(makeopts_jobs)
if ! command -v parallel; then
my_jobs=1
fi
bin/bats --tap --jobs "$my_jobs" test || die "Tests failed"
}
src_install() {