Skip to content

Commit 6b8d000

Browse files
committed
Enable test coverage reporting in Windows CI builds
Squashed commit of the following: commit 9c4a820 Merge: 44cf126 832befa Author: Paul Colby <git@colby.id.au> Date: Mon Oct 14 18:05:37 2024 +1100 Merge branch 'main' into windows-coverage commit 44cf126 Author: Paul Colby <git@colby.id.au> Date: Mon Oct 14 18:04:22 2024 +1100 Convert line endings from DOS to Unix commit 516ba8c Author: Paul Colby <git@colby.id.au> Date: Mon Oct 14 18:00:00 2024 +1100 Update source code paths from Windows tracefiles to match Linux. commit 40fc34b Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:57:41 2024 +1100 Reinstate Linux and macOS builds commit ce8986d Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:53:07 2024 +1100 Reinstate the other Windows CI builds commit 97077c9 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:51:50 2024 +1100 Escape `\` chars commit 349e2dc Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:49:25 2024 +1100 Clean-up the coverage.info file commit 6fc37fe Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:47:33 2024 +1100 Upload test artifacts if they exist commit 8ca602c Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:47:12 2024 +1100 Build, and test, separate coverage and release configs commit f2c2f8a Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:44:21 2024 +1100 A litte more tidy-up commit 53c6bc6 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:39:44 2024 +1100 Is the order important? commit 956e2ad Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:39:42 2024 +1100 CMake should detect lcov fine Since we're forced to add lcov's bin dir to the path anyway. commit fccb73a Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:37:50 2024 +1100 Tidy up a little commit 7ee5376 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:37:46 2024 +1100 Validate path assumption commit e7cd26d Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:35:04 2024 +1100 Bring the C:\msys64\usr\bin path back commit 93b28b1 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:32:28 2024 +1100 Skip version for now commit df43c64 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:31:13 2024 +1100 Provide full path to pacman If we're not adding it to the path. commit a87cbd9 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:31:09 2024 +1100 Formalise the building of the path variable commit 791229c Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:30:07 2024 +1100 Use correct path separators commit 1e700ef Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:26:23 2024 +1100 Get lcov version under Bash commit 8da6ab9 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:26:10 2024 +1100 Avoid polluting the path with msys2's mingw64 bin It's only needed (hopefully) for lcov. Though might be necessary for lcov to find geninfo? commit b7bb11a Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:21:59 2024 +1100 Use GH's mingw32 commit 68a3336 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:21:42 2024 +1100 See what else exists at the root commit 61138b2 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:17:06 2024 +1100 Correct path to non-Qt gcov commit d42f285 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:12:19 2024 +1100 Fetch the version commit 78cd274 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:11:23 2024 +1100 Explore where gcov.exe really is installed commit e44ee07 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:08:47 2024 +1100 Add missing `<var>:<type>` separator commit 8ff307a Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:07:17 2024 +1100 Drop the erroneous .exe extension commit 60e25fe Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:05:39 2024 +1100 Correct the path to msys gcov commit 049fb84 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 23:02:07 2024 +1100 Override gcov for x86 (32-bit) only commit 3b0acf6 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 22:58:09 2024 +1100 Correct matrix variable name commit ab43aba Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 22:57:39 2024 +1100 Correct Workflow variable name commit dcd8cee Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 22:53:08 2024 +1100 Choose between two gcov's commit fe6a4f0 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 22:48:20 2024 +1100 Always use msys2's gcov Just for an initial test. commit cf1a046 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 22:46:36 2024 +1100 Override gcov on 32-bit systems commit 3f87d92 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 22:43:10 2024 +1100 Disable all non-mingw builds for now commit 5fd8a71 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 22:40:22 2024 +1100 Specify the gcov tool commit 7825dad Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 22:35:38 2024 +1100 Try using Bash commit 37be7bb Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 22:30:06 2024 +1100 Use the right env syntax commit 422bdc8 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 22:19:56 2024 +1100 Let's see if Bash is any better commit f92f35b Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 22:15:03 2024 +1100 See where it installed commit 051bfc7 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 22:11:49 2024 +1100 Try the full path commit 0d33590 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 22:09:59 2024 +1100 Correct path commit d8e9ee4 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 22:07:19 2024 +1100 Remove erroneous quote commit 27e75ab Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 22:06:11 2024 +1100 Unrwap syntax commit 15534d6 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 22:04:19 2024 +1100 Include both bin dirs commit bc18773 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 21:59:50 2024 +1100 Let's look at the path commit c728246 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 21:58:20 2024 +1100 Correct Bash syntax commit 439e927 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 21:57:06 2024 +1100 Use Bash to set the path properly commit a4855b2 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 21:43:34 2024 +1100 Try running lcov directly commit 82ca206 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 21:21:37 2024 +1100 Quotes are getting in the way commit 4f29eca Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 21:14:59 2024 +1100 Use the correct quotes for Windows cmd commit f280868 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 21:06:49 2024 +1100 Print the path in a step that actually runs ;) commit 19c12e3 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 21:02:12 2024 +1100 Revert to GH's MSYS2 commit bb4e852 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 20:55:16 2024 +1100 See which, if not both, is not found commit 3025521 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 20:48:27 2024 +1100 Use msys2/setup-msys2@v2 action commit 8f2836e Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 20:38:08 2024 +1100 Add msys to the path commit 1b8173f Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 20:10:09 2024 +1100 Look for geninfo in msys commit ea0cbfe Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 19:57:14 2024 +1100 Have a look for geninfo commit befae39 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 19:45:27 2024 +1100 Set the gcov path commit 35b372a Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 19:16:06 2024 +1100 Revert some temp changes commit 2d8ea71 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 18:44:57 2024 +1100 Switch back to Bash commit dc5bf99 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 18:37:40 2024 +1100 Try the msys2 shell commit ae7ec73 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 18:29:38 2024 +1100 Try 'regular' bash commit e474fec Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 18:19:51 2024 +1100 Try the msys2 shell commit fb1146f Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 18:12:50 2024 +1100 Try out a more explicit dir commit 73ddf7f Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 17:48:24 2024 +1100 Get some verbose output from the coverage step commit d1bddce Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 17:39:52 2024 +1100 Use the right running dir commit 70295e4 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 17:31:38 2024 +1100 Correct variable access commit 2b2d903 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 17:27:25 2024 +1100 See if gcda files were generated commit a9f84ec Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 17:22:12 2024 +1100 Only enable test coverage for non-MSVC chains commit d694df0 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 17:11:49 2024 +1100 Tell CMake when the msys lcov is commit 404c4d7 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 17:03:16 2024 +1100 Find the installed lcov commit 04a7cc1 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 16:57:25 2024 +1100 Skip the confirm prompt commit d93a49c Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 16:52:11 2024 +1100 Install lcov commit 16d8661 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 16:46:13 2024 +1100 Use path to pacman commit 264eaf8 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 16:32:20 2024 +1100 Look for lcov packages commit 25db4a3 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 16:13:12 2024 +1100 Verify if gcov is really in the path commit 4a747f9 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 15:37:11 2024 +1100 Use Windows style path separators commit 4e211bb Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 15:30:50 2024 +1100 Check *after* Qt is installed commit 9310c73 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 15:28:06 2024 +1100 Look for gcov in Qt's MinGW commit 1711c4e Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 15:12:50 2024 +1100 Bypass `dir` temporarily commit dd896de Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 15:09:23 2024 +1100 Look for `.exe` versions too commit 0663d07 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 14:43:47 2024 +1100 Use the correct command commit 907ed38 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 14:41:58 2024 +1100 Correct Windows cmd syntax commit c0bdd85 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 14:19:15 2024 +1100 Look for lcov commit 3233381 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 14:01:34 2024 +1100 Correct Windows `cmd` syntax commit 057d295 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 13:53:20 2024 +1100 Try collating test coverage Knowing full well it will fail for MSVC builds. commit bf341b5 Author: Paul Colby <git@colby.id.au> Date: Sun Oct 13 13:07:55 2024 +1100 Experiment with enabling coverage on Windows (this will fail... at least initially)
1 parent 832befa commit 6b8d000

File tree

2 files changed

+72
-18
lines changed

2 files changed

+72
-18
lines changed

.github/workflows/build.yaml

Lines changed: 63 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,6 @@ jobs:
462462
# { toolchain: 'llvm', generator: 'MinGW Makefiles', dll: libQtPokit.dll } \todo See temp exclusion above.
463463
- { toolchain: 'mingw', generator: 'MinGW Makefiles', dll: libQtPokit.dll }
464464
- { toolchain: 'msvc', generator: 'NMake Makefiles', dll: QtPokit.dll }
465-
# Optional additional tools to be installed by aqtinstall (via install-qt-action).
466-
- { toolchain: 'mingw', arch: x86, aqtTools: 'tools_mingw,qt.tools.win32_mingw810' }
467465
# Use Qt-provided 64-bit MinGW for recent Qt's (defaulting to GitHub's 12.2.0 version for older Qt versions).
468466
- { toolchain: 'mingw', arch: x86-64, qt: '5.14.2', aqtTools: 'tools_mingw1310' }
469467
- { toolchain: 'mingw', arch: x86-64, qt: '5.15.2', aqtTools: 'tools_mingw1310' }
@@ -473,6 +471,21 @@ jobs:
473471
- { toolchain: 'mingw', arch: x86-64, qt: '6.7.3', aqtTools: 'tools_mingw1310' }
474472
- { toolchain: 'mingw', arch: x86-64, qt: '6.8.0', aqtTools: 'tools_mingw1310' }
475473
steps:
474+
- name: Configure path
475+
if: matrix.toolchain != 'msvc'
476+
shell: bash
477+
run: |
478+
# Paths needed for MSYS2's LCOV to function properly. Note, its important that we add the mingw64 one here
479+
# before any later mingw installs (including those from install-qt-action) or this would interfere with those.
480+
tee -a "$GITHUB_PATH" <<< 'C:\msys64\usr\bin' # Else geninfo will fail to find .gcda files (not sure why).
481+
tee -a "$GITHUB_PATH" <<< 'C:\msys64\mingw64\bin' # Else lcov will fail to find its own geninfo command.
482+
# For 32-bit (x86) MinGW builds, place GitHub's mingw32 at the head of the path (install-qt-actions would
483+
# supersede this below, but we never install (32-bit) mingw32 via install-qt-actions, so not an issue).
484+
[[ '${{ matrix.toolchain }}' != 'mingw' || '${{ matrix.arch }}' != 'x86' ]] ||
485+
tee -a "$GITHUB_PATH" <<< 'C:\mingw32\bin'
486+
- name: Install LCOV
487+
if: matrix.toolchain != 'msvc'
488+
run: pacman --sync --noconfirm --verbose mingw-w64-x86_64-lcov
476489
- uses: actions/checkout@v4
477490
- name: Install host Qt for cross-compilation
478491
if: matrix.arch == 'arm64'
@@ -520,58 +533,88 @@ jobs:
520533
with:
521534
arch: ${{ matrix.msvcArch }}
522535
toolset: ${{ startsWith(matrix.qt, '5') && '14.29' || '' }} # MSVC 14.38+ has many deprecation issues w/ Qt5.
523-
- name: Build
536+
- name: Build w/ coverage instrumentation
537+
if: matrix.toolchain != 'msvc'
538+
env:
539+
CMAKE_MESSAGE_LOG_LEVEL: VERBOSE
540+
PROJECT_BUILD_ID: ${{ github.run_number }}.win.${{ matrix.arch }}.${{ matrix.toolchain }}.qt-${{ matrix.qt }}
541+
run: |
542+
cmake -D CMAKE_BUILD_TYPE=Release ^
543+
-D ENABLE_COVERAGE=true ^
544+
-D QT_HOST_PATH=%qtHostPath% ^
545+
-D QT_INSTALL_DOCS=%RUNNER_WORKSPACE%\Qt\Docs\Qt-${{ matrix.qt }} ^
546+
-G "${{ matrix.generator }}" -S "%GITHUB_WORKSPACE%" -B "%RUNNER_TEMP%/coverage"
547+
cmake --build "%RUNNER_TEMP%/coverage" --verbose
548+
- name: Build w/o coverage instrumentation
524549
env:
550+
CMAKE_MESSAGE_LOG_LEVEL: VERBOSE
525551
PROJECT_BUILD_ID: ${{ github.run_number }}.win.${{ matrix.arch }}.${{ matrix.toolchain }}.qt-${{ matrix.qt }}
526552
run: |
527553
cmake -D CMAKE_BUILD_TYPE=Release ^
554+
-D ENABLE_COVERAGE=false ^
528555
-D QT_HOST_PATH=%qtHostPath% ^
529556
-D QT_INSTALL_DOCS=%RUNNER_WORKSPACE%\Qt\Docs\Qt-${{ matrix.qt }} ^
530-
-G "${{ matrix.generator }}" -S "%GITHUB_WORKSPACE%" -B "%RUNNER_TEMP%"
531-
cmake --build "%RUNNER_TEMP%" --verbose
557+
-G "${{ matrix.generator }}" -S "%GITHUB_WORKSPACE%" -B "%RUNNER_TEMP%/release"
558+
cmake --build "%RUNNER_TEMP%/release" --verbose
532559
- name: Capture build-output variables
533560
id: post-build
534561
shell: bash
535562
run: |
536-
echo "dokitVersion=$(cat "$RUNNER_TEMP/version.txt")" | tee -a "$GITHUB_OUTPUT"
563+
echo "dokitVersion=$(cat "$RUNNER_TEMP/release/version.txt")" | tee -a "$GITHUB_OUTPUT"
537564
{ echo -n 'tap='; [[ '${{ matrix.qt }}' =~ ^5\.1[2-9]|6 ]] && echo true || echo false; } |
538565
tee -a "$GITHUB_OUTPUT"
539-
- name: Install DLL for tests
566+
- name: Install DLL for tests w/ coverage
567+
if: matrix.toolchain != 'msvc'
540568
run: |
541569
copy /v /b src\lib\${{ matrix.dll }} /b test\unit\cli
542570
copy /v /b src\lib\${{ matrix.dll }} /b test\unit\lib
543-
working-directory: ${{ runner.temp }}
544-
- name: Test # We can't execute arm64 binaries on an x86-64 host.
571+
working-directory: ${{ runner.temp }}/coverage
572+
- name: Install DLL for tests w/o coverage
573+
run: |
574+
copy /v /b src\lib\${{ matrix.dll }} /b test\unit\cli
575+
copy /v /b src\lib\${{ matrix.dll }} /b test\unit\lib
576+
working-directory: ${{ runner.temp }}/release
577+
- name: Test w/ coverage # We can't execute arm64 binaries on an x86-64 host.
578+
if: matrix.arch != 'arm64' && matrix.toolchain != 'msvc'
579+
run: ctest --output-on-failure --test-dir "%RUNNER_TEMP%/coverage" --verbose
580+
- name: Test w/o coverage # We can't execute arm64 binaries on an x86-64 host.
545581
if: matrix.arch != 'arm64'
546-
run: ctest --output-on-failure --test-dir "%RUNNER_TEMP%" --verbose
582+
run: ctest --output-on-failure --test-dir "%RUNNER_TEMP%/release" --verbose
583+
- name: Collate test coverage
584+
if: matrix.toolchain != 'msvc'
585+
run: cmake --build "%RUNNER_TEMP%/coverage" --target coverage --verbose
547586
- name: Upload test results
548-
if: matrix.arch != 'arm64' && fromJSON(steps.post-build.outputs.tap)
587+
if: matrix.arch != 'arm64' && ( matrix.toolchain != 'msvc' || fromJSON(steps.post-build.outputs.tap) )
549588
uses: actions/upload-artifact@v4
550589
with:
551590
name: test-results-${{ steps.post-build.outputs.dokitVersion }}
552-
path: ${{ runner.temp }}/test/**/*.tap
591+
path: |
592+
${{ runner.temp }}/coverage/coverage.info
593+
${{ runner.temp }}/coverage/removeHtmlDates.sh
594+
${{ runner.temp }}/coverage/test/**/*.tap
595+
${{ runner.temp }}/release/test/**/*.tap
553596
if-no-files-found: error
554597
- name: Make portable
555598
if: matrix.arch != 'arm64'
556-
run: cmake --build "%RUNNER_TEMP%" --target cli-portable
599+
run: cmake --build "%RUNNER_TEMP%/release" --target cli-portable
557600
- name: Check portable version
558601
if: matrix.arch != 'arm64'
559602
shell: bash
560-
run: '"$RUNNER_TEMP/portable/dokit.exe" --version'
603+
run: '"$RUNNER_TEMP/release/portable/dokit.exe" --version'
561604
- name: Upload artifacts
562605
uses: actions/upload-artifact@v4
563606
with:
564607
name: dokit-${{ steps.post-build.outputs.dokitVersion }}
565608
path: |
566-
${{ runner.temp }}/src/lib/${{ matrix.dll }}
567-
${{ runner.temp }}/src/cli/dokit.exe
609+
${{ runner.temp }}/release/src/lib/${{ matrix.dll }}
610+
${{ runner.temp }}/release/src/cli/dokit.exe
568611
if-no-files-found: error
569612
- name: Upload artifacts (portable)
570613
if: matrix.arch != 'arm64'
571614
uses: actions/upload-artifact@v4
572615
with:
573616
name: dokit-${{ steps.post-build.outputs.dokitVersion }}.portable
574-
path: ${{ runner.temp }}/portable
617+
path: ${{ runner.temp }}/release/portable
575618
if-no-files-found: error
576619

577620
collate-test-results:
@@ -597,7 +640,9 @@ jobs:
597640
run: |
598641
shopt -s globstar
599642
# Update source code paths from macOS tracefiles to match Linux.
600-
sed -i -Ee 's|^SF:/Users|SF:/home|' artifacts/**/coverage.info
643+
sed -i -Ee 's|^SF:/Users|SF:/home|' artifacts/*.macos-*/**/coverage.info
644+
# Update source code paths from Windows tracefiles to match Linux, and remove all \r chars from line endings.
645+
sed -i -Ee 's|\r$||' -e 's|\\|/|g' -e 's|^SF:D:/a|SF:/home/runner/work|' artifacts/*.win.*/**/coverage.info
601646
# Combine all tracefiles into one.
602647
lcov $(find artifacts -name '*.info' -type f -printf '-a %p\n') -o coverage.info
603648
# Generate the HTML report.

test/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ if (ENABLE_COVERAGE AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
5151
coverage
5252
COMMAND ${CODECOV_LCOV} --capture --directory . --gcov-tool ${CODECOV_GCOV} --output-file coverage.info
5353
COMMAND ${CODECOV_LCOV} --list coverage.info
54+
# Linux/macOS
5455
COMMAND ${CODECOV_LCOV} --ignore-errors unused --remove coverage.info /usr/* --output-file coverage.info
5556
COMMAND ${CODECOV_LCOV} --ignore-errors unused --remove coverage.info */.qt/* --output-file coverage.info
5657
COMMAND ${CODECOV_LCOV} --ignore-errors unused --remove coverage.info */.rcc/* --output-file coverage.info
@@ -59,6 +60,14 @@ if (ENABLE_COVERAGE AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
5960
COMMAND ${CODECOV_LCOV} --ignore-errors unused --remove coverage.info */qt/* --output-file coverage.info
6061
COMMAND ${CODECOV_LCOV} --ignore-errors unused --remove coverage.info */Qt/* --output-file coverage.info
6162
COMMAND ${CODECOV_LCOV} --ignore-errors unused --remove coverage.info */test/* --output-file coverage.info
63+
# Windows
64+
COMMAND ${CODECOV_LCOV} --ignore-errors unused --remove coverage.info *:\\mingw32\\* --output-file coverage.info
65+
COMMAND ${CODECOV_LCOV} --ignore-errors unused --remove coverage.info *:\\mingw64\\* --output-file coverage.info
66+
COMMAND ${CODECOV_LCOV} --ignore-errors unused --remove coverage.info *\\.qt\\* --output-file coverage.info
67+
COMMAND ${CODECOV_LCOV} --ignore-errors unused --remove coverage.info *\\.rcc\\* --output-file coverage.info
68+
COMMAND ${CODECOV_LCOV} --ignore-errors unused --remove coverage.info *\\moc_*.cpp --output-file coverage.info
69+
COMMAND ${CODECOV_LCOV} --ignore-errors unused --remove coverage.info *\\Qt\\* --output-file coverage.info
70+
COMMAND ${CODECOV_LCOV} --ignore-errors unused --remove coverage.info *\\test\\* --output-file coverage.info
6271
COMMAND ${CODECOV_LCOV} --list coverage.info
6372
COMMENT "Collating coverage data"
6473
VERBATIM

0 commit comments

Comments
 (0)