@@ -317,7 +317,7 @@ def _create_env(self):
317317
318318 return env
319319
320- def _update_instance_info (self , harness_status , handler_time ):
320+ def _update_instance_info (self , harness , handler_time ):
321321 self .instance .execution_time = handler_time
322322 if not self .terminated and self .returncode != 0 :
323323 self .instance .status = TwisterStatus .FAIL
@@ -328,10 +328,10 @@ def _update_instance_info(self, harness_status, handler_time):
328328 # so in that case the return code itself is not meaningful
329329 self .instance .reason = f"Failed (rc={ self .returncode } )"
330330 self .instance .add_missing_case_status (TwisterStatus .BLOCK )
331- elif harness_status != TwisterStatus .NONE :
332- self .instance .status = harness_status
333- if harness_status == TwisterStatus .FAIL :
334- self .instance .reason = "Failed harness"
331+ elif harness . status != TwisterStatus .NONE :
332+ self .instance .status = harness . status
333+ if harness . status == TwisterStatus .FAIL :
334+ self .instance .reason = f "Failed harness:' { harness . reason } ' "
335335 self .instance .add_missing_case_status (TwisterStatus .BLOCK )
336336 else :
337337 self .instance .status = TwisterStatus .FAIL
@@ -380,7 +380,7 @@ def handle(self, harness):
380380 if sys .stdout .isatty ():
381381 subprocess .call (["stty" , "sane" ], stdin = sys .stdout )
382382
383- self ._update_instance_info (harness . status , handler_time )
383+ self ._update_instance_info (harness , handler_time )
384384
385385 self ._final_handle_actions (harness , handler_time )
386386
@@ -611,13 +611,13 @@ def _create_command(self, runner, hardware):
611611
612612 return command
613613
614- def _update_instance_info (self , harness_status , handler_time , flash_error ):
614+ def _update_instance_info (self , harness , handler_time , flash_error ):
615615 self .instance .execution_time = handler_time
616- if harness_status != TwisterStatus .NONE :
617- self .instance .status = harness_status
618- if harness_status == TwisterStatus .FAIL :
619- self .instance .reason = "Failed"
620- self .instance .add_missing_case_status (TwisterStatus .BLOCK , harness_status )
616+ if harness . status != TwisterStatus .NONE :
617+ self .instance .status = harness . status
618+ if harness . status == TwisterStatus .FAIL :
619+ self .instance .reason = f "Failed harness:' { harness . reason } ' "
620+ self .instance .add_missing_case_status (TwisterStatus .BLOCK , harness . status )
621621 elif not flash_error :
622622 self .instance .status = TwisterStatus .FAIL
623623 self .instance .reason = "Timeout"
@@ -836,7 +836,7 @@ def handle(self, harness):
836836
837837 handler_time = time .time () - start_time
838838
839- self ._update_instance_info (harness . status , handler_time , flash_error )
839+ self ._update_instance_info (harness , handler_time , flash_error )
840840
841841 self ._final_handle_actions (harness , handler_time )
842842
@@ -1063,9 +1063,9 @@ def _create_command(self, sysbuild_build_dir):
10631063
10641064 return command
10651065
1066- def _update_instance_info (self , harness_status , is_timeout ):
1066+ def _update_instance_info (self , harness , is_timeout ):
10671067 if (self .returncode != 0 and not self .ignore_qemu_crash ) or \
1068- harness_status == TwisterStatus .NONE :
1068+ harness . status == TwisterStatus .NONE :
10691069 self .instance .status = TwisterStatus .FAIL
10701070 if is_timeout :
10711071 self .instance .reason = "Timeout"
@@ -1143,7 +1143,7 @@ def handle(self, harness):
11431143
11441144 logger .debug (f"return code from QEMU ({ qemu_pid } ): { self .returncode } " )
11451145
1146- self ._update_instance_info (harness . status , is_timeout )
1146+ self ._update_instance_info (harness , is_timeout )
11471147
11481148 self ._final_handle_actions (harness , 0 )
11491149
@@ -1244,9 +1244,9 @@ def _create_command(self, sysbuild_build_dir):
12441244
12451245 return command
12461246
1247- def _update_instance_info (self , harness_status , is_timeout ):
1247+ def _update_instance_info (self , harness , is_timeout ):
12481248 if (self .returncode != 0 and not self .ignore_qemu_crash ) or \
1249- harness_status == TwisterStatus .NONE :
1249+ harness . status == TwisterStatus .NONE :
12501250 self .instance .status = TwisterStatus .FAIL
12511251 if is_timeout :
12521252 self .instance .reason = "Timeout"
@@ -1428,7 +1428,7 @@ def handle(self, harness):
14281428 os .close (self .pipe_handle )
14291429 self .pipe_handle = None
14301430
1431- self ._update_instance_info (harness . status , is_timeout )
1431+ self ._update_instance_info (harness , is_timeout )
14321432
14331433 self ._final_handle_actions (harness , 0 )
14341434
0 commit comments