Actually make spectest fuzzing deterministic

Turns out #2106 missed the actual sorting operation. Silly me!
This commit is contained in:
Alex Crichton
2021-03-29 08:23:23 -07:00
committed by Andrew Brown
parent 910f59114d
commit b1a3c9047f

View File

@@ -13,11 +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");
let entries = dir let mut entries = dir
.read_dir() .read_dir()
.unwrap() .unwrap()
.map(|p| p.unwrap().path().display().to_string()) .map(|p| p.unwrap().path().display().to_string())
.collect::<Vec<_>>(); .collect::<Vec<_>>();
entries.sort();
for path in entries { for path in entries {
if !path.ends_with(".wast") { if !path.ends_with(".wast") {
continue; continue;