File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
tools/compiletest/src/runtest Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -176,18 +176,22 @@ def watchdog():
176176 watchdog_thread .start ()
177177
178178
179+ def get_env_arg (name ):
180+ value = os .environ .get (name )
181+ if value is None :
182+ print ("must set %s" % name )
183+ sys .exit (1 )
184+ return value
185+
186+
179187####################################################################################################
180188# ~main
181189####################################################################################################
182190
183191
184192def main ():
185- if len (sys .argv ) != 3 :
186- print ("usage: python lldb_batchmode.py target-path script-path" )
187- sys .exit (1 )
188-
189- target_path = sys .argv [1 ]
190- script_path = sys .argv [2 ]
193+ target_path = get_env_arg ("LLDB_BATCHMODE_TARGET_PATH" )
194+ script_path = get_env_arg ("LLDB_BATCHMODE_SCRIPT_PATH" )
191195
192196 print ("LLDB batch-mode script" )
193197 print ("----------------------" )
Original file line number Diff line number Diff line change @@ -458,8 +458,8 @@ impl TestCx<'_> {
458458 self . run_command_to_procres (
459459 Command :: new ( & self . config . python )
460460 . arg ( & lldb_script_path)
461- . arg ( test_executable)
462- . arg ( debugger_script)
461+ . env ( "LLDB_BATCHMODE_TARGET_PATH" , test_executable)
462+ . env ( "LLDB_BATCHMODE_SCRIPT_PATH" , debugger_script)
463463 . env ( "PYTHONUNBUFFERED" , "1" ) // Help debugging #78665
464464 . env ( "PYTHONPATH" , pythonpath) ,
465465 )
You can’t perform that action at this time.
0 commit comments