Skip to content

Conversation

@greenc-FNAL
Copy link
Contributor

Refactors the coverage.sh script to align its behavior, particularly for the Clang toolchain, with the CI coverage workflow.

Key changes:

  • Sets the LLVM_PROFILE_FILE environment variable during the test phase for Clang to ensure correct collection of raw profile data, mirroring the CI setup.
  • Changes the default preset from coverage-gcc to coverage-clang to match the CI standard.
  • Adds HTML report generation for the Clang toolchain, bringing it to feature parity with the GCC preset within the script.
  • Simplifies the logic for the Clang path by removing irrelevant and incorrect GCC-specific staleness checks.
  • Improves the argument parsing to be more robust and reliable.

Refactors the `coverage.sh` script to align its behavior, particularly for the Clang toolchain, with the CI coverage workflow.

Key changes:
- Sets the `LLVM_PROFILE_FILE` environment variable during the test phase for Clang to ensure correct collection of raw profile data, mirroring the CI setup.
- Changes the default preset from `coverage-gcc` to `coverage-clang` to match the CI standard.
- Adds HTML report generation for the Clang toolchain, bringing it to feature parity with the GCC preset within the script.
- Simplifies the logic for the Clang path by removing irrelevant and incorrect GCC-specific staleness checks.
- Improves the argument parsing to be more robust and reliable.
Copilot AI review requested due to automatic review settings December 18, 2025 20:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the coverage.sh script to align with the CI workflow by making Clang the default toolchain and ensuring proper LLVM profile data collection. The changes improve feature parity between GCC and Clang coverage presets while simplifying the Clang-specific logic.

Key changes:

  • Switches default preset from coverage-gcc to coverage-clang to match CI standards
  • Adds LLVM_PROFILE_FILE environment variable configuration during test execution for proper profile data collection
  • Implements HTML report generation for Clang preset, achieving feature parity with GCC

@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main     #209      +/-   ##
==========================================
+ Coverage   82.01%   82.13%   +0.12%     
==========================================
  Files         120      118       -2     
  Lines        2174     2211      +37     
  Branches      348      353       +5     
==========================================
+ Hits         1783     1816      +33     
- Misses        253      262       +9     
+ Partials      138      133       -5     
Flag Coverage Δ
unittests 82.13% <ø> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 11 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 57dcdf2...6ce264b. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@greenc-FNAL
Copy link
Contributor Author

@jules Please address the Copilot review. Additionally, please ensure that coverage.sh operates correctly (including upload) when LLVM is used, and ensure the help text explains how to invoke the script for GCC vs LLVM-generated coverage.

…rkflow.

- Implements support for uploading LLVM/Clang coverage reports to Codecov.
- Improves the help text to clarify the differences between the GCC and Clang workflows.
- Adds validation for the --preset flag.
- Changes the exit code to 1 when no commands are provided.
- Improves comments and file URL generation.
@greenc-FNAL
Copy link
Contributor Author

Closed in favor of #212.

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.

2 participants