Skip to content

Commit

Permalink
test: enable CLI-related lua-Harness tests back
Browse files Browse the repository at this point in the history
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 the lua-Harness
suite, disabled in the commit 39a4db5
("test: support Tarantool in lua-Harness"), can be enabled back.

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

Follows up tarantool/tarantool#5541

Reviewed-by: Maxim Kokryashkin <[email protected]>
Reviewed-by: Sergey Kaplun <[email protected]>
Signed-off-by: Sergey Kaplun <[email protected]>
  • Loading branch information
igormunkin authored and Buristan committed Feb 27, 2024
1 parent f90f7e0 commit e316cbf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/lua-Harness-tests/241-standalone.t
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions test/lua-Harness-tests/411-luajit.t
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit e316cbf

Please sign in to comment.