From 97d1ed476225fdd2f86ce5c803d9b98097b0cd3c Mon Sep 17 00:00:00 2001 From: Carlo Landmeter Date: Tue, 24 Oct 2017 14:48:52 +0200 Subject: [PATCH] abuild: add env option to require tests This adds an env option REQ_CHECK to be passed to require testsuites to be run. This does not clutter getopts so can be safely removed afterwards. This allows our CI infra to enforce testsuites. --- abuild.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/abuild.in b/abuild.in index 41b465d..5da040f 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 [ -n "$REQ_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 } -- 2.14.2