File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,19 @@ async function main(argv) {
201
201
process . setMaxListeners ( opts [ "jobs" ] + 1 ) ;
202
202
}
203
203
204
+ // We catch this "event" to display a nicer message in case of unexpected exit (because of a
205
+ // missing `--no-sandbox`).
206
+ const exitHandling = ( code ) => {
207
+ if ( ! opts [ "no_sandbox" ] ) {
208
+ console . log ( "" ) ;
209
+ console . log (
210
+ "`browser-ui-test` crashed unexpectedly. Please try again with adding `--test-args \
211
+ --no-sandbox` at the end. For example: `x.py test src/test/rustdoc-gui --test-args --no-sandbox`" ) ;
212
+ console . log ( "" ) ;
213
+ }
214
+ } ;
215
+ process . on ( 'exit' , exitHandling ) ;
216
+
204
217
const tests_queue = [ ] ;
205
218
let results = {
206
219
successful : [ ] ,
@@ -247,6 +260,9 @@ async function main(argv) {
247
260
}
248
261
status_bar . finish ( ) ;
249
262
263
+ // We don't need this listener anymore.
264
+ process . removeListener ( "exit" , exitHandling ) ;
265
+
250
266
if ( debug ) {
251
267
results . successful . sort ( by_filename ) ;
252
268
results . successful . forEach ( r => {
You can’t perform that action at this time.
0 commit comments