mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-30 08:48:07 -07:00
Signed-off-by: Henning Schild <henning@hennsch.de> Part-of: https://codeberg.org/gentoo/gentoo/pulls/1507 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
47 lines
1.2 KiB
Bash
47 lines
1.2 KiB
Bash
# Copyright 1999-2026 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=9
|
|
|
|
inherit multiprocessing optfeature
|
|
|
|
MY_PN="bats-core"
|
|
DESCRIPTION="Bats-core: Bash Automated Testing System"
|
|
HOMEPAGE="https://github.com/bats-core/bats-core/"
|
|
SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
|
|
S="${WORKDIR}/${MY_PN}-${PV}"
|
|
|
|
LICENSE="MIT"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
|
|
|
DEPEND="app-shells/bash:*"
|
|
RDEPEND="${DEPEND}"
|
|
|
|
src_test() {
|
|
local my_jobs=$(get_nproc)
|
|
if ! command -v parallel >/dev/null; then
|
|
my_jobs=1
|
|
fi
|
|
# 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() {
|
|
exeinto /usr/libexec/${MY_PN}
|
|
doexe libexec/${MY_PN}/*
|
|
exeinto /usr/lib/${MY_PN}
|
|
doexe lib/${MY_PN}/*
|
|
dobin bin/${PN}
|
|
|
|
dodoc README.md
|
|
doman man/${PN}.1 man/${PN}.7
|
|
}
|
|
|
|
pkg_postinst() {
|
|
optfeature "Parallel Execution" sys-process/parallel
|
|
}
|