diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2017-10-24 14:48:52 +0200 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2017-10-26 22:14:11 +0200 |
commit | 573925a0dc9762c64e8416c3f353c70ac9c7afab (patch) | |
tree | 8c006a2f42d1f52a9cfc9f2377ef5c0e4d976ce4 | |
parent | 6261608ece091b529245ccb885a6e66e35f4f674 (diff) | |
download | abuild-573925a0dc9762c64e8416c3f353c70ac9c7afab.tar.gz abuild-573925a0dc9762c64e8416c3f353c70ac9c7afab.tar.bz2 abuild-573925a0dc9762c64e8416c3f353c70ac9c7afab.tar.xz abuild-573925a0dc9762c64e8416c3f353c70ac9c7afab.zip |
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.
-rw-r--r-- | abuild.in | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 } |