summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-08-11 22:47:07 +0530
committerGitHub <noreply@github.com>2022-08-11 22:47:07 +0530
commitf583bf611dcda66a5fd9845c8e0e7293b0053ece (patch)
tree2f04efd7c69095fca1a6949ae82cc43f80adeb4c /src/bootstrap
parent7ecc8923dbebe5b47a090e406865cd381e80e220 (diff)
parent46af79c0ab545589d1a6569fb773c544a8d51547 (diff)
downloadrust-f583bf611dcda66a5fd9845c8e0e7293b0053ece.tar.gz
rust-f583bf611dcda66a5fd9845c8e0e7293b0053ece.zip
Rollup merge of #100403 - GuillaumeGomez:improve-messages, r=jsha
Improve error messages when running rustdoc GUI tests

There was already a message on how to install `browser-ui-test`, so nothing to be done there. However, we didn't show how to update its version, so the first commit adds it.

Another pain point was how to fix the unexpected crash in `browser-ui-test` (because of a missing `--no-sandbox`, still no idea why it became mandatory a few months ago on some linux distributions...). It now looks like this:

```console
Running 1 rustdoc-gui (8 concurrently) ...
ERROR: puppeteer failed when trying to create a new page. Please try again with `--no-sandbox`

`browser-ui-test` crashed unexpectedly. Please try again with adding `--test-args --no-sandbox` at the end. For example: `x.py test src/test/rustdoc-gui --test-args --no-sandbox`

Build completed unsuccessfully in 0:00:03
```

Thanks to `@jsha` for suggesting these improvements!

r? `@jsha`
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/test.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index ed1d883d0dc..baad0c75295 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -924,6 +924,11 @@ fn compare_browser_ui_test_version(installed_version: &str, src: &Path) {
                      one used in the CI (`{}`)",
                     installed_version, v
                 );
+                eprintln!(
+                    "You can install this version using `npm update browser-ui-test` or by using \
+                     `npm install browser-ui-test@{}`",
+                    v,
+                );
             }
         }
         Err(e) => eprintln!("Couldn't find the CI browser-ui-test version: {:?}", e),