[Tarantool-patches] [PATCH v2 luajit 4/7] test: shrink LUA_PATH environment variable
Sergey Bronnikov
sergeyb at tarantool.org
Tue Sep 24 14:15:01 MSK 2024
Hi, Sergey,
On 24.09.2024 13:29, Sergey Kaplun wrote:
> This patch removes the default adding of the tools directory to the
> LUA_PATH. Now it is done only for profilers tests.
>
> Part of tarantool/tarantool#9898
> ---
> test/tarantool-tests/CMakeLists.txt | 20 +++++++++++++-------
> 1 file changed, 13 insertions(+), 7 deletions(-)
>
> diff --git a/test/tarantool-tests/CMakeLists.txt b/test/tarantool-tests/CMakeLists.txt
> index ff402dc0..5e3493b6 100644
> --- a/test/tarantool-tests/CMakeLists.txt
> +++ b/test/tarantool-tests/CMakeLists.txt
> @@ -67,18 +67,16 @@ add_subdirectory(profilers/gh-5813-resolving-of-c-symbols/gnuhash)
> add_subdirectory(profilers/gh-5813-resolving-of-c-symbols/hash)
> add_subdirectory(profilers/gh-5813-resolving-of-c-symbols/stripped)
>
> -# The part of the memory profiler toolchain is located in tools
> -# directory, jit, profiler, and bytecode toolchains are located
> -# in src/ directory, jit/vmdef.lua is autogenerated file also
> -# located in src/ directory, but in the scope of the binary
> -# artefacts tree and auxiliary tests-related modules are located
> +# JIT, profiler, and bytecode toolchains are located in the <src/>
> +# directory, <jit/vmdef.lua> is the autogenerated file also
> +# located in the <src/> directory, but in the scope of the binary
> +# artifacts tree, and auxiliary tests-related modules are located
> # in the current directory (but tests are run in the binary
> -# directory), so LUA_PATH need to be updated.
> +# directory), so LUA_PATH needs to be updated.
> make_lua_path(LUA_PATH
> PATHS
> ${CMAKE_CURRENT_SOURCE_DIR}/?.lua
> ${CMAKE_CURRENT_SOURCE_DIR}/?/init.lua
> - ${PROJECT_SOURCE_DIR}/tools/?.lua
> ${LUAJIT_SOURCE_DIR}/?.lua
> ${LUAJIT_BINARY_DIR}/?.lua
> )
> @@ -163,4 +161,12 @@ foreach(test_path ${tests})
> LABELS ${TEST_SUITE_NAME}
> DEPENDS tarantool-tests-deps
> )
> +
> + # The part of the profilers toolchain is located in the <tools/>
> + # directory, so LUA_PATH needs to be updated.
> + if(test_name MATCHES "^profilers")
> + AppendTestEnvVar(${test_title}
> + LUA_PATH "${PROJECT_SOURCE_DIR}/tools/?.lua\;"
> + )
> + endif()
> endforeach()
AFAIR, we decided to move the last hunk to profilers/CMakeLists.txt.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20240924/7f4983b3/attachment.htm>
More information about the Tarantool-patches
mailing list