From fdc513e9043316157564471c4f20614ce96b7507 Mon Sep 17 00:00:00 2001 From: Krzysiek Karbowiak Date: Tue, 25 Feb 2025 22:03:19 +0100 Subject: [PATCH 1/4] Cleanup: rename build target --- test/unittest/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unittest/CMakeLists.txt b/test/unittest/CMakeLists.txt index b8763787..8e588fbf 100644 --- a/test/unittest/CMakeLists.txt +++ b/test/unittest/CMakeLists.txt @@ -32,7 +32,7 @@ target_compile_options(unittest PRIVATE /W4 /WX /permissive->) target_link_options(unittest PRIVATE $ENV{LINKER_OPTIONS}) -add_test(NAME unittest COMMAND unittest) +add_test(NAME unit-test COMMAND unittest) add_custom_target(run_unit_test ALL COMMAND ${CMAKE_CTEST_COMMAND} -C debug --output-on-failure DEPENDS unittest) From fd6b1042cb354f4d71b2a78e8e25f5b6cd35306c Mon Sep 17 00:00:00 2001 From: Krzysiek Karbowiak Date: Tue, 25 Feb 2025 22:03:32 +0100 Subject: [PATCH 2/4] Cleanup: rename build target --- test/unittest/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unittest/CMakeLists.txt b/test/unittest/CMakeLists.txt index 8e588fbf..844e2a97 100644 --- a/test/unittest/CMakeLists.txt +++ b/test/unittest/CMakeLists.txt @@ -33,6 +33,6 @@ target_compile_options(unittest PRIVATE target_link_options(unittest PRIVATE $ENV{LINKER_OPTIONS}) add_test(NAME unit-test COMMAND unittest) -add_custom_target(run_unit_test ALL +add_custom_target(run-unit-test ALL COMMAND ${CMAKE_CTEST_COMMAND} -C debug --output-on-failure DEPENDS unittest) From 97c9b4a681cd67f7d285a03f33577f4f824b7d7e Mon Sep 17 00:00:00 2001 From: Krzysiek Karbowiak Date: Tue, 25 Feb 2025 22:03:37 +0100 Subject: [PATCH 3/4] Cleanup: rename build target --- test/exit/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/exit/CMakeLists.txt b/test/exit/CMakeLists.txt index 65882d80..158cd9fe 100644 --- a/test/exit/CMakeLists.txt +++ b/test/exit/CMakeLists.txt @@ -28,6 +28,6 @@ set_property(TEST error-test-1 PROPERTY WILL_FAIL true) add_test(NAME error-test-2 COMMAND app) set_property(TEST error-test-2 PROPERTY PASS_REGULAR_EXPRESSION "the following arguments are required: positional\nusage: app \\[-h\\] \\[--optional OPTIONAL\\] \\[-v\\] positional\n\npositional arguments:\n positional\n\noptional arguments:\n -h, --help show this help message and exit\n --optional OPTIONAL\n -v, --version show program's version number and exit\n") -add_custom_target(run_exit_test ALL +add_custom_target(run-exit-test ALL COMMAND ${CMAKE_CTEST_COMMAND} -C debug --output-on-failure DEPENDS app) From fd206e2289ed63755daec3ae8ff4ec5ff53f7bce Mon Sep 17 00:00:00 2001 From: Krzysiek Karbowiak Date: Tue, 25 Feb 2025 22:05:55 +0100 Subject: [PATCH 4/4] Fix CI --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ba2bfce..1f5f1291 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,7 +73,7 @@ jobs: run: cmake -Bbuild -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS=-fsanitize=address,undefined,alignment,array-bounds -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address,undefined,alignment,array-bounds - name: CMake build - run: cmake --build build --parallel --target run_unit_test + run: cmake --build build --parallel --target run-unit-test valgrind: name: "Valgrind" @@ -112,7 +112,7 @@ jobs: run: cmake -Bbuild -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CXX_FLAGS=--coverage -DCMAKE_EXE_LINKER_FLAGS=--coverage - name: CMake build - run: cmake --build build --parallel --target run_unit_test + run: cmake --build build --parallel --target run-unit-test - name: Generate coverage run: |