Loading maint/coverage_fuzz_corpora +5 −3 Original line number Diff line number Diff line Loading @@ -4,6 +4,8 @@ set -euo pipefail if [ -z "${LLVM_PROFILE_FILE:-}" ]; then echo "This script is meant to be run inside with_coverage" >&2 echo "If you're trying to generate a coverage .html file for the fuzzing corpus, run" >&2 echo "./maint/with_coverage ./maint/coverage_fuzz_corpora" >&2 exit 1 fi Loading @@ -14,7 +16,7 @@ cd "$TOPDIR" # set an alternative target directory so it's possible to reuse cached artifacts between coverage # runs of coverage and fuzzing. export CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-target-coverage} fuzzing_target_dir="target-coverage" for d in ./crates/*/fuzz; do pushd "$(dirname "$d")" Loading @@ -23,10 +25,10 @@ for d in ./crates/*/fuzz; do mkdir -p "$coverage_dir/$crate" for fuzzer in $(cargo fuzz list); do # disable sanitizer to work in stable. Also make curve25519-dalek compilation much faster cargo fuzz coverage "$fuzzer" --sanitizer=none cargo fuzz coverage --target-dir "$fuzzing_target_dir" "$fuzzer" --sanitizer=none # we copy binary and coverage data where with_coverage expect it to be cp "target-coverage/x86_64-unknown-linux-gnu/release/$fuzzer" "$TOPDIR/target/debug/$crate/$fuzzer" cp "$fuzzing_target_dir/x86_64-unknown-linux-gnu/release/$fuzzer" "$TOPDIR/target/debug/$crate/$fuzzer" mv "fuzz/coverage/$fuzzer/raw" "$coverage_dir/$crate/$fuzzer" done popd Loading Loading
maint/coverage_fuzz_corpora +5 −3 Original line number Diff line number Diff line Loading @@ -4,6 +4,8 @@ set -euo pipefail if [ -z "${LLVM_PROFILE_FILE:-}" ]; then echo "This script is meant to be run inside with_coverage" >&2 echo "If you're trying to generate a coverage .html file for the fuzzing corpus, run" >&2 echo "./maint/with_coverage ./maint/coverage_fuzz_corpora" >&2 exit 1 fi Loading @@ -14,7 +16,7 @@ cd "$TOPDIR" # set an alternative target directory so it's possible to reuse cached artifacts between coverage # runs of coverage and fuzzing. export CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-target-coverage} fuzzing_target_dir="target-coverage" for d in ./crates/*/fuzz; do pushd "$(dirname "$d")" Loading @@ -23,10 +25,10 @@ for d in ./crates/*/fuzz; do mkdir -p "$coverage_dir/$crate" for fuzzer in $(cargo fuzz list); do # disable sanitizer to work in stable. Also make curve25519-dalek compilation much faster cargo fuzz coverage "$fuzzer" --sanitizer=none cargo fuzz coverage --target-dir "$fuzzing_target_dir" "$fuzzer" --sanitizer=none # we copy binary and coverage data where with_coverage expect it to be cp "target-coverage/x86_64-unknown-linux-gnu/release/$fuzzer" "$TOPDIR/target/debug/$crate/$fuzzer" cp "$fuzzing_target_dir/x86_64-unknown-linux-gnu/release/$fuzzer" "$TOPDIR/target/debug/$crate/$fuzzer" mv "fuzz/coverage/$fuzzer/raw" "$coverage_dir/$crate/$fuzzer" done popd Loading