Adding support for cmake test, breaking tests apart a bit for easier testing

This commit is contained in:
Ian Roddis
2021-10-17 17:25:33 -03:00
parent e4e50fc219
commit 860cea6004
2 changed files with 19 additions and 3 deletions

View File

@@ -1,5 +1,4 @@
project(tests)
add_executable(tests main.cpp
add_executable(unit_tests main.cpp
# unit tests
unit_dag.cpp
unit_dagrunner.cpp
@@ -15,4 +14,20 @@ add_executable(tests main.cpp
# Performance checks
perf_dag.cpp
)
target_link_libraries(tests libdaggy stdc++fs Catch2::Catch2 curl)
target_link_libraries(unit_tests libdaggy stdc++fs Catch2::Catch2 curl)
add_executable(integration_tests main.cpp
# unit tests
int_basic.cpp
)
target_link_libraries(integration_tests libdaggy stdc++fs Catch2::Catch2 curl)
add_executable(perf_tests main.cpp
# Performance checks
perf_dag.cpp
)
target_link_libraries(perf_tests libdaggy stdc++fs Catch2::Catch2 curl)
add_test(UNIT_TESTS ${CMAKE_BINARY_DIR}/tests/unit_tests)
add_test(INT_TESTS ${CMAKE_BINARY_DIR}/tests/integration_tests)
add_test(PERF_TESTS ${CMAKE_BINARY_DIR}/tests/perf_tests)