`rustfmt`: `fuzz/src/base32.rs`
[rust-lightning] / fuzz / ci-fuzz.sh
index 9894178458da6afdac246500474ef70014588f23..5a5a8f7f803f8b73c9d96135a3ba1d2a5a5380e9 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/bash
 set -e
+set -x
 
 pushd src/msg_targets
 rm msg_*.rs
@@ -12,9 +13,13 @@ rm *_target.rs
 [ "$(git diff)" != "" ] && exit 1
 popd
 
-cargo install --color always --force honggfuzz
+cargo install --color always --force honggfuzz --no-default-features
 sed -i 's/lto = true//' Cargo.toml
-HFUZZ_BUILD_ARGS="--features honggfuzz_fuzz" cargo --color always hfuzz build
+
+export RUSTFLAGS="--cfg=secp256k1_fuzz --cfg=hashes_fuzz"
+export HFUZZ_BUILD_ARGS="--features honggfuzz_fuzz"
+
+cargo --color always hfuzz build
 for TARGET in src/bin/*.rs; do
        FILENAME=$(basename $TARGET)
        FILE="${FILENAME%.*}"
@@ -27,7 +32,7 @@ for TARGET in src/bin/*.rs; do
                HFUZZ_RUN_ARGS="$HFUZZ_RUN_ARGS -N1000000"
        fi
        export HFUZZ_RUN_ARGS
-       HFUZZ_BUILD_ARGS="--features honggfuzz_fuzz" cargo --color always hfuzz run $FILE
+       cargo --color always hfuzz run $FILE
        if [ -f hfuzz_workspace/$FILE/HONGGFUZZ.REPORT.TXT ]; then
                cat hfuzz_workspace/$FILE/HONGGFUZZ.REPORT.TXT
                for CASE in hfuzz_workspace/$FILE/SIG*; do