abuild: add env option to require tests
This adds an env option REQUIRE_CHECK to require testsuites to be run. This does not clutter getopts so it can be safely removed afterwards when we enforce tests globally. This will allow our CI infrastructure to enforce testsuites where possible.
This commit is contained in:
parent
6261608ece
commit
573925a0dc
@ -226,6 +226,12 @@ default_sanitycheck() {
|
||||
check_secfixes_comment || return 1
|
||||
|
||||
makedepends_has 'g++' && ! options_has toolchain && warning "g++ should not be in makedepends"
|
||||
|
||||
if ! options_has "!check" && [ -n "$REQUIRE_CHECK" ]; then
|
||||
(unset check; . "$APKBUILD"; type check >/dev/null 2>&1) || \
|
||||
die "Testsuites (abuild check) are required or needs to be explicitly disabled!"
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user