Skip to content

Commit

Permalink
fix: exclude TestMultithreading from gcovr
Browse files Browse the repository at this point in the history
  • Loading branch information
c-dilks committed Sep 26, 2024
1 parent 8fbd4ec commit 1c06918
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -417,12 +417,8 @@ jobs:
- name: coverage
if: ${{ matrix.id == 'coverage' }}
run: |
meson configure iguana_build -Dtest_multithreading=1 # workaround gcovr issue in `TestMultithreading.h` when num_threads!=1
ninja clean
ninja
ninja -C iguana_build coverage-html
ninja -C iguana_build coverage-text
meson configure iguana_build -Dtest_multithreading=${{ env.num_threads }} # revert the above workaround
mv iguana_build/meson-logs/coveragereport coverage-report
echo '### Coverage Report' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
Expand Down
4 changes: 3 additions & 1 deletion src/iguana/tests/include/TestMultithreading.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ inline int TestMultithreading(
bool const verbose)
{

// GCOVR_EXCL_START

iguana::Logger log("test", verbose ? iguana::Logger::Level::trace : iguana::Logger::Level::info);

// check arguments
Expand Down Expand Up @@ -155,5 +157,5 @@ inline int TestMultithreading(

// run
stream.run(ftn, num_threads);
return 0;
return 0; // GCOVR_EXCL_STOP
}

0 comments on commit 1c06918

Please sign in to comment.