#!/bin/bash -eu # ClusterFuzzLite build script (T4-3): compile every cargo-fuzz target and # stage the binaries plus any checked-in seed corpus into $OUT. # # Hermetic by construction: every target exercises only pure parsers (no # network, Postgres, or Redis), so the OSS-Fuzz sandbox needs no services. cd "$SRC/d-oauth-server/fuzz" cargo fuzz build -O --debug-assertions for target_path in fuzz_targets/*.rs; do target="$(basename "$target_path" .rs)" cp "build/x86_64-unknown-linux-gnu/release/$target" "$OUT/" 2>/dev/null \ || cp "target/x86_64-unknown-linux-gnu/release/$target" "$OUT/" if [ -d "corpus/$target" ]; then zip -j "$OUT/${target}_seed_corpus.zip" "corpus/$target/"* 2>/dev/null || true fi done