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

Make lookup of statically built binary more robust

If the tarantool repository is used as a submodule named <foobar> in
another repository, then the statically built binary will be placed in

  <binary_dir>/<foobar>/src/tarantool

not in

  <binary_dir>/src/tarantool

where static-build/CMakeLists.txt currently tries to look it up in order
to run `ctest` and so we can't use static-build/CMakeLists.txt as is.

Let's instead use

  <install_dir>/bin/tarantool

This way `ctest` will work for static-build in both open-source and EE
repository without requiring any modifications.
parent c7fd1d95
No related branches found
No related tags found
No related merge requests found
......@@ -303,31 +303,31 @@ ExternalProject_Add(tarantool
)
enable_testing()
ExternalProject_Get_Property(tarantool binary_dir)
SET(TARANTOOL_BINARY_DIR ${binary_dir})
ExternalProject_Get_Property(tarantool install_dir)
SET(TARANTOOL_BINARY ${install_dir}/bin/tarantool)
add_test(
NAME check-dependencies
COMMAND ${CMAKE_COMMAND}
-D FILE=${TARANTOOL_BINARY_DIR}/src/tarantool
-D FILE=${TARANTOOL_BINARY}
-P CheckDependencies.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test
)
add_test(
NAME check-exports
COMMAND ${TARANTOOL_BINARY_DIR}/src/tarantool
COMMAND ${TARANTOOL_BINARY}
${CMAKE_CURRENT_SOURCE_DIR}/test/static-build/exports.test.lua
)
add_test(
NAME check-traceback
COMMAND ${TARANTOOL_BINARY_DIR}/src/tarantool
COMMAND ${TARANTOOL_BINARY}
${CMAKE_CURRENT_SOURCE_DIR}/test/static-build/traceback.test.lua
)
add_test(
NAME check-luarocks
COMMAND ${TARANTOOL_BINARY_DIR}/src/tarantool
COMMAND ${TARANTOOL_BINARY}
${CMAKE_CURRENT_SOURCE_DIR}/test/static-build/luarocks.test.lua
)
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