aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-penlight
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-04-16 20:35:26 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-04-16 20:36:11 +0200
commit36afb4927142eaa05709e867d0465adda542464b (patch)
treec60387c41fbb34a50f7806345864dc4de072464f /main/lua-penlight
parentb106a06b4e1fbaf82a3def3cf620e81e9fe63292 (diff)
downloadaports-36afb4927142eaa05709e867d0465adda542464b.tar.bz2
aports-36afb4927142eaa05709e867d0465adda542464b.tar.xz
main/lua-penlight: add check
Diffstat (limited to 'main/lua-penlight')
-rw-r--r--main/lua-penlight/APKBUILD17
1 files changed, 17 insertions, 0 deletions
diff --git a/main/lua-penlight/APKBUILD b/main/lua-penlight/APKBUILD
index f1a020e872..2b7b813b9f 100644
--- a/main/lua-penlight/APKBUILD
+++ b/main/lua-penlight/APKBUILD
@@ -8,17 +8,34 @@ url="http://stevedonovan.github.io/Penlight"
arch="noarch"
license="MIT"
depends="lua"
+checkdepends=""
provides="$pkgname-shared=$pkgver-r$pkgrel" # for backward compatibility
replaces="$pkgname-shared" # for backward compatibility
subpackages="$pkgname-doc"
source="$_rockname-$pkgver.tar.gz::https://github.com/stevedonovan/Penlight/archive/$pkgver.tar.gz"
builddir="$srcdir/Penlight-$pkgver"
+# luajit is not available for selected arches
+case "$CARCH" in
+ s390x) _luajit="";;
+ *) checkdepends="$checkdepends luajit" _luajit="jit";;
+esac
+
_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
+ checkdepends="$checkdepends lua$_v"
provides="$provides lua$_v-${pkgname#lua-}=$pkgver-r$pkgrel" # for backward compatibility
done
+check() {
+ cd "$builddir"
+
+ local lver; for lver in $_luaversions $_luajit; do
+ msg "Testing on Lua $lver"
+ lua$lver run.lua tests
+ done
+}
+
package() {
local lmod_dir="$pkgdir/usr/share/lua/common"
local rockdir="$pkgdir/usr/lib/luarocks/rocks-common/$_rockname/$pkgver-1"