diff options
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/acpi/CMakeLists.txt | 27 | ||||
| -rw-r--r-- | libs/kstd/CMakeLists.txt | 30 |
2 files changed, 4 insertions, 53 deletions
diff --git a/libs/acpi/CMakeLists.txt b/libs/acpi/CMakeLists.txt index 76941dcf..caffa1c9 100644 --- a/libs/acpi/CMakeLists.txt +++ b/libs/acpi/CMakeLists.txt @@ -56,6 +56,7 @@ set_target_properties("acpi" PROPERTIES if(BUILD_TESTING) find_package("Catch2") include("Catch") + include("BuildHostTests") find_program(IASL_EXE NAMES "iasl" REQUIRED) @@ -88,37 +89,13 @@ if(BUILD_TESTING) enable_coverage("acpi") endif() - add_executable("acpi_tests") - add_executable("acpi::tests" ALIAS "acpi_tests") + teachos_add_tests("acpi") target_sources("acpi_tests" PRIVATE - "acpi/common/table_header.tests.cpp" - "acpi/data/madt.tests.cpp" - "acpi/data/rsdt.tests.cpp" - "acpi/data/xsdt.tests.cpp" - "acpi/pointers.tests.cpp" - "acpi/test_data/tables.S" ) target_include_directories("acpi_tests" PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/test_data" ) - - target_link_libraries("acpi_tests" PRIVATE - "Catch2::Catch2WithMain" - "acpi::lib" - ) - - set_target_properties("acpi_tests" PROPERTIES - EXCLUDE_FROM_ALL NO - ) - - file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bht_results") - - catch_discover_tests("acpi::tests" - REPORTER junit - OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/bht_results" - OUTPUT_SUFFIX ".xml" - ) endif() diff --git a/libs/kstd/CMakeLists.txt b/libs/kstd/CMakeLists.txt index 2c63f87d..9c68feed 100644 --- a/libs/kstd/CMakeLists.txt +++ b/libs/kstd/CMakeLists.txt @@ -69,38 +69,12 @@ endif() if(BUILD_TESTING) find_package("Catch2") include("Catch") + include("BuildHostTests") - add_executable("kstd_tests") - add_executable("kstd::tests" ALIAS "kstd_tests") - - target_sources("kstd_tests" PRIVATE - "kstd/flat_map.tests.cpp" - "kstd/format.tests.cpp" - "kstd/vector.tests.cpp" - "kstd/bits/observer_ptr.tests.cpp" - "kstd/test_support/os_panic.tests.cpp" - "kstd/string.tests.cpp" - ) - - target_link_libraries("kstd_tests" PRIVATE - "Catch2::Catch2WithMain" - "kstd::lib" - ) - - set_target_properties("kstd_tests" PROPERTIES - EXCLUDE_FROM_ALL NO - ) + teachos_add_tests("kstd") if(COMMAND "enable_coverage") enable_coverage("kstd") enable_coverage("kstd_tests") endif() - - file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bht_results") - - catch_discover_tests("kstd::tests" - REPORTER junit - OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/bht_results" - OUTPUT_SUFFIX ".xml" - ) endif()
\ No newline at end of file |
