mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-16 14:29:05 -07:00
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 <henning@hennsch.de> Part-of: https://codeberg.org/gentoo/gentoo/pulls/1507 Merges: https://codeberg.org/gentoo/gentoo/pulls/1507 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
This commit is contained in:
committed by
Joonas Niilola
parent
c749a6ebc4
commit
dd9ee7e708
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user