remove libafl_tests (#324)
* remove libafl_tests * fmt * fix * fix * fix
This commit is contained in:
parent
7231a66104
commit
c0d40a43e1
@ -13,7 +13,6 @@ members = [
|
|||||||
"libafl_frida",
|
"libafl_frida",
|
||||||
"libafl_qemu",
|
"libafl_qemu",
|
||||||
"libafl_sugar",
|
"libafl_sugar",
|
||||||
"libafl_tests",
|
|
||||||
"libafl_concolic/symcc_runtime",
|
"libafl_concolic/symcc_runtime",
|
||||||
"libafl_concolic/symcc_libafl",
|
"libafl_concolic/symcc_libafl",
|
||||||
"libafl_concolic/test/dump_constraints",
|
"libafl_concolic/test/dump_constraints",
|
||||||
@ -24,7 +23,6 @@ default-members = [
|
|||||||
"libafl_derive",
|
"libafl_derive",
|
||||||
"libafl_cc",
|
"libafl_cc",
|
||||||
"libafl_targets",
|
"libafl_targets",
|
||||||
"libafl_tests",
|
|
||||||
]
|
]
|
||||||
exclude = [
|
exclude = [
|
||||||
"fuzzers",
|
"fuzzers",
|
||||||
|
@ -52,9 +52,6 @@ COPY libafl_targets/Cargo.toml libafl_targets/build.rs libafl_targets/
|
|||||||
COPY libafl_targets/src libafl_targets/src
|
COPY libafl_targets/src libafl_targets/src
|
||||||
COPY scripts/dummy.rs libafl_targets/src/lib.rs
|
COPY scripts/dummy.rs libafl_targets/src/lib.rs
|
||||||
|
|
||||||
COPY libafl_tests/Cargo.toml libafl_tests/build.rs libafl_tests/
|
|
||||||
COPY scripts/dummy.rs libafl_tests/src/lib.rs
|
|
||||||
|
|
||||||
COPY libafl_concolic/test/dump_constraints/Cargo.toml libafl_concolic/test/dump_constraints/
|
COPY libafl_concolic/test/dump_constraints/Cargo.toml libafl_concolic/test/dump_constraints/
|
||||||
COPY scripts/dummy.rs libafl_concolic/test/dump_constraints/src/lib.rs
|
COPY scripts/dummy.rs libafl_concolic/test/dump_constraints/src/lib.rs
|
||||||
|
|
||||||
@ -77,7 +74,6 @@ COPY docs docs
|
|||||||
# Dep chain:
|
# Dep chain:
|
||||||
# libafl_cc (independent)
|
# libafl_cc (independent)
|
||||||
# libafl_derive -> libafl
|
# libafl_derive -> libafl
|
||||||
# libafl_tests -> libafl
|
|
||||||
# libafl -> libafl_targets
|
# libafl -> libafl_targets
|
||||||
# libafl_targets -> libafl_frida
|
# libafl_targets -> libafl_frida
|
||||||
|
|
||||||
@ -86,8 +82,6 @@ COPY libafl_cc/src libafl_cc/src
|
|||||||
RUN touch libafl_cc/src/lib.rs
|
RUN touch libafl_cc/src/lib.rs
|
||||||
COPY libafl_derive/src libafl_derive/src
|
COPY libafl_derive/src libafl_derive/src
|
||||||
RUN touch libafl_derive/src/lib.rs
|
RUN touch libafl_derive/src/lib.rs
|
||||||
COPY libafl_tests/src libafl_tests/src
|
|
||||||
RUN touch libafl_tests/src/lib.rs
|
|
||||||
COPY libafl/src libafl/src
|
COPY libafl/src libafl/src
|
||||||
RUN touch libafl/src/lib.rs
|
RUN touch libafl/src/lib.rs
|
||||||
COPY libafl_targets/src libafl_targets/src
|
COPY libafl_targets/src libafl_targets/src
|
||||||
|
@ -16,5 +16,4 @@ codegen-units = 1
|
|||||||
opt-level = 3
|
opt-level = 3
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libafl = { path = "../../libafl/" }
|
libafl = { path = "../../libafl/" }
|
||||||
libafl_tests = { path = "../../libafl_tests/", features = ["forkserver_test"] }
|
|
46
fuzzers/forkserver_simple/build.rs
Normal file
46
fuzzers/forkserver_simple/build.rs
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
use std::env;
|
||||||
|
use std::path::Path;
|
||||||
|
use std::process::{exit, Command};
|
||||||
|
|
||||||
|
const AFL_URL: &str = "https://github.com/AFLplusplus/AFLplusplus";
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
if cfg!(windows) {
|
||||||
|
println!("cargo:warning=No support for windows yet.");
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
let cwd = env::current_dir().unwrap().to_string_lossy().to_string();
|
||||||
|
|
||||||
|
let afl = format!("{}/AFLplusplus", &cwd);
|
||||||
|
let afl_gcc = format!("{}/AFLplusplus/afl-cc", &cwd);
|
||||||
|
|
||||||
|
let afl_path = Path::new(&afl);
|
||||||
|
let afl_gcc_path = Path::new(&afl_gcc);
|
||||||
|
|
||||||
|
if !afl_path.is_dir() {
|
||||||
|
println!("cargo:warning=AFL++ not found, downloading...");
|
||||||
|
Command::new("git")
|
||||||
|
.arg("clone")
|
||||||
|
.arg(AFL_URL)
|
||||||
|
.status()
|
||||||
|
.unwrap();
|
||||||
|
}
|
||||||
|
|
||||||
|
if !afl_gcc_path.is_file() {
|
||||||
|
Command::new("make")
|
||||||
|
.arg("all")
|
||||||
|
.current_dir(&afl_path)
|
||||||
|
.status()
|
||||||
|
.unwrap();
|
||||||
|
}
|
||||||
|
|
||||||
|
Command::new(afl_gcc_path)
|
||||||
|
.args(&["src/program.c", "-o"])
|
||||||
|
.arg(&format!("{}/target/release/program", &cwd))
|
||||||
|
.status()
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
|
println!("cargo:rerun-if-changed=build.rs");
|
||||||
|
println!("cargo:rerun-if-changed=src/");
|
||||||
|
}
|
@ -99,7 +99,7 @@ pub fn main() {
|
|||||||
// Create the executor for the forkserver
|
// Create the executor for the forkserver
|
||||||
let mut executor = TimeoutForkserverExecutor::new(
|
let mut executor = TimeoutForkserverExecutor::new(
|
||||||
ForkserverExecutor::new(
|
ForkserverExecutor::new(
|
||||||
"../../libafl_tests/src/forkserver_test".to_string(),
|
"./target/release/program".to_string(),
|
||||||
&[],
|
&[],
|
||||||
true,
|
true,
|
||||||
tuple_list!(edges_observer, time_observer),
|
tuple_list!(edges_observer, time_observer),
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "libafl_tests"
|
|
||||||
version = "0.5.0"
|
|
||||||
authors = ["tokatoka <tokazerkje@outlook.com>"]
|
|
||||||
edition = "2018"
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
||||||
|
|
||||||
[features]
|
|
||||||
forkserver_test = []
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
|||||||
use std::env;
|
|
||||||
use std::path::Path;
|
|
||||||
use std::process::{exit, Command};
|
|
||||||
|
|
||||||
const AFL_URL: &str = "https://github.com/AFLplusplus/AFLplusplus";
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
if cfg!(feature = "forkserver_test") {
|
|
||||||
if cfg!(windows) {
|
|
||||||
println!("cargo:warning=No support for windows yet.");
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
let cwd = env::current_dir().unwrap().to_string_lossy().to_string();
|
|
||||||
|
|
||||||
let afl = format!("{}/AFLplusplus", &cwd);
|
|
||||||
let afl_gcc = format!("{}/AFLplusplus/afl-cc", &cwd);
|
|
||||||
|
|
||||||
let afl_path = Path::new(&afl);
|
|
||||||
let afl_gcc_path = Path::new(&afl_gcc);
|
|
||||||
|
|
||||||
if !afl_path.is_dir() {
|
|
||||||
println!("cargo:warning=AFL++ not found, downloading...");
|
|
||||||
Command::new("git")
|
|
||||||
.arg("clone")
|
|
||||||
.arg(AFL_URL)
|
|
||||||
.status()
|
|
||||||
.unwrap();
|
|
||||||
}
|
|
||||||
|
|
||||||
if !afl_gcc_path.is_file() {
|
|
||||||
Command::new("make")
|
|
||||||
.arg("all")
|
|
||||||
.current_dir(&afl_path)
|
|
||||||
.status()
|
|
||||||
.unwrap();
|
|
||||||
}
|
|
||||||
|
|
||||||
Command::new(afl_gcc_path)
|
|
||||||
.args(&["src/forkserver_test.c", "-o"])
|
|
||||||
.arg(&format!("{}/forkserver_test", "src"))
|
|
||||||
.status()
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
println!("cargo:rerun-if-changed=build.rs");
|
|
||||||
println!("cargo:rerun-if-changed=src/");
|
|
||||||
}
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
|
|
Loading…
x
Reference in New Issue
Block a user