[Tarantool-patches] [PATCH luajit 2/2] test: enable CLI-related lua-Harness tests back

Igor Munkin imun at tarantool.org
Sun Feb 25 13:41:07 MSK 2024


Tarantool supports -b and -j options to use LuaJIT modules since the
commit bf8b76a4dfc9dd62d4131e90e2ae5d83843b6630 ("lua: proxy -j and -b
flags"), so 241-standalone.t and 411-luajit.t tests in lua-Harness
suite, disabled in the commit 39a4db500db2619359c2c9474be016360252060d
("test: support Tarantool in lua-Harness"), can be enabled back.

However, -O options is still not implemented in Tarantool, so the
related part in 411-luajit.t test chunk is still disabled.

Follows up #5541

Signed-off-by: Igor Munkin <imun at tarantool.org>
---
 test/lua-Harness-tests/241-standalone.t | 2 +-
 test/lua-Harness-tests/411-luajit.t     | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/test/lua-Harness-tests/241-standalone.t b/test/lua-Harness-tests/241-standalone.t
index 5b353491..aa011d3b 100755
--- a/test/lua-Harness-tests/241-standalone.t
+++ b/test/lua-Harness-tests/241-standalone.t
@@ -29,7 +29,7 @@ L<https://www.lua.org/manual/5.4/manual.html#7>
 --]]
 
 require'test_assertion'
-local has_bytecode = not ujit and not ravi and not _TARANTOOL
+local has_bytecode = not ujit and not ravi
 local has_error52 = _VERSION >= 'Lua 5.2'
 local has_error53 = _VERSION >= 'Lua 5.3'
 local has_opt_E = _VERSION >= 'Lua 5.2' or (jit and not _TARANTOOL)
diff --git a/test/lua-Harness-tests/411-luajit.t b/test/lua-Harness-tests/411-luajit.t
index 1b2da729..414e6a57 100755
--- a/test/lua-Harness-tests/411-luajit.t
+++ b/test/lua-Harness-tests/411-luajit.t
@@ -27,7 +27,7 @@ See L<https://luajit.org/running.html>
 require'test_assertion'
 local profile = require'profile'
 
-if not jit or ujit or _TARANTOOL then
+if not jit or ujit then
     skip_all("only with LuaJIT")
 end
 
@@ -176,7 +176,9 @@ f = io.popen(cmd)
 matches(f:read'*l', errbuild("unknown luaJIT command or jit%.%* modules not installed"), "-j bad")
 f:close()
 
-if compiled_with_jit then
+if _TARANTOOL then
+    skip("-O is not yet implemented in Tarantool")
+elseif compiled_with_jit then
     cmd = lua .. " -O hello-411.lua"
     f = io.popen(cmd)
     equals(f:read'*l', 'Hello World', "-O")
-- 
2.39.2



More information about the Tarantool-patches mailing list