aboutsummaryrefslogtreecommitdiffstats
path: root/community/lua-busted
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2017-03-30 07:08:20 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2017-03-30 07:08:50 +0000
commitdcff16b7a7eb4b3220d01ffc4d69376b6d6be157 (patch)
tree4900ab84d7fa6b2cd442fa398883b261db97f800 /community/lua-busted
parent7ae3194b0d50ff6638f4b3bc14c6f27f251cab11 (diff)
downloadaports-dcff16b7a7eb4b3220d01ffc4d69376b6d6be157.tar.bz2
aports-dcff16b7a7eb4b3220d01ffc4d69376b6d6be157.tar.xz
community/lua-busted: don't check() where luajit is required and not avail
Diffstat (limited to 'community/lua-busted')
-rw-r--r--community/lua-busted/APKBUILD29
1 files changed, 15 insertions, 14 deletions
diff --git a/community/lua-busted/APKBUILD b/community/lua-busted/APKBUILD
index dd6e7f1289..6cc5572537 100644
--- a/community/lua-busted/APKBUILD
+++ b/community/lua-busted/APKBUILD
@@ -4,7 +4,7 @@ pkgname=lua-busted
_pkgname=busted
pkgver=2.0_rc12
_pkgver=${pkgver/_/.}-1
-pkgrel=0
+pkgrel=1
pkgdesc="Elegant Lua unit testing"
url="https://olivinelabs.com/busted/"
arch="noarch"
@@ -40,19 +40,20 @@ prepare() {
check() {
cd "$builddir"
-
- mv bin/busted bin/busted.orig
-
- local lver; for lver in $_luaversions jit; do
- # Some specs invokes bin/busted as subprocess, so we must
- # ensure that it will run on the correct Lua version.
- install -m 755 bin/busted-$lver bin/busted || return 1
-
- msg "Running tests on lua$lver..."
- lua$lver bin/busted spec || return 1
- done
-
- mv bin/busted.orig bin/busted
+ # luajit not avail for selected arches
+ if printf "$checkdepends\n" | grep -q "luajit"; then
+ if [ "$CARCH" != "ppc64le" ] && [ "$CARCH" != "s390x" ]; then
+ mv bin/busted bin/busted.orig
+ local lver; for lver in $_luaversions jit; do
+ # Some specs invokes bin/busted as subprocess, so we must
+ # ensure that it will run on the correct Lua version.
+ install -m 755 bin/busted-$lver bin/busted || return 1
+ msg "Running tests on lua$lver..."
+ lua$lver bin/busted spec || return 1
+ done
+ mv bin/busted.orig bin/busted
+ fi
+ fi
}
package() {