🧪 test: wire ast/symbol scripts into ctest
This commit is contained in:
parent
bb0cbde79c
commit
f2d2aeb272
|
|
@ -64,3 +64,11 @@ target_compile_options(
|
|||
-Wall -Wextra -Wpedantic $<$<CONFIG:Debug>:-g -O0>
|
||||
-Wno-import-implementation-partition-unit-in-interface-unit
|
||||
$<$<CONFIG:Release>:-O3>)
|
||||
|
||||
if(BUILD_TESTS)
|
||||
add_test(NAME test_ast_script
|
||||
COMMAND ${CMAKE_COMMAND} -E env
|
||||
TEST_AST_OVERRIDE=$<TARGET_FILE:test_ast>
|
||||
BUILD_PRESET=ctest
|
||||
bash ${CMAKE_CURRENT_SOURCE_DIR}/test.sh)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ TEST_AST="${TEST_AST_OVERRIDE:-$(find_test_ast "$REPO_ROOT/build/$BUILD_PRESET")
|
|||
|
||||
# 需要测试的目录列表(可以自行添加)
|
||||
DIRECTORIES=(
|
||||
"/mnt/c/Programs/Tinysoft/TSLGen2/funcext"
|
||||
"$REPO_ROOT/test/test_tree_sitter/test"
|
||||
# "./another_directory"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -103,3 +103,11 @@ target_compile_options(
|
|||
-Wall -Wextra -Wpedantic $<$<CONFIG:Debug>:-g -O0>
|
||||
-Wno-import-implementation-partition-unit-in-interface-unit
|
||||
$<$<CONFIG:Release>:-O3>)
|
||||
|
||||
if(BUILD_TESTS)
|
||||
add_test(NAME test_symbol_script
|
||||
COMMAND ${CMAKE_COMMAND} -E env
|
||||
TEST_SYMBOL_OVERRIDE=$<TARGET_FILE:test_symbol>
|
||||
BUILD_PRESET=ctest
|
||||
bash ${CMAKE_CURRENT_SOURCE_DIR}/test.sh)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ TEST_SYMBOL="${TEST_SYMBOL_OVERRIDE:-$(find "$REPO_ROOT/build/$BUILD_PRESET" -ty
|
|||
|
||||
# 需要测试的目录列表(可以自行添加)
|
||||
DIRECTORIES=(
|
||||
"/mnt/c/Programs/Tinysoft/TSLGen2/funcext"
|
||||
"$REPO_ROOT/test/test_tree_sitter/test"
|
||||
# "./another_directory"
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue