<!DOCTYPE html>
<html data-lt-installed="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body style="padding-bottom: 1px;">
<p>Hi, Sergey</p>
<p>thanks for the patch! See comments below:</p>
<p><br>
</p>
<p>I would replace a short commit description with <br>
</p>
<p>"shrink LUA_PATH environment variable for profiler tests"</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 23.09.2024 10:18, Sergey Kaplun
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:2a773d9a5c814c298f1e1ae1f359060cbbc560f4.1727074292.git.skaplun@tarantool.org">
<pre class="moz-quote-pre" wrap="">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 | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/test/tarantool-tests/CMakeLists.txt b/test/tarantool-tests/CMakeLists.txt
index 4530c9fd..a1339100 100644
--- a/test/tarantool-tests/CMakeLists.txt
+++ b/test/tarantool-tests/CMakeLists.txt
@@ -62,18 +62,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
)
@@ -159,3 +157,15 @@ foreach(test_path ${tests})
DEPENDS tarantool-tests-deps
)
endforeach()
+
+# The part of the profilers toolchain is located in the <tools/>
+# directory, so LUA_PATH needs to be updated.
+file(GLOB_RECURSE profilers_tests
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ "profilers/*${LUA_TEST_SUFFIX}"
+)
+foreach(test_name ${profilers_tests})
+ AppendTestEnvVar("test/${TEST_SUITE_NAME}/${test_name}"
+ LUA_PATH "${PROJECT_SOURCE_DIR}/tools/?.lua\;"
+ )
+endforeach()</pre>
</blockquote>
<p>discussed verbally,</p>
<p>let's move this to a main foreach:</p>
<p><br>
</p>
<p>--- a/test/tarantool-tests/CMakeLists.txt<br>
+++ b/test/tarantool-tests/CMakeLists.txt<br>
@@ -156,16 +156,12 @@ foreach(test_path ${tests})<br>
LABELS ${TEST_SUITE_NAME}<br>
DEPENDS tarantool-tests-deps<br>
)<br>
-endforeach()<br>
<br>
-# The part of the profilers toolchain is located in the
<tools/><br>
-# directory, so LUA_PATH needs to be updated.<br>
-file(GLOB_RECURSE profilers_tests<br>
- RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}<br>
- "profilers/*${LUA_TEST_SUFFIX}"<br>
-)<br>
-foreach(test_name ${profilers_tests})<br>
- AppendTestEnvVar("test/${TEST_SUITE_NAME}/${test_name}"<br>
- LUA_PATH "${PROJECT_SOURCE_DIR}/tools/?.lua\;"<br>
- )<br>
+ # The part of the profilers toolchain is located in the
<tools/><br>
+ # directory, so LUA_PATH needs to be updated.<br>
+ if(test_name MATCHES "^profilers")<br>
+ AppendTestEnvVar("${test_title}"<br>
+ LUA_PATH "${PROJECT_SOURCE_DIR}/tools/?.lua\;"<br>
+ )<br>
+ endif()<br>
endforeach()<br>
</p>
<blockquote type="cite"
cite="mid:2a773d9a5c814c298f1e1ae1f359060cbbc560f4.1727074292.git.skaplun@tarantool.org">
<pre class="moz-quote-pre" wrap="">
</pre>
</blockquote>
</body>
<lt-container></lt-container>
</html>