Skip to content
Snippets Groups Projects
Commit fea54c47 authored by Per's avatar Per
Browse files

works with llvm7 and klee aur

parent 75e5fea6
Branches
No related tags found
No related merge requests found
target target
**/*.rs.bk **/*.rs.bk
Cargo.lock
...@@ -10,7 +10,7 @@ fn main() { ...@@ -10,7 +10,7 @@ fn main() {
let args = env::args().skip(2).collect::<Vec<_>>(); let args = env::args().skip(2).collect::<Vec<_>>();
// turn `cargo klee --example foo` into `xargo rustc --example foo -- (..)` // turn `cargo klee --example foo` into `xargo rustc --example foo -- (..)`
let mut c = Command::new("xargo"); let mut c = Command::new("cargo");
c.arg("rustc") c.arg("rustc")
.args(&args) .args(&args)
// verbose output for debugging purposes // verbose output for debugging purposes
...@@ -91,27 +91,34 @@ fn main() { ...@@ -91,27 +91,34 @@ fn main() {
"debug" "debug"
}; };
let mut docker = Command::new("docker"); // let mut docker = Command::new("docker");
docker // docker
.arg("run") // .arg("run")
.arg("--rm") // .arg("--rm")
.args(&["--user", &format!("{}:{}", uid(), gid())]) // .args(&["--user", &format!("{}:{}", uid(), gid())])
.args(&[ // .args(&[
"-v", // "-v",
&format!("{}:/mnt", env::current_dir().unwrap().display()), // &format!("{}:/mnt", env::current_dir().unwrap().display()),
]) // ])
.args(&["-w", "/mnt"]) // .args(&["-w", "/mnt"])
.arg("-it") // .arg("-it")
.arg("afoht/llvm-klee-4") // .arg("afoht/llvm-klee-4")
.args(&[ // .args(&[
"/usr/bin/klee", // "/usr/bin/klee",
&format!("target/{}/examples/{}{}.bc", profile, example, suffix), // &format!("target/{}/examples/{}{}.bc", profile, example, suffix),
]); // ]);
// print full command for debugging purposes // // print full command for debugging purposes
eprintln!("{:?}", docker); // eprintln!("{:?}", docker);
//
assert!(docker.status().unwrap().success()); // assert!(docker.status().unwrap().success());
let mut klee_cmd = Command::new("klee");
klee_cmd.arg(&format!(
"target/{}/examples/{}{}.ll",
profile, example, suffix
));
eprintln!("{:?}", klee_cmd);
assert!(klee_cmd.status().unwrap().success());
} }
// NOTE from cross // NOTE from cross
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment