From 573925a0dc9762c64e8416c3f353c70ac9c7afab Mon Sep 17 00:00:00 2001 From: Carlo Landmeter Date: Tue, 24 Oct 2017 14:48:52 +0200 Subject: 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. --- abuild.in | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'abuild.in') diff --git a/abuild.in b/abuild.in index 3645a87..3f083b2 100644 --- a/abuild.in +++ b/abuild.in @@ -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 } -- cgit v1.2.3-70-g09d2