From bb88a907bf68fdc9340391fc3697053aad174f2c Mon Sep 17 00:00:00 2001 From: zhanliwen Date: Fri, 7 Aug 2020 16:29:28 +0800 Subject: [PATCH] Fix make test error --- lua-expat-1.3.0-improve-test.patch | 12 ++++++++++++ lua-expat.spec | 14 +++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 lua-expat-1.3.0-improve-test.patch diff --git a/lua-expat-1.3.0-improve-test.patch b/lua-expat-1.3.0-improve-test.patch new file mode 100644 index 0000000..878d426 --- /dev/null +++ b/lua-expat-1.3.0-improve-test.patch @@ -0,0 +1,12 @@ +diff -up luaexpat-1.3.0/tests/test.lua.improve luaexpat-1.3.0/tests/test.lua +--- luaexpat-1.3.0/tests/test.lua.improve 2020-06-29 22:26:26.128128387 -0400 ++++ luaexpat-1.3.0/tests/test.lua 2020-06-29 22:27:34.692014057 -0400 +@@ -355,7 +355,7 @@ for i=1,100000 do + lxp.new({}) + end + collectgarbage(); collectgarbage() +-assert(math.abs(gcinfo() - x) <= 2) ++assert(math.abs((gcinfo and gcinfo() or collectgarbage("count")) - x) <= 5, "Garbage collection test didn't pass!") + + + print"OK" diff --git a/lua-expat.spec b/lua-expat.spec index aadc25f..24da940 100644 --- a/lua-expat.spec +++ b/lua-expat.spec @@ -1,15 +1,17 @@ -%define luaver 5.3 +%define luaver 5.4 %define lualibdir %{_libdir}/lua/%{luaver} %define luapkgdir %{_datadir}/lua/%{luaver} Name: lua-expat Version: 1.3.0 -Release: 16 +Release: 17 Summary: A SAX XML parser based on the Expat library License: MIT URL: http://www.keplerproject.org/luaexpat/ Source0: http://matthewwild.co.uk/projects/luaexpat/luaexpat-%{version}.tar.gz +Patch6000: lua-expat-1.3.0-improve-test.patch + BuildRequires: lua >= %{luaver} lua-devel >= %{luaver} gcc expat-devel gdb Requires: lua(abi) = %{luaver} @@ -22,7 +24,7 @@ processing of the document, handling the document elements or text. %package_help %prep -%autosetup -n luaexpat-%{version} +%autosetup -n luaexpat-%{version} -p1 %build %make_build LUA_V=%{luaver} LUA_CDIR=%{lualibdir} LUA_LDIR=%{luapkgdir} LUA_INC=-I%{_includedir} EXPAT_INC=-I%{_includedir} \ @@ -54,6 +56,12 @@ lua -e 'package.cpath="./src/?.so;" .. package.cpath; package.path="./src/?.lua; %doc doc/us/* %changelog +* Fri Aug 7 2020 wenzhanli - 1.3.0-17 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:Fix make test because lua update version 5.4.0 + * Thu Mar 19 2020 openEuler Buildteam - 1.3.0-16 - add necessary BuildRequires -- Gitee