From a72f0c2e0716fbfc4095c76c999de18e1c685154 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 11 Aug 2022 13:02:19 +0200 Subject: [PATCH 1/2] Add instructions on how to update the browser-ui-test version --- src/bootstrap/test.rs | 5 +++++ 1 file changed, 5 insertions(+) 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), From 46af79c0ab545589d1a6569fb773c544a8d51547 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 11 Aug 2022 13:20:18 +0200 Subject: [PATCH 2/2] Improve error message when browser-ui-test crashes --- src/tools/rustdoc-gui/tester.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/tools/rustdoc-gui/tester.js b/src/tools/rustdoc-gui/tester.js index a5121850369..70d5f94472f 100644 --- a/src/tools/rustdoc-gui/tester.js +++ b/src/tools/rustdoc-gui/tester.js @@ -201,6 +201,19 @@ async function main(argv) { process.setMaxListeners(opts["jobs"] + 1); } + // We catch this "event" to display a nicer message in case of unexpected exit (because of a + // missing `--no-sandbox`). + const exitHandling = (code) => { + if (!opts["no_sandbox"]) { + console.log(""); + console.log( + "`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`"); + console.log(""); + } + }; + process.on('exit', exitHandling); + const tests_queue = []; let results = { successful: [], @@ -247,6 +260,9 @@ async function main(argv) { } status_bar.finish(); + // We don't need this listener anymore. + process.removeListener("exit", exitHandling); + if (debug) { results.successful.sort(by_filename); results.successful.forEach(r => {