From ca3884a0ceedd37e071717697afb8554331e511c Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Thu, 14 Apr 2022 13:28:27 +0200 Subject: [PATCH] Add basic test for Lua module to %check --- lua-posix.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua-posix.spec b/lua-posix.spec index 56681d4..607e780 100644 --- a/lua-posix.spec +++ b/lua-posix.spec @@ -29,8 +29,13 @@ build-aux/luke CFLAGS="%build_cflags" LDFLAGS="%build_ldflags" build-aux/luke install PREFIX=%{buildroot}%{_prefix} INST_LIBDIR=%{buildroot}%{lua_libdir} -%if %{with check} %check +lua -e \ + 'package.cpath="%{buildroot}%{lua_libdir}/?.so;"..package.cpath; + package.path="%{buildroot}%{lua_pkgdir}/?.lua;"..package.path; + local posix = require("posix.errno"); print("Hello from "..posix.version.."!");' + +%if %{with check} lua ./spec/spec_helper.lua %endif