Skip to content

Commit b0a8e3c

Browse files
Simplify rustdoc-gui tester by calling directly browser-ui-test
1 parent 9013334 commit b0a8e3c

File tree

5 files changed

+13
-419
lines changed

5 files changed

+13
-419
lines changed

src/tools/rustdoc-gui-test/src/main.rs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,22 +71,28 @@ fn main() -> Result<(), ()> {
7171
let mut command = Command::new(&config.nodejs);
7272

7373
command
74-
.arg(config.rust_src.join("src/tools/rustdoc-gui/tester.js"))
74+
.arg(local_node_modules.join(".bin/browser-ui-test"))
7575
.arg("--jobs")
7676
.arg(&config.jobs)
77-
.arg("--doc-folder")
77+
.arg("--variable")
78+
.arg("DOC_PATH")
7879
.arg(config.out_dir.join("doc"))
79-
.arg("--tests-folder")
80-
.arg(config.rust_src.join("tests/rustdoc-gui"));
80+
.arg("--allow-file-access-from-files")
81+
.arg("--display-format")
82+
.arg("compact");
8183

8284
if local_node_modules.exists() {
83-
// Link the local node_modules if exists.
85+
// Link the local node_modules if it exists.
8486
// This is useful when we run rustdoc-gui-test from outside of the source root.
8587
command.env("NODE_PATH", local_node_modules);
8688
}
8789

88-
for file in &config.goml_files {
89-
command.arg("--file").arg(file);
90+
if config.goml_files.is_empty() {
91+
command.arg("--test-folder").arg(config.rust_src.join("tests/rustdoc-gui"));
92+
} else {
93+
for file in &config.goml_files {
94+
command.arg("--test-file").arg(config.rust_src.join("tests/rustdoc-gui").join(file));
95+
}
9096
}
9197

9298
command.args(&config.test_args);

src/tools/rustdoc-gui/.eslintrc.js

Lines changed: 0 additions & 96 deletions
This file was deleted.

0 commit comments

Comments
 (0)