Merge pull request #2106 from alexcrichton/better-fuzzing

Make spectest fuzzing more deterministic
This commit is contained in:
Nick Fitzgerald
2020-08-06 08:53:09 -07:00
committed by GitHub

View File

@@ -13,9 +13,12 @@ fn main() {
.unwrap() .unwrap()
.join("../../tests/spec_testsuite"); .join("../../tests/spec_testsuite");
let mut code = format!("static FILES: &[(&str, &str)] = &[\n"); let mut code = format!("static FILES: &[(&str, &str)] = &[\n");
for entry in dir.read_dir().unwrap() { let entries = dir
let entry = entry.unwrap(); .read_dir()
let path = entry.path().display().to_string(); .unwrap()
.map(|p| p.unwrap().path().display().to_string())
.collect::<Vec<_>>();
for path in entries {
if !path.ends_with(".wast") { if !path.ends_with(".wast") {
continue; continue;
} }