Enable CTest code coverage for OpenMP/Eiger Debug CI - #597
Open
biddisco wants to merge 8 commits into
Open
Conversation
- 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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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