Skip to content

Commit

Permalink
test: twister: fix false negative in device test
Browse files Browse the repository at this point in the history
in device test when harness is Test, if there is no console output,
the self.state is None, as at this time self.instance.state
is "pass", as the last step cmake is "pass". So it will report "pass",
but actually there is no console output issue

you can easily reproduce this issue by set
line='' at the begining of the Test.handle function

fixing: #45942

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
  • Loading branch information
hakehuang authored and carlescufi committed May 26, 2022
1 parent 449516c commit 75845f5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/pylib/twister/twisterlib.py
Expand Up @@ -972,6 +972,8 @@ def handle(self):
self.instance.reason = "Failed"
else:
self.instance.execution_time = handler_time
self.instance.status = "error"
self.instance.reason = "No Console Output(Timeout)"

self._final_handle_actions(harness, handler_time)

Expand Down

0 comments on commit 75845f5

Please sign in to comment.