Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
92: Travis test r=frewsxcv This is #79, with some tweaks to make it work
- Loading branch information
Showing
6 changed files
with
53 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,24 @@ | ||
language: rust | ||
rust: | ||
- stable | ||
- beta | ||
- nightly | ||
|
||
cache: cargo | ||
|
||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- gcc-5 | ||
- g++-5 | ||
|
||
rust: nightly | ||
|
||
os: | ||
- linux | ||
|
||
matrix: | ||
fast_finish: true | ||
|
||
notifications: | ||
email: false | ||
|
||
script: scripts/run.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,6 @@ toml = "0.3" | |
term = "0.4" | ||
clap = "2.21.1" | ||
error-chain = "0.10" | ||
|
||
[workspace] | ||
members = ["."] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
cargo install | ||
PATH=$PATH:/home/travis/.cargo/bin | ||
cd testcrate | ||
cargo build | ||
cargo-fuzz init | ||
sed -i 's/\/\/.*/testcrate\:\:test_func\(data\)\;/g' fuzz/fuzzers/fuzzer_script_1.rs | ||
|
||
if CC=gcc-5 CXX=g++-5 cargo-fuzz run fuzzer_script_1 -- -runs=1000; then | ||
exit 100; # Should not succeed! | ||
else | ||
:; | ||
fi | ||
|
||
# should be something there! | ||
ls fuzz/artifacts/fuzzer_script_1/crash-* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
target | ||
Cargo.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[package] | ||
name = "testcrate" | ||
version = "0.1.0" | ||
authors = ["The rust-fuzz Project Developers"] | ||
publish = false | ||
|
||
[dependencies] | ||
|
||
[workspace] | ||
members = ["."] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pub fn test_func(slice: &[u8]) { | ||
if slice.len() == 7 { | ||
panic!("I'm afraid of number 7"); | ||
} | ||
} | ||
|