From 71dcd9d68eab623a88d1437de9133aee07e75f91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 1 Jun 2026 18:57:51 +0200 Subject: [PATCH] package/ci: exclude destructor declarations from clang-cl code coverage. This was already done in Magnum Extras, but because here the code coverage is not 99.99% I never actually saw these. Until now, where both Text::AbstractShaper and Text::AbstractGlyphCache report destructor *declaration* as uncovered. Destructor definition is covered, obviously, so reporting this as uncovered is wrong. --- package/ci/appveyor-desktop.bat | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package/ci/appveyor-desktop.bat b/package/ci/appveyor-desktop.bat index df695fa2a..89c12fb5e 100644 --- a/package/ci/appveyor-desktop.bat +++ b/package/ci/appveyor-desktop.bat @@ -91,8 +91,9 @@ rem Gather and upload coverage on the clang-cl MSVC 2022 build. Keep in sync rem with circleci.yml, appveyor-desktop-mingw.bat and PKBUILD-coverage, please. rem rem Additionally, Clang-cl often reports empty lines containing just } as -rem uncovered, possibly due to exception handling, similarly to MinGW. Exclude -rem them, and feel free to expand the regex to catch more cases if needed. +rem uncovered, possibly due to exception handling, similarly to MinGW, and same +rem for both virtual and non-virtual destructor declarations. Exclude them, and +rem feel free to expand the regex to catch more cases if needed. rem rem Also, partially due to the above, where, if a code isn't run through at rem all, a lot more uncovered lines is reported compared to Linux / Mac, the @@ -102,7 +103,7 @@ rem possible without an actual GL/Vk driver, but the false negatives far rem outweigh the benefits of having Windows-specific coverage reported for rem those -- there isn't any Windows-specific code for most of them, after all rem -- that it's not worth including them. -if "%COMPILER%" == "msvc-clang" if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2022" grcov build -t lcov --keep-only "*/src/Magnum*/*" --ignore "*/src/MagnumExternal/*" --ignore "*/Test/*" --ignore "*/build/src/*" --ignore "*/src/Magnum/GL/*" --ignore "*/src/Magnum/Vk/*" --ignore "*/src/Magnum/Platform/*" --ignore "*GL.cpp" --ignore "*GL.h" --ignore "*Vk.cpp" --ignore "*Vk.h" -o coverage.info --excl-line "(LCOV_EXCL_LINE|^\s*}$)" --excl-start LCOV_EXCL_START --excl-stop LCOV_EXCL_STOP || exit /b +if "%COMPILER%" == "msvc-clang" if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2022" grcov build -t lcov --keep-only "*/src/Magnum*/*" --ignore "*/src/MagnumExternal/*" --ignore "*/Test/*" --ignore "*/build/src/*" --ignore "*/src/Magnum/GL/*" --ignore "*/src/Magnum/Vk/*" --ignore "*/src/Magnum/Platform/*" --ignore "*GL.cpp" --ignore "*GL.h" --ignore "*Vk.cpp" --ignore "*Vk.h" -o coverage.info --excl-line "(LCOV_EXCL_LINE|^\s*}$|^\s+(virtual )?~[a-zA-Z0-9]+\(\);$)" --excl-start LCOV_EXCL_START --excl-stop LCOV_EXCL_STOP || exit /b rem Official docs say "not needed for public repos", in reality not using the rem token is "extremely flakey". What's best is that if the upload fails, the rem damn thing exits with a success error code, and nobody cares: