Skip to content

Enable CTest code coverage for OpenMP/Eiger Debug CI - #597

Open
biddisco wants to merge 8 commits into
masterfrom
cmake-alps
Open

Enable CTest code coverage for OpenMP/Eiger Debug CI#597
biddisco wants to merge 8 commits into
masterfrom
cmake-alps

Conversation

@biddisco

@biddisco biddisco commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator
  • Add IPPL_ENABLE_COVERAGE forwarding in dashboard-configure-build.cmake

  • Run ctest_coverage() before ctest_submit() in dashboard-test.cmake

  • Improve CompilerOptions.cmake coverage handling with warnings and GCC -fprofile-abs-path

  • Add CTestCustom.cmake to exclude tests/external deps from coverage

  • Enable coverage on the existing OpenMP Debug build and 1-rank test jobs

  • Document coverage in ci/cscs/cscs-ci-cd.md

- Add IPPL_ENABLE_COVERAGE forwarding in dashboard-configure-build.cmake

- Run ctest_coverage() before ctest_submit() in dashboard-test.cmake

- Improve CompilerOptions.cmake coverage handling with warnings and GCC -fprofile-abs-path

- Add CTestCustom.cmake to exclude tests/external deps from coverage

- Enable coverage on the existing OpenMP Debug build and 1-rank test jobs

- Document coverage in ci/cscs/cscs-ci-cd.md
@biddisco

biddisco commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

cscs-ci run cscs-ci-openmp, cscs-ci-mi300, cscs-ci-gh200

The ENABLE_COVERAGE CI variable was set on the OpenMP debug build/test jobs,
but it was not passed to the ctest -S dashboard scripts.
Forward it so that IPPL_ENABLE_COVERAGE is actually enabled and ctest_coverage() runs.

Also add status messages so the coverage step is visible in the CI logs.
The OpenMP debug build is produced in one CI job and the tests run in
another. gcov stores the absolute build path in the instrumented
binaries, so .gcda files were being written to the build job's
directory (which does not exist on the test runner) instead of the test
job's build directory.

- Remove -fprofile-abs-path so gcov uses relative paths for
  .gcno/.gcda lookup.

- Set GCOV_PREFIX and GCOV_PREFIX_STRIP in dashboard-test.cmake
  before ctest_test() so .gcda files are redirected into the current
  test job's build tree.
Coverage instrumentation adds runtime overhead, causing tests that
were close to the 60s limit to time out on OpenMP/Eiger. Make the
per-test timeout configurable and set it to 120s only for the debug
1-rank coverage job.
- Add a symlink from the original build-job source directory to the
  test-job source directory before running OpenMP tests. This resolves
  both the missing source files and the misplaced .gcda files caused
  by absolute paths baked into the coverage instrumented binaries.

- Remove the GCOV_PREFIX redirection; the symlink handles the path
  mismatch without relying on srun/wrapper environment forwarding.

- Raise IPPL_DEFAULT_TEST_TIMEOUT to 120s for coverage builds, since
  the ctest --timeout flag does not override per-test TIMEOUT
  properties set at configure time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant