2022-11-30 18:28:50 +00:00
|
|
|
add_subdirectory(test_utils)
|
|
|
|
|
2022-12-01 10:52:48 +00:00
|
|
|
file(COPY data/ DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_data)
|
|
|
|
|
2022-11-30 18:28:50 +00:00
|
|
|
set(TEST_MODULES
|
|
|
|
audio
|
|
|
|
compiler
|
|
|
|
compression
|
|
|
|
core
|
|
|
|
database
|
|
|
|
fonts
|
|
|
|
graphics
|
|
|
|
image
|
|
|
|
ipc
|
|
|
|
network
|
|
|
|
publishing
|
|
|
|
video
|
|
|
|
web
|
|
|
|
windows)
|
|
|
|
|
|
|
|
foreach(module ${TEST_MODULES})
|
|
|
|
add_subdirectory(${module})
|
|
|
|
string(TOUPPER ${module} MODULE_UPPER)
|
|
|
|
list(APPEND UNIT_TEST_FILES ${${MODULE_UPPER}_UNIT_TEST_FILES})
|
|
|
|
list(APPEND UNIT_TEST_DEPENDENCIES ${${MODULE_UPPER}_UNIT_TEST_DEPENDENCIES})
|
2022-12-01 10:52:48 +00:00
|
|
|
|
|
|
|
list(APPEND INTEGRATION_TEST_FILES ${${MODULE_UPPER}_INTEGRATION_TEST_FILES})
|
|
|
|
list(APPEND INTEGRATION_TEST_DEPENDENCIES ${${MODULE_UPPER}_INTEGRATION_TEST_DEPENDENCIES})
|
2023-01-05 13:16:52 +00:00
|
|
|
|
|
|
|
list(APPEND UI_TEST_FILES ${${MODULE_UPPER}_UI_TEST_FILES})
|
|
|
|
list(APPEND UI_TEST_DEPENDENCIES ${${MODULE_UPPER}_UI_TEST_DEPENDENCIES})
|
2022-11-30 18:28:50 +00:00
|
|
|
endforeach()
|
|
|
|
|
|
|
|
add_executable(unit_tests test_runner.cpp ${UNIT_TEST_FILES})
|
|
|
|
target_link_libraries(unit_tests PUBLIC test_utils ${UNIT_TEST_DEPENDENCIES})
|
2023-01-05 13:16:52 +00:00
|
|
|
set_property(TARGET unit_tests PROPERTY FOLDER test)
|
2022-12-01 10:52:48 +00:00
|
|
|
|
|
|
|
add_executable(integration_tests test_runner.cpp ${INTEGRATION_TEST_FILES})
|
|
|
|
target_link_libraries(integration_tests PUBLIC test_utils ${INTEGRATION_TEST_DEPENDENCIES})
|
2023-01-05 13:16:52 +00:00
|
|
|
set_property(TARGET integration_tests PROPERTY FOLDER test)
|
|
|
|
|
|
|
|
add_executable(ui_tests WIN32 ui_test_runner.cpp ${UI_TEST_FILES})
|
|
|
|
target_link_libraries(ui_tests PUBLIC test_utils ${UI_TEST_DEPENDENCIES})
|
|
|
|
set_property(TARGET ui_tests PROPERTY FOLDER test)
|
|
|
|
|