Separate unit tests and integration tests (#1393)

Fixes #1391
This commit is contained in:
Alex Kremer
2024-05-07 15:12:48 +01:00
committed by GitHub
parent 98ef83d470
commit cbc856b190
177 changed files with 168 additions and 106 deletions

View File

@@ -8,7 +8,8 @@ project(clio VERSION ${CLIO_VERSION} HOMEPAGE_URL "https://github.com/XRPLF/clio
# =========================== Options ====================================== #
option(verbose "Verbose build" FALSE)
option(tests "Build tests" FALSE)
option(tests "Build unit tests" FALSE)
option(integration_tests "Build integration tests" FALSE)
option(benchmark "Build benchmarks" FALSE)
option(docs "Generate doxygen docs" FALSE)
option(coverage "Build test coverage report" FALSE)
@@ -32,15 +33,6 @@ add_library(clio_options INTERFACE)
target_compile_features(clio_options INTERFACE cxx_std_23) # Clio needs c++23 but deps can remain c++20 for now
target_include_directories(clio_options INTERFACE ${CMAKE_SOURCE_DIR}/src)
# Set coverage build options
if (coverage)
if (NOT tests)
message(FATAL_ERROR "Coverage requires tests to be enabled")
endif ()
include(CodeCoverage)
append_coverage_compiler_flags_to_target(clio_options INTERFACE)
endif ()
if (verbose)
set(CMAKE_VERBOSE_MAKEFILE TRUE)
endif ()
@@ -65,10 +57,7 @@ include(deps/cassandra)
include(deps/libbacktrace)
add_subdirectory(src)
if (tests)
add_subdirectory(unittests)
endif ()
add_subdirectory(tests)
if (benchmark)
add_subdirectory(benchmarks)