diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-07-22 13:28:20 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-07-22 13:28:45 +0200 |
commit | 3a0985ebcd46a5330bdb0cce79b8815a7c90dd41 (patch) | |
tree | 240558bcba61c4daa01496871039029e79999ab4 | |
parent | a127ffa2e1bb2b7f2d4dea15e1a6a71c8817f5ef (diff) | |
download | aports-3a0985ebcd46a5330bdb0cce79b8815a7c90dd41.tar.bz2 aports-3a0985ebcd46a5330bdb0cce79b8815a7c90dd41.tar.xz |
community/lua-copas: run tests
-rw-r--r-- | community/lua-copas/APKBUILD | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/community/lua-copas/APKBUILD b/community/lua-copas/APKBUILD index 18106c31cf..c3a760a093 100644 --- a/community/lua-copas/APKBUILD +++ b/community/lua-copas/APKBUILD @@ -9,17 +9,33 @@ pkgdesc="Coroutine Oriented Portable Asynchronous Services for Lua" url="http://keplerproject.github.io/copas/" arch="noarch" license="MIT" -makedepends="" +depends="lua-socket" +checkdepends="lua5.1-coxpcall lua-sec" subpackages="" source="$pkgname-$pkgver.tar.gz::https://github.com/keplerproject/$_pkgname/archive/v$_pkgver.tar.gz" builddir="$srcdir/$_pkgname-$_pkgver" +# luajit is not available on s390x +case "$CARCH" in + s390x) _luajit="";; + *) checkdepends="$checkdepends luajit" _luajit="jit";; +esac + _luaversions="5.1 5.2 5.3" for _v in $_luaversions; do - makedepends="$makedepends lua$_v-dev" subpackages="$subpackages lua$_v-$_pkgname:_subpackage" + checkdepends="$checkdepends lua$_v" done +check() { + cd "$builddir" + + local lver; for lver in $_luaversions $_luajit; do + msg "Testing on lua$lver" + make test LUA=lua$lver + done +} + package() { mkdir -p "$pkgdir" } @@ -27,7 +43,7 @@ package() { _subpackage() { local lver="${subpkgname:3:3}" pkgdesc="$pkgdesc $lver" - depends="lua$lver lua$lver-socket" + depends="lua$lver ${depends//lua-/lua$lver-}" [ "$lver" = 5.1 ] && depends="$depends lua5.1-coxpcall" install_if="lua$lver $pkgname=$pkgver-r$pkgrel" |