Skip to content

Commit 87faf2e

Browse files
authored
Rollup merge of rust-lang#84990 - GuillaumeGomez:sort-rustdoc-gui-tests, r=Mark-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.
2 parents 4705027 + cdbfea5 commit 87faf2e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/bootstrap/test.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,7 @@ impl Step for RustdocGUI {
831831
command.arg("src/test/rustdoc-gui/lib.rs").arg("-o").arg(&out_dir);
832832
builder.run(&mut command);
833833

834+
let mut tests = Vec::new();
834835
for file in fs::read_dir("src/test/rustdoc-gui").unwrap() {
835836
let file = file.unwrap();
836837
let file_path = file.path();
@@ -839,13 +840,17 @@ impl Step for RustdocGUI {
839840
if !file_name.to_str().unwrap().ends_with(".goml") {
840841
continue;
841842
}
843+
tests.push(file_path);
844+
}
845+
tests.sort_unstable();
846+
for test in tests {
842847
let mut command = Command::new(&nodejs);
843848
command
844849
.arg("src/tools/rustdoc-gui/tester.js")
845850
.arg("--doc-folder")
846851
.arg(out_dir.join("test_docs"))
847852
.arg("--test-file")
848-
.arg(file_path);
853+
.arg(test);
849854
builder.run(&mut command);
850855
}
851856
} else {

0 commit comments

Comments
 (0)