Skip to content

Commit 1e3dadd

Browse files
authored
Unrolled build for #146200
Rollup merge of #146200 - GuillaumeGomez:simplify-rustdoc-gui-tests, r=lolbinarycat Simplify rustdoc-gui tester by calling directly browser-ui-test The output and handling of `browser-ui-test` is now mostly the same as we did manually, so no need to keep our wrapper anymore. Lot of code removed! \o/ r? `@lolbinarycat`
2 parents 76863e3 + b0a8e3c commit 1e3dadd

File tree

7 files changed

+39
-868
lines changed

7 files changed

+39
-868
lines changed

package-lock.json

Lines changed: 25 additions & 448 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"dependencies": {
3-
"browser-ui-test": "^0.21.3",
3+
"browser-ui-test": "^0.22.0",
44
"es-check": "^6.2.1",
55
"eslint": "^8.57.1",
66
"eslint-js": "github:eslint/js",

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)