Skip to content

Commit 729399d

Browse files
smoeliusvanhauser-thc
authored andcommitted
Verify that plugins are available in integration_maze test
1 parent 021ed32 commit 729399d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

cargo-afl/tests/integration.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
use std::{
2+
io::Write,
23
path,
34
process::{self, ExitStatus},
45
};
56

7+
#[allow(dead_code)]
8+
#[path = "../src/common.rs"]
9+
mod common;
10+
611
fn target_dir_path() -> &'static path::Path {
712
if path::Path::new("../target/debug/cargo-afl").exists() {
813
path::Path::new("../target/debug/")
@@ -56,6 +61,15 @@ fn integration_cfg() {
5661

5762
#[test]
5863
fn integration_maze() {
64+
if !common::plugins_available().unwrap_or_default() {
65+
writeln!(
66+
std::io::stderr(),
67+
"Skipping `integration_maze` test as plugins are unavailable"
68+
)
69+
.unwrap();
70+
return;
71+
}
72+
5973
assert_cmd::Command::new(cargo_afl_path())
6074
.arg("afl")
6175
.arg("build")

0 commit comments

Comments
 (0)