summaryrefslogtreecommitdiffstats
path: root/src/tools/rustdoc-gui
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:06:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:06:31 +0000
commit2ff14448863ac1a1dd9533461708e29aae170c2d (patch)
tree85b9fea2bbfe3f06473cfa381eed11f273b57c5c /src/tools/rustdoc-gui
parentAdding debian version 1.64.0+dfsg1-1. (diff)
downloadrustc-2ff14448863ac1a1dd9533461708e29aae170c2d.tar.xz
rustc-2ff14448863ac1a1dd9533461708e29aae170c2d.zip
Adding debian version 1.65.0+dfsg1-2.debian/1.65.0+dfsg1-2
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.js16
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 => {