8 [ "$(git diff)" != "" ] && exit 1
13 [ "$(git diff)" != "" ] && exit 1
16 cargo install --color always --force honggfuzz --no-default-features
17 sed -i 's/lto = true//' Cargo.toml
19 export RUSTFLAGS="--cfg=secp256k1_fuzz --cfg=hashes_fuzz"
20 export HFUZZ_BUILD_ARGS="--features honggfuzz_fuzz"
22 cargo --color always hfuzz build
23 for TARGET in src/bin/*.rs; do
24 FILENAME=$(basename $TARGET)
26 HFUZZ_RUN_ARGS="--exit_upon_crash -v -n2"
27 if [ "$FILE" = "chanmon_consistency_target" ]; then
28 HFUZZ_RUN_ARGS="$HFUZZ_RUN_ARGS -F 64 -N100000"
29 elif [ "$FILE" = "full_stack_target" ]; then
30 HFUZZ_RUN_ARGS="$HFUZZ_RUN_ARGS -t0 -N1000000"
32 HFUZZ_RUN_ARGS="$HFUZZ_RUN_ARGS -N1000000"
35 cargo --color always hfuzz run $FILE
36 if [ -f hfuzz_workspace/$FILE/HONGGFUZZ.REPORT.TXT ]; then
37 cat hfuzz_workspace/$FILE/HONGGFUZZ.REPORT.TXT
38 for CASE in hfuzz_workspace/$FILE/SIG*; do