Set travis to do 1,000,000 hfuzz steps

This commit is contained in:
Matt Corallo 2018-03-20 12:28:18 -04:00
parent 6826d8f35c
commit 73fca023ae
2 changed files with 24 additions and 0 deletions

View File

@ -5,9 +5,18 @@ rust:
- nightly - nightly
- 1.14.0 - 1.14.0
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y binutils-dev libunwind8-dev
install: install:
- git clone https://github.com/bitcoin/secp256k1.git - git clone https://github.com/bitcoin/secp256k1.git
- cd secp256k1 - cd secp256k1
- ./autogen.sh && ./configure && make && sudo make install - ./autogen.sh && ./configure && make && sudo make install
- sudo ldconfig /usr/local/lib - sudo ldconfig /usr/local/lib
- cd ..
script:
- cargo build --verbose
- cargo test --verbose
- if [ "$(rustup show | grep default | grep stable)" != "" ]; then cd fuzz && cargo test --verbose && ./travis-fuzz.sh; fi

15
fuzz/travis-fuzz.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
cargo install honggfuzz
set +e
for TARGET in fuzz_targets/*; do
FILENAME=$(basename $TARGET)
FILE="${FILENAME%.*}"
HFUZZ_BUILD_ARGS="--features honggfuzz_fuzz" HFUZZ_RUN_ARGS="-N1000000 --exit_upon_crash -v" cargo 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
cat $CASE | xxd -p
done
exit 1
fi
done