Adding support for cmake test, breaking tests apart a bit for easier testing
This commit is contained in:
@@ -44,6 +44,7 @@ set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
# which point to directories outside the build tree to the install RPATH
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
enable_testing()
|
||||
|
||||
add_subdirectory(daggy)
|
||||
add_subdirectory(tests)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user