aboutsummaryrefslogtreecommitdiffstats
path: root/main/abuild
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2017-10-27 11:48:08 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2017-10-27 11:48:36 +0200
commitd7b382e0a66d2e4e2856792fec27e8a220119d99 (patch)
treea72a451882e10a76a5ba17376ab4665f21a6b1fa /main/abuild
parent69ec1a33af20b11cea0e580ce5561929f6d1ae01 (diff)
downloadaports-d7b382e0a66d2e4e2856792fec27e8a220119d99.tar.bz2
aports-d7b382e0a66d2e4e2856792fec27e8a220119d99.tar.xz
main/abuild: add env option to require tests
Diffstat (limited to 'main/abuild')
-rw-r--r--main/abuild/0001-abuild-add-env-option-to-require-tests.patch33
-rw-r--r--main/abuild/APKBUILD6
2 files changed, 37 insertions, 2 deletions
diff --git a/main/abuild/0001-abuild-add-env-option-to-require-tests.patch b/main/abuild/0001-abuild-add-env-option-to-require-tests.patch
new file mode 100644
index 0000000000..49497421b8
--- /dev/null
+++ b/main/abuild/0001-abuild-add-env-option-to-require-tests.patch
@@ -0,0 +1,33 @@
+From d85a92478fc8a95bdcb4bf84c30c20ca935abc08 Mon Sep 17 00:00:00 2001
+From: Carlo Landmeter <clandmeter@gmail.com>
+Date: Tue, 24 Oct 2017 14:48:52 +0200
+Subject: [PATCH] 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(+)
+
+diff --git a/abuild.in b/abuild.in
+index 41b465d..7e3c818 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
+ }
+
+--
+2.14.2
+
diff --git a/main/abuild/APKBUILD b/main/abuild/APKBUILD
index 2d04d275ea..a2c15c6f43 100644
--- a/main/abuild/APKBUILD
+++ b/main/abuild/APKBUILD
@@ -2,7 +2,7 @@
pkgname=abuild
pkgver=3.1.0
_ver=${pkgver%_git*}
-pkgrel=0
+pkgrel=1
pkgdesc="Script to build Alpine Packages"
url="http://git.alpinelinux.org/cgit/abuild/"
arch="all"
@@ -21,6 +21,7 @@ subpackages="apkbuild-cpan:cpan:noarch apkbuild-gem-resolver:gems:noarch
options="suid !check"
pkggroups="abuild"
source="http://dev.alpinelinux.org/archive/abuild/abuild-$_ver.tar.xz
+ 0001-abuild-add-env-option-to-require-tests.patch
"
builddir="$srcdir/$pkgname-$_ver"
@@ -67,4 +68,5 @@ _rootbld() {
mkdir -p "$subpkgdir"
}
-sha512sums="bb9093d67942e3a63e4e053692c0bca30940cae05955518206cd9f7029211a188b7f442456ae126e61cbdca224eddb31e967d5cf0637e16893163cc963871a52 abuild-3.1.0.tar.xz"
+sha512sums="bb9093d67942e3a63e4e053692c0bca30940cae05955518206cd9f7029211a188b7f442456ae126e61cbdca224eddb31e967d5cf0637e16893163cc963871a52 abuild-3.1.0.tar.xz
+e02cc44c8ad9dd61c9b80684b8cf5b64477a6fd6221cde9efea2a7594c6e7ce01a51f8bd4b80d72f82f7caf93217979fb0b354c420983891fa93f34c4252a035 0001-abuild-add-env-option-to-require-tests.patch"