Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more information for rustdoc-gui tests #97826

Merged
merged 2 commits into from
Jun 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions src/test/rustdoc-gui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,24 @@ You can find more information and its documentation in its [repository][browser-
If you need to have more information on the tests run, you can use `--test-args`:

```bash
$ ./x.py test src/test/rustdoc-gui --stage 1 --jobs 8 --test-args --debug
$ ./x.py test src/test/rustdoc-gui --stage 1 --test-args --debug
```

There are three options supported:
If you don't want to run in headless mode (helpful to debug sometimes), you can use
`--no-headless`:

* `--debug`: allows to see puppeteer commands.
* `--no-headless`: disable headless mode so you can see what's going on.
* `--show-text`: by default, text isn't rendered because of issues with fonts, it enables it back.
```bash
$ ./x.py test src/test/rustdoc-gui --stage 1 --test-args --no-headless
```

To see the supported options, use `--help`.

Important to be noted: if the chromium instance crashes when you run it, you might need to
use `--no-sandbox` to make it work:

```bash
$ ./x.py test src/test/rustdoc-gui --stage 1 --test-args --no-sandbox
```

[browser-ui-test]: https://github.com/GuillaumeGomez/browser-UI-test/
[puppeteer]: https://pptr.dev/
1 change: 1 addition & 0 deletions src/tools/rustdoc-gui/tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ function showHelp() {
console.log(" --debug : show extra information about script run");
console.log(" --show-text : render font in pages");
console.log(" --no-headless : disable headless mode");
console.log(" --no-sandbox : disable sandbox mode");
console.log(" --help : show this message then quit");
console.log(" --tests-folder [PATH] : location of the .GOML tests folder");
console.log(" --jobs [NUMBER] : number of threads to run tests on");
Expand Down