mirror of
https://github.com/logos-blockchain/lez-fuzzing.git
synced 2026-06-07 11:39:30 +00:00
fix: wrong path to binary used for calculation
This commit is contained in:
parent
4f5c8a282e
commit
4e331db02d
8
.github/workflows/fuzz.yml
vendored
8
.github/workflows/fuzz.yml
vendored
@ -84,15 +84,19 @@ jobs:
|
|||||||
mkdir -p "$CORPUS"
|
mkdir -p "$CORPUS"
|
||||||
|
|
||||||
# ── Build and replay the corpus with LLVM coverage instrumentation ──
|
# ── Build and replay the corpus with LLVM coverage instrumentation ──
|
||||||
cargo fuzz coverage "$TARGET" "$CORPUS" 2>/dev/null || true
|
# cargo fuzz coverage builds into fuzz/target/<triple>/coverage/<target>
|
||||||
|
# and writes the merged profdata to fuzz/coverage/<target>/coverage.profdata
|
||||||
|
cargo fuzz coverage "$TARGET" "$CORPUS" || true
|
||||||
|
|
||||||
# ── Locate llvm-cov from the installed nightly toolchain ──
|
# ── Locate llvm-cov from the installed nightly toolchain ──
|
||||||
SYSROOT="$(rustc --print sysroot)"
|
SYSROOT="$(rustc --print sysroot)"
|
||||||
HOST_TRIPLE="$(rustc -vV | awk '/^host:/{print $2}')"
|
HOST_TRIPLE="$(rustc -vV | awk '/^host:/{print $2}')"
|
||||||
LLVM_COV="${SYSROOT}/lib/rustlib/${HOST_TRIPLE}/bin/llvm-cov"
|
LLVM_COV="${SYSROOT}/lib/rustlib/${HOST_TRIPLE}/bin/llvm-cov"
|
||||||
|
|
||||||
|
# The coverage-instrumented binary lives under a "coverage" profile directory,
|
||||||
|
# NOT "release" — search specifically for that path.
|
||||||
PROFDATA=$(find fuzz/coverage/"$TARGET" -name "coverage.profdata" 2>/dev/null | head -1)
|
PROFDATA=$(find fuzz/coverage/"$TARGET" -name "coverage.profdata" 2>/dev/null | head -1)
|
||||||
BINARY=$(find fuzz/target -name "$TARGET" -type f -perm /111 2>/dev/null | grep release | head -1)
|
BINARY=$(find fuzz/target -path "*coverage/${TARGET}" -type f 2>/dev/null | head -1)
|
||||||
|
|
||||||
branches_covered="n/a"
|
branches_covered="n/a"
|
||||||
branches_total="n/a"
|
branches_total="n/a"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user