Skip to content
Snippets Groups Projects
Commit 4aa819bd authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Vladimir Davydov
Browse files

test: move Lua tests from /static-build/test to /test/app-tap

The tests are TAP compatible and applicable to all Tarantool builds so
there's no need to run them with ctest. We just need to add a couple
skip conditions:
 - The luarocks test shouldn't be run on dynamic builds because luarocks
   modules aren't embedded there.
 - The traceback test should be run only if ENABLE_BACKTRACE was set at
   build time.

Part of #9242

NO_DOC=refactoring
NO_TEST=refactoring
NO_CHANGELOG=refactoring

(cherry picked from commit 1eb98ef3)
parent f26262fc
No related branches found
No related tags found
No related merge requests found
...@@ -6,21 +6,3 @@ add_test( ...@@ -6,21 +6,3 @@ add_test(
-D FILE=${TARANTOOL_BINARY} -D FILE=${TARANTOOL_BINARY}
-P ${CMAKE_CURRENT_LIST_DIR}/CheckDependencies.cmake -P ${CMAKE_CURRENT_LIST_DIR}/CheckDependencies.cmake
) )
add_test(
NAME check-exports
COMMAND ${TARANTOOL_BINARY}
${CMAKE_CURRENT_LIST_DIR}/../test/exports.test.lua
)
add_test(
NAME check-traceback
COMMAND ${TARANTOOL_BINARY}
${CMAKE_CURRENT_LIST_DIR}/../test/traceback.test.lua
)
add_test(
NAME check-luarocks
COMMAND ${TARANTOOL_BINARY}
${CMAKE_CURRENT_LIST_DIR}/../test/luarocks.test.lua
)
File moved
#!/usr/bin/env tarantool #!/usr/bin/env tarantool
local tap = require('tap') local tap = require('tap')
local tarantool = require('tarantool')
local test = tap.test('embedded-luarocks') local test = tap.test('embedded-luarocks')
if tarantool.build.linking == 'dynamic' then
test:plan(1)
test:skip('luarocks is not embedded in dynamic build')
os.exit(0)
end
test:plan(3) test:plan(3)
local function find_luarocks_modules(tbl) local function find_luarocks_modules(tbl)
......
#!/usr/bin/env tarantool #!/usr/bin/env tarantool
local tap = require('tap') local tap = require('tap')
local tarantool = require('tarantool')
local fiber = require('fiber') local fiber = require('fiber')
local test = tap.test('traceback') local test = tap.test('traceback')
local _, _, enable_bt = string.find(tarantool.build.options,
'-DENABLE_BACKTRACE=(%a+)')
if enable_bt == 'FALSE' then
test:plan(1)
test:skip('backtrace is disabled')
os.exit(0)
end
test:plan(1) test:plan(1)
local info = fiber.info()[fiber.id()] local info = fiber.info()[fiber.id()]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment