diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:11:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:11:28 +0000 |
commit | 94a0819fe3a0d679c3042a77bfe6a2afc505daea (patch) | |
tree | 2b827afe6a05f3538db3f7803a88c4587fe85648 /src/tools/rustdoc-gui | |
parent | Adding upstream version 1.64.0+dfsg1. (diff) | |
download | rustc-94a0819fe3a0d679c3042a77bfe6a2afc505daea.tar.xz rustc-94a0819fe3a0d679c3042a77bfe6a2afc505daea.zip |
Adding upstream version 1.66.0+dfsg1.upstream/1.66.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/rustdoc-gui')
-rw-r--r-- | src/tools/rustdoc-gui/tester.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/tools/rustdoc-gui/tester.js b/src/tools/rustdoc-gui/tester.js index a51218503..70d5f9447 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 => { |