<!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, LGTM.</p>
<p>See a minor comment below.</p>
<p><br>
</p>
<p>Sergey<br>
</p>
<div class="moz-cite-prefix">On 14.08.2024 16:55, Sergey Kaplun
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:e45de17d71cc09dafe428e8261d1039734f10055.1723638851.git.skaplun@tarantool.org">
<pre class="moz-quote-pre" wrap="">Before this patch +jit flag is given to the LuaJIT test suite
unconditionally even when LuaJIT is built as a pure interpreter.
This patch fixes the behaviour by setting the flag only when
`LUAJIT_DISABLE_JIT` option is not set.
Needed for tarantool/tarantool#9398
---
test/LuaJIT-tests/CMakeLists.txt | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/test/LuaJIT-tests/CMakeLists.txt b/test/LuaJIT-tests/CMakeLists.txt
index 9fbe9bf5..019762e0 100644
--- a/test/LuaJIT-tests/CMakeLists.txt
+++ b/test/LuaJIT-tests/CMakeLists.txt
@@ -42,11 +42,15 @@ if(LUAJIT_USE_ASAN)
endif()
endif()
+if(NOT LUAJIT_DISABLE_JIT)
+ list(APPEND LUAJIT_TEST_TAGS_EXTRA +jit)
+endif()
+
if(LUAJIT_NO_UNWIND)
# Test <catch_cpp.lua> verifies the interoperability with C++
# ABI exceptions, so it requires external unwinding enabled.
# Hence, skip them otherwise.
- set(LUAJIT_TEST_TAGS_EXTRA +internal_unwinder)
+ list(APPEND LUAJIT_TEST_TAGS_EXTRA +internal_unwinder)
endif()
if(CMAKE_C_FLAGS MATCHES "-march=skylake-avx512")
@@ -55,7 +59,7 @@ if(CMAKE_C_FLAGS MATCHES "-march=skylake-avx512")
# built with the enabled AVX512 instruction set, see
# <a class="moz-txt-link-freetext" href="https://github.com/tarantool/tarantool/issues/6787">https://github.com/tarantool/tarantool/issues/6787</a>.
# Hence, skip this when "skylake-avx512" is passed.
- set(LUAJIT_TEST_TAGS_EXTRA +avx512)
+ list(APPEND LUAJIT_TEST_TAGS_EXTRA +avx512)
endif()
set(TEST_SUITE_NAME "LuaJIT-tests")
@@ -73,7 +77,7 @@ add_test_suite_target(LuaJIT-tests
set(test_title "test/${TEST_SUITE_NAME}")
add_test(NAME "${test_title}"
COMMAND ${LUAJIT_TEST_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR}/test.lua
- +slow +ffi +bit +jit ${LUAJIT_TEST_TAGS_EXTRA}
+ +slow +ffi +bit ${LUAJIT_TEST_TAGS_EXTRA}</pre>
</blockquote>
<p>LUAJIT_TEST_TAGS_EXTRA is a list and to convert CMake list to a
whitespace-separated strings<br>
<br>
a list should be put in double quotes.</p>
<p>However, I've run tests with options for avx512 and
-DLUAJIT_NO_UNWIND=ON</p>
<p>and passing test flags works fine without double quotes.<br>
</p>
<blockquote type="cite"
cite="mid:e45de17d71cc09dafe428e8261d1039734f10055.1723638851.git.skaplun@tarantool.org">
<pre class="moz-quote-pre" wrap="">
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
set_tests_properties("${test_title}" PROPERTIES
</pre>
</blockquote>
</body>
<lt-container></lt-container>
</html>