Skip to content

fix: code coverage ci task#8142

Merged
0ax1 merged 1 commit into
developfrom
fix-coverage-llvm-tools-check
May 28, 2026
Merged

fix: code coverage ci task#8142
0ax1 merged 1 commit into
developfrom
fix-coverage-llvm-tools-check

Conversation

@0ax1
Copy link
Copy Markdown
Contributor

@0ax1 0ax1 commented May 28, 2026

The installed LLVM tools reside under

RUST_SYSROOT="$(rustc --print sysroot)"
RUST_HOST="$(rustc --print host-tuple)"
LLVM_TOOLS_BIN="${RUST_SYSROOT}/lib/rustlib/${RUST_HOST}/bin"

which is different from what we previously expected.

Further, splitting up the commands like

RUST_SYSROOT="$(rustc +$NIGHTLY_TOOLCHAIN --print sysroot)"
RUST_HOST="$(rustc +$NIGHTLY_TOOLCHAIN --print host-tuple)"
LLVM_TOOLS_BIN="${RUST_SYSROOT}/lib/rustlib/${RUST_HOST}/bin"

leads to non-zero exit code in case any of them fail. This is unlike the previous setup where only the outermost command dirname was checked for its exit code which is 0, even if "" is passed as an argument.

@0ax1 0ax1 added the changelog/fix A bug fix label May 28, 2026
@0ax1 0ax1 force-pushed the fix-coverage-llvm-tools-check branch 5 times, most recently from b935010 to a6e72cb Compare May 28, 2026 19:14
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
@0ax1 0ax1 force-pushed the fix-coverage-llvm-tools-check branch from a6e72cb to 95d955b Compare May 28, 2026 19:21

# Verify llvm-profdata is accessible (cargo-fuzz needs it for coverage merging)
LLVM_PROFDATA="$(rustc +$NIGHTLY_TOOLCHAIN --print sysroot)/lib/rustlib/$(rustc +$NIGHTLY_TOOLCHAIN -vV | sed -n 's|host: ||p')/bin/llvm-profdata"
RUST_SYSROOT="$(rustc +$NIGHTLY_TOOLCHAIN --print sysroot)"
Copy link
Copy Markdown
Contributor Author

@0ax1 0ax1 May 28, 2026

Choose a reason for hiding this comment

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

Also changed to the more robust way to find the path here.

run: |
set -euo pipefail
LLVM_TOOLS_BIN="$(dirname "$(rustup which llvm-profdata)")"
RUST_SYSROOT="$(rustc --print sysroot)"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

set -euo pipefail is not needed. GH does set set -e.

@0ax1 0ax1 requested review from joseph-isaacs and robert3005 May 28, 2026 19:25
@0ax1 0ax1 marked this pull request as ready for review May 28, 2026 19:25
@0ax1 0ax1 enabled auto-merge (squash) May 28, 2026 19:25
@0ax1 0ax1 merged commit 7a93d3e into develop May 28, 2026
82 checks passed
@0ax1 0ax1 deleted the fix-coverage-llvm-tools-check branch May 28, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants