Skip to content

Commit 2188192

Browse files
committed
Set travis to run honggfuzz for a while
1 parent 1d2774d commit 2188192

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
language: rust
22
rust:
33
- stable
4+
- beta
5+
- 1.22.0
46
cache: cargo
7+
8+
before_install:
9+
- sudo apt-get -qq update
10+
- sudo apt-get install -y binutils-dev libunwind8-dev
11+
12+
script:
13+
- cargo build --verbose
14+
- cargo test --verbose
15+
- if [ "$(rustup show | grep default | grep stable)" != "" ]; then cd fuzz && cargo test --verbose && ./travis-fuzz.sh; fi

fuzz/travis-fuzz.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
cargo install honggfuzz
3+
set +e
4+
for TARGET in fuzz_targets/*; do
5+
FILENAME=$(basename $TARGET)
6+
FILE="${FILENAME%.*}"
7+
HFUZZ_BUILD_ARGS="--features honggfuzz_fuzz" HFUZZ_RUN_ARGS="-N1000000 --exit_upon_crash -v" cargo hfuzz run $FILE
8+
if [ -f hfuzz_workspace/$FILE/HONGGFUZZ.REPORT.TXT ]; then
9+
cat hfuzz_workspace/$FILE/HONGGFUZZ.REPORT.TXT
10+
for CASE in hfuzz_workspace/$FILE/SIG*; do
11+
cat $CASE | xxd -p
12+
done
13+
exit 1
14+
fi
15+
done

0 commit comments

Comments
 (0)