aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-07-20 01:20:11 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-07-20 01:21:06 +0200
commita24d9429a241ea55d290a77ce250c3cb7706b67c (patch)
treebd0b25e843a2c01ae35e8994ef1e68952b037fd2 /testing
parenta2350915351b67b70a1ec08d9acb4bd636239c67 (diff)
downloadaports-a24d9429a241ea55d290a77ce250c3cb7706b67c.tar.bz2
aports-a24d9429a241ea55d290a77ce250c3cb7706b67c.tar.xz
testing/lua-brieflz: run tests
Diffstat (limited to 'testing')
-rw-r--r--testing/lua-brieflz/APKBUILD21
1 files changed, 19 insertions, 2 deletions
diff --git a/testing/lua-brieflz/APKBUILD b/testing/lua-brieflz/APKBUILD
index 596f1bc33d..92d49d7569 100644
--- a/testing/lua-brieflz/APKBUILD
+++ b/testing/lua-brieflz/APKBUILD
@@ -3,16 +3,22 @@
pkgname=lua-brieflz
_pkgname=brieflz.lua
pkgver=0.1.0
-pkgrel=0
+pkgrel=1
pkgdesc="Lua binding for BriefLZ compression library"
url="https://github.com/jirutka/brieflz.lua"
arch="all"
license="MIT"
+checkdepends="lua-basexx lua-busted moonscript"
makedepends=""
subpackages=""
source="$pkgname-$pkgver.tar.gz::https://github.com/jirutka/$_pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
-options="!check" # XXX: missing moonscript pkg
+
+# luajit is not available for s390x
+case "$CARCH" in
+ s390x) _luajit="";;
+ *) checkdepends="$checkdepends luajit" _luajit="jit";;
+esac
_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
@@ -35,6 +41,17 @@ build() {
done
}
+check() {
+ cd "$builddir"
+
+ local lver; for lver in $_luaversions $_luajit; do
+ msg "Testing on lua$lver"
+
+ ln -sf build/lib/lua/${lver/jit/5.1}/brieflz.so .
+ lua$lver /usr/bin/busted
+ done
+}
+
package() {
mkdir -p "$pkgdir"
}