From dd9ee7e708fdf37717df35f901c2d2f06189a6ef Mon Sep 17 00:00:00 2001 From: Henning Schild Date: Wed, 22 Jul 2026 23:10:19 +0200 Subject: [PATCH] dev-util/bats: use upstreams way of running parallel tests Running the self-test does fail if we run it with `--jobs` but works if we use BATS_NUMBER_OF_PARALLEL_JOBS. The latter is how upstream does test. Gentoo CI never found this because of "optfeature" being involved in src_test(). This change fixes tests for users who have the "optfeature" dep installed, no reports or gentoo bugs so far, no change in package content. Upstream issue mentioned in comments. Signed-off-by: Henning Schild Part-of: https://codeberg.org/gentoo/gentoo/pulls/1507 Merges: https://codeberg.org/gentoo/gentoo/pulls/1507 Signed-off-by: Joonas Niilola --- dev-util/bats/bats-1.13.0.ebuild | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dev-util/bats/bats-1.13.0.ebuild b/dev-util/bats/bats-1.13.0.ebuild index ebb936738cca4..71299156154c9 100644 --- a/dev-util/bats/bats-1.13.0.ebuild +++ b/dev-util/bats/bats-1.13.0.ebuild @@ -24,7 +24,10 @@ src_test() { if ! command -v parallel >/dev/null; then my_jobs=1 fi - bin/bats --tap --jobs "${my_jobs}" test || die "Tests failed" + # see https://github.com/bats-core/bats-core/issues/1225 + # BATS_NUMBER_OF_PARALLEL_JOBS should be the same as "--jobs" as we had before + # but turns out they are not so testing like upstream does + BATS_NUMBER_OF_PARALLEL_JOBS="${my_jobs}" bin/bats --tap test || die "Tests failed" } src_install() {