🧪 test: register remaining tests in ctest
This commit is contained in:
parent
f2d2aeb272
commit
fbf6c85baa
|
|
@ -40,3 +40,15 @@ endif()
|
||||||
if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/test_provider/CMakeLists.txt)
|
if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/test_provider/CMakeLists.txt)
|
||||||
add_subdirectory(test_provider)
|
add_subdirectory(test_provider)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(BUILD_TESTS)
|
||||||
|
find_program(PYTHON3_EXECUTABLE python3)
|
||||||
|
if(PYTHON3_EXECUTABLE)
|
||||||
|
add_test(NAME test_lsp_json
|
||||||
|
COMMAND ${PYTHON3_EXECUTABLE}
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/run_lsp_json_tests.py
|
||||||
|
--server $<TARGET_FILE:tsl-server>)
|
||||||
|
else()
|
||||||
|
message(WARNING "python3 not found; skipping test_lsp_json registration")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -65,3 +65,8 @@ target_compile_options(
|
||||||
${PROJECT_NAME} PRIVATE -Wall -Wextra -Wpedantic $<$<CONFIG:Debug>:-g -O0>
|
${PROJECT_NAME} PRIVATE -Wall -Wextra -Wpedantic $<$<CONFIG:Debug>:-g -O0>
|
||||||
-Wno-import-implementation-partition-unit-in-interface-unit
|
-Wno-import-implementation-partition-unit-in-interface-unit
|
||||||
$<$<CONFIG:Release>:-O3>)
|
$<$<CONFIG:Release>:-O3>)
|
||||||
|
|
||||||
|
if(BUILD_TESTS)
|
||||||
|
add_test(NAME test_lsp_any
|
||||||
|
COMMAND $<TARGET_FILE:test_lsp_any>)
|
||||||
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -28,3 +28,8 @@ target_compile_options(
|
||||||
-Wall -Wextra -Wpedantic $<$<CONFIG:Debug>:-g -O0>
|
-Wall -Wextra -Wpedantic $<$<CONFIG:Debug>:-g -O0>
|
||||||
-Wno-import-implementation-partition-unit-in-interface-unit
|
-Wno-import-implementation-partition-unit-in-interface-unit
|
||||||
$<$<CONFIG:Release>:-O3>)
|
$<$<CONFIG:Release>:-O3>)
|
||||||
|
|
||||||
|
if(BUILD_TESTS)
|
||||||
|
add_test(NAME test_module
|
||||||
|
COMMAND $<TARGET_FILE:test_module>)
|
||||||
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -210,3 +210,8 @@ target_compile_options(
|
||||||
PRIVATE -Wall -Wextra -Wpedantic $<$<CONFIG:Debug>:-g -O0>
|
PRIVATE -Wall -Wextra -Wpedantic $<$<CONFIG:Debug>:-g -O0>
|
||||||
-Wno-import-implementation-partition-unit-in-interface-unit
|
-Wno-import-implementation-partition-unit-in-interface-unit
|
||||||
$<$<CONFIG:Release>:-O3>)
|
$<$<CONFIG:Release>:-O3>)
|
||||||
|
|
||||||
|
if(BUILD_TESTS)
|
||||||
|
add_test(NAME test_provider
|
||||||
|
COMMAND $<TARGET_FILE:test_provider>)
|
||||||
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -44,3 +44,8 @@ target_compile_options(
|
||||||
PRIVATE -Wall -Wextra -Wpedantic $<$<CONFIG:Debug>:-g -O0>
|
PRIVATE -Wall -Wextra -Wpedantic $<$<CONFIG:Debug>:-g -O0>
|
||||||
-Wno-import-implementation-partition-unit-in-interface-unit
|
-Wno-import-implementation-partition-unit-in-interface-unit
|
||||||
$<$<CONFIG:Release>:-O3>)
|
$<$<CONFIG:Release>:-O3>)
|
||||||
|
|
||||||
|
if(BUILD_TESTS)
|
||||||
|
add_test(NAME test_scheduler
|
||||||
|
COMMAND $<TARGET_FILE:test_scheduler>)
|
||||||
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -120,3 +120,11 @@ target_compile_options(
|
||||||
-Wall -Wextra -Wpedantic $<$<CONFIG:Debug>:-g -O0>
|
-Wall -Wextra -Wpedantic $<$<CONFIG:Debug>:-g -O0>
|
||||||
-Wno-import-implementation-partition-unit-in-interface-unit
|
-Wno-import-implementation-partition-unit-in-interface-unit
|
||||||
$<$<CONFIG:Release>:-O3>)
|
$<$<CONFIG:Release>:-O3>)
|
||||||
|
|
||||||
|
if(BUILD_TESTS)
|
||||||
|
add_test(NAME test_semantic_script
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E env
|
||||||
|
TEST_SEMANTIC_OVERRIDE=$<TARGET_FILE:test_semantic>
|
||||||
|
BUILD_PRESET=ctest
|
||||||
|
bash ${CMAKE_CURRENT_SOURCE_DIR}/test.sh)
|
||||||
|
endif()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue