Skip to content

Commit 021ed32

Browse files
committed
add test
1 parent 2ea0d2d commit 021ed32

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

cargo-afl/tests/integration.rs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,22 @@ fn integration_cfg() {
5454
}
5555
}
5656

57+
#[test]
58+
fn integration_maze() {
59+
assert_cmd::Command::new(cargo_afl_path())
60+
.arg("afl")
61+
.arg("build")
62+
.arg("-r")
63+
.arg("--example")
64+
.arg("maze")
65+
.arg("--manifest-path")
66+
.arg("../afl/Cargo.toml")
67+
.assert()
68+
.success();
69+
70+
fuzz_example("maze", true);
71+
}
72+
5773
fn fuzz_example(name: &str, should_crash: bool) {
5874
let temp_dir = tempfile::TempDir::new().expect("Could not create temporary directory");
5975
let temp_dir_path = temp_dir.path();
@@ -64,7 +80,7 @@ fn fuzz_example(name: &str, should_crash: bool) {
6480
.arg(input_path())
6581
.arg("-o")
6682
.arg(temp_dir_path)
67-
.args(["-V", "5"]) // 5 seconds
83+
.args(["-V", "10"]) // 5 seconds
6884
.arg(examples_path(name))
6985
.env("AFL_BENCH_UNTIL_CRASH", "1")
7086
.env("AFL_NO_CRASH_README", "1")

0 commit comments

Comments
 (0)