@@ -714,7 +714,10 @@ def handle(self, harness):
714714 timeout = 30
715715 if script_param :
716716 timeout = script_param .get ("pre_script_timeout" , timeout )
717- self .run_custom_script (pre_script , timeout )
717+ pre_script_cmd = ([pre_script ] +
718+ [self .instance .name ]
719+ )
720+ self .run_custom_script (pre_script_cmd , timeout )
718721
719722 flash_timeout = hardware .flash_timeout
720723 if hardware .flash_with_test :
@@ -782,7 +785,10 @@ def handle(self, harness):
782785 timeout = 30
783786 if script_param :
784787 timeout = script_param .get ("post_flash_timeout" , timeout )
785- self .run_custom_script (post_flash_script , timeout )
788+ post_flash_script_cmd = ([post_flash_script ] +
789+ [self .instance .name ]
790+ )
791+ self .run_custom_script (post_flash_script_cmd , timeout )
786792
787793 # Connect to device after flashing it
788794 if hardware .flash_before :
@@ -824,7 +830,10 @@ def handle(self, harness):
824830 timeout = 30
825831 if script_param :
826832 timeout = script_param .get ("post_script_timeout" , timeout )
827- self .run_custom_script (post_script , timeout )
833+ post_script_cmd = ([post_script ] +
834+ [self .instance .name ]
835+ )
836+ self .run_custom_script (post_script_cmd , timeout )
828837
829838 self .make_dut_available (hardware )
830839
0 commit comments