add cmake tests

This commit is contained in:
Martin Michelsen
2022-07-01 22:17:18 -07:00
parent a7e3d4853a
commit f823c2b907
2 changed files with 16 additions and 1 deletions
+12
View File
@@ -97,6 +97,18 @@ endif()
# Test configuration
enable_testing()
file(GLOB TestCases ${CMAKE_SOURCE_DIR}/tests/*.test.txt)
foreach(TestCase IN ITEMS ${TestCases})
add_test(NAME ${TestCase} COMMAND ${CMAKE_BUILD_DIR}/newserv --replay-log=${TestCase} --config=tests/config.json)
endforeach()
# Installation configuration
install(TARGETS newserv DESTINATION bin)