Skip to content

Commit

Permalink
Rollup merge of #84990 - GuillaumeGomez:sort-rustdoc-gui-tests, r=Mar…
Browse files Browse the repository at this point in the history
…k-Simulacrum

Sort rustdoc-gui tests

The rustdoc-gui tests were randomly run. Not really a big issue but I prefer the tests to be sorted.
  • Loading branch information
JohnTitor authored May 7, 2021
2 parents 4705027 + cdbfea5 commit 87faf2e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,7 @@ impl Step for RustdocGUI {
command.arg("src/test/rustdoc-gui/lib.rs").arg("-o").arg(&out_dir);
builder.run(&mut command);

let mut tests = Vec::new();
for file in fs::read_dir("src/test/rustdoc-gui").unwrap() {
let file = file.unwrap();
let file_path = file.path();
Expand All @@ -839,13 +840,17 @@ impl Step for RustdocGUI {
if !file_name.to_str().unwrap().ends_with(".goml") {
continue;
}
tests.push(file_path);
}
tests.sort_unstable();
for test in tests {
let mut command = Command::new(&nodejs);
command
.arg("src/tools/rustdoc-gui/tester.js")
.arg("--doc-folder")
.arg(out_dir.join("test_docs"))
.arg("--test-file")
.arg(file_path);
.arg(test);
builder.run(&mut command);
}
} else {
Expand Down

0 comments on commit 87faf2e

Please sign in to comment.