@@ -111,7 +111,7 @@ def forward_fifo(path: str, f_out: typing.BinaryIO, stop_event: threading.Event)
111
111
'mobile-device-test.py' ), help = 'Test script to use.' )
112
112
@click .option ("--script-args" , type = str , default = '' ,
113
113
help = 'Script arguments, can use placeholders like {SCRIPT_BASE_NAME}.' )
114
- @click .option ("--script-gdb" , is_flag = True ,
114
+ @click .option ("--script-gdb/--no-script-gdb " , default = None ,
115
115
help = 'Run script through gdb' )
116
116
@click .option ("--quiet/--no-quiet" , default = None ,
117
117
help = "Do not print output from passing tests. Use this flag in CI to keep GitHub log size manageable." )
@@ -152,6 +152,8 @@ def main(app: str, factory_reset: bool, factory_reset_app_only: bool, app_args:
152
152
run .factory_reset = factory_reset
153
153
if factory_reset_app_only is not None :
154
154
run .factory_reset_app_only = factory_reset_app_only
155
+ if script_gdb is not None :
156
+ run .script_gdb = script_gdb
155
157
if quiet is not None :
156
158
run .quiet = quiet
157
159
@@ -232,7 +234,7 @@ def main_impl(app: str, factory_reset: bool, factory_reset_app_only: bool, app_a
232
234
script_command = ("gdb -batch -return-child-result -q -ex run -ex "
233
235
"thread|apply|all|bt --args python3" .split () + script_command )
234
236
else :
235
- script_command = "/usr/bin/env python3" .split () + script_command
237
+ script_command = "/usr/bin/env python3 -X faulthandler " .split () + script_command
236
238
237
239
final_script_command = [i .replace ('|' , ' ' ) for i in script_command ]
238
240
0 commit comments