Add basic test for Lua module to %check

This commit is contained in:
Robert Scheck 2022-04-14 13:28:27 +02:00
parent 7801a0ed2c
commit ca3884a0ce

View File

@ -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