diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 36208067..ab573cac 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -105,9 +105,7 @@ jobs: if: success() || failure() with: name: test_sparrow_lib_report_Linux_${{ matrix.sys.compiler }}_${{ matrix.sys.version }}_${{ matrix.sys.stdlib }}_${{ matrix.config.name }}_date-polyfill_${{ matrix.sys.date-polyfill}} - path: | - build/test/test_sparrow_lib_report_doctest.xml - build/test/test_sparrow_lib_report_catch2.xml + path: ./**/test*.xml if-no-files-found: error - name: Run all examples diff --git a/.github/workflows/osx.yml b/.github/workflows/osx.yml index 608128ad..144572ed 100644 --- a/.github/workflows/osx.yml +++ b/.github/workflows/osx.yml @@ -100,9 +100,7 @@ jobs: if: success() || failure() with: name: test_sparrow_lib_report_OSX_${{ matrix.os }}_${{ matrix.config.name }}_${{ matrix.compiler }} - path: | - build/test/test_sparrow_lib_report_doctest.xml - build/test/test_sparrow_lib_report_catch2.xml + path: ./**/test*.xml if-no-files-found: error - name: Run all examples diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index b7a40177..8bf9a87e 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -124,7 +124,5 @@ jobs: if: success() || failure() with: name: test_sparrow_lib_report_Linux_${{matrix.target.distro}}_${{matrix.target.arch}}_${{matrix.config.name}}_date-polyfill_${{matrix.target.date-polyfill}} - path: | - build/test/test_sparrow_lib_report_doctest.xml - build/test/test_sparrow_lib_report_catch2.xml + path: ./**/test*.xml if-no-files-found: error diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 0abf393c..dc436782 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -189,9 +189,7 @@ jobs: if: success() || failure() with: name: test_sparrow_lib_report_Windows_${{ matrix.toolchain.compiler }}_${{ matrix.build-system.name }}_${{ matrix.config.name }}_${{ matrix.target-arch.name }}_date-polyfill_${{ matrix.toolchain.date-polyfill}} - path: | - build/test/test_sparrow_lib_report_doctest.xml - build/test/test_sparrow_lib_report_catch2.xml + path: ./**/test*.xml if-no-files-found: error - name: Tests coverage diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 7c417782..0f39302c 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -32,7 +32,7 @@ endif() if(NOT FETCH_DEPENDENCIES_WITH_CMAKE STREQUAL "ON") find_package(doctest ${FIND_PACKAGE_OPTIONS}) - find_package(Catch2 3 ${FIND_PACKAGE_OPTIONS}) + # find_package(Catch2 3 ${FIND_PACKAGE_OPTIONS}) find_package(nanoarrow ${FIND_PACKAGE_OPTIONS}) endif() @@ -54,18 +54,18 @@ if(FETCH_DEPENDENCIES_WITH_CMAKE STREQUAL "ON" OR FETCH_DEPENDENCIES_WITH_CMAKE FetchContent_MakeAvailable(doctest) endif() - if(NOT Catch2_FOUND) - message(STATUS "📦 Fetching Catch2 v3.7.1") - FetchContent_Declare( - Catch2 - GIT_SHALLOW TRUE - GIT_REPOSITORY https://github.com/catchorg/Catch2.git - GIT_TAG v3.7.1 - GIT_PROGRESS TRUE - SYSTEM - EXCLUDE_FROM_ALL) - FetchContent_MakeAvailable(Catch2) - endif() + # if(NOT Catch2_FOUND) + # message(STATUS "📦 Fetching Catch2 v3.7.1") + # FetchContent_Declare( + # Catch2 + # GIT_SHALLOW TRUE + # GIT_REPOSITORY https://github.com/catchorg/Catch2.git + # GIT_TAG v3.7.1 + # GIT_PROGRESS TRUE + # SYSTEM + # EXCLUDE_FROM_ALL) + # FetchContent_MakeAvailable(Catch2) + # endif() if(NOT nanoarrow_FOUND) message(STATUS "📦 Fetching nanoarrow 0.6") @@ -166,17 +166,17 @@ target_link_libraries(${test_target} nanoarrow::nanoarrow $<$:${SANITIZER_LINK_LIBRARIES}>) -set(test_target_catch2 "test_sparrow_lib_catch2") +# set(test_target_catch2 "test_sparrow_lib_catch2") -add_executable(${test_target_catch2}) -target_link_libraries(${test_target_catch2} - PRIVATE - sparrow - Catch2::Catch2WithMain - $<$:${SANITIZER_LINK_LIBRARIES}>) +# add_executable(${test_target_catch2}) +# target_link_libraries(${test_target_catch2} +# PRIVATE +# sparrow +# Catch2::Catch2WithMain +# $<$:${SANITIZER_LINK_LIBRARIES}>) -include(Catch) -catch_discover_tests(${test_target_catch2}) +# include(Catch) +# catch_discover_tests(${test_target_catch2}) if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") set(compiles_options @@ -277,22 +277,24 @@ endif() set_target_properties(${test_target} PROPERTIES CMAKE_CXX_EXTENSIONS OFF) target_compile_features(${test_target} PRIVATE cxx_std_20) -target_compile_options(${test_target_catch2} - PRIVATE - ${compiles_options} - $<$:${SANITIZER_COMPILE_OPTIONS}> - ) -target_link_options(${test_target_catch2} - PRIVATE - $<$:${SANITIZER_LINK_OPTIONS}>) +# target_compile_options(${test_target_catch2} +# PRIVATE +# ${compiles_options} +# $<$:${SANITIZER_COMPILE_OPTIONS}> +# ) +# target_link_options(${test_target_catch2} +# PRIVATE +# $<$:${SANITIZER_LINK_OPTIONS}>) # We do not use non-standard C++ -set_target_properties(${test_target_catch2} PROPERTIES CMAKE_CXX_EXTENSIONS OFF) -target_compile_features(${test_target_catch2} PRIVATE cxx_std_20) +# set_target_properties(${test_target_catch2} PROPERTIES CMAKE_CXX_EXTENSIONS OFF) +# target_compile_features(${test_target_catch2} PRIVATE cxx_std_20) add_custom_target(run_tests COMMAND ${test_target} - COMMAND ${test_target_catch2} -v high - DEPENDS ${test_target} ${test_target_catch2} + # COMMAND ${test_target_catch2} -v high + DEPENDS + ${test_target} + # ${test_target_catch2} COMMENT "Running tests for Doctest and Catch2" USES_TERMINAL ) @@ -304,8 +306,10 @@ set(JUNIT_REPORT_FILE_CATCH2 ${CMAKE_CURRENT_BINARY_DIR}/test_sparrow_lib_report add_custom_target(run_tests_with_junit_report COMMAND ${test_target} --reporters=better_junit --out=${JUNIT_REPORT_FILE_DOCTEST} --no-path-filenames=true - COMMAND ${test_target_catch2} --reporter JUnit -o ${JUNIT_REPORT_FILE_CATCH2} - DEPENDS ${test_target} ${test_target_catch2} + # COMMAND ${test_target_catch2} --reporter JUnit -o ${JUNIT_REPORT_FILE_CATCH2} + DEPENDS + ${test_target} + # ${test_target_catch2} COMMENT "Running tests with JUnit reports saved to: ${JUNIT_REPORT_FILE_DOCTEST} and ${JUNIT_REPORT_FILE_CATCH2}" USES_TERMINAL )