File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 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) {
201201 process . setMaxListeners ( opts [ "jobs" ] + 1 ) ;
202202 }
203203
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+
204217 const tests_queue = [ ] ;
205218 let results = {
206219 successful : [ ] ,
@@ -247,6 +260,9 @@ async function main(argv) {
247260 }
248261 status_bar . finish ( ) ;
249262
263+ // We don't need this listener anymore.
264+ process . removeListener ( "exit" , exitHandling ) ;
265+
250266 if ( debug ) {
251267 results . successful . sort ( by_filename ) ;
252268 results . successful . forEach ( r => {
You can’t perform that action at this time.
0 commit comments