twister: handler: optimize handler testsuite check
in many platforms, before the debuger flash, the former testsuite many already executed, so we will see some old testsuite name. and we should not compare them directly, instead if we compare in reversed order them we can avoid such mis-judge. Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
This commit is contained in:
parent
dfae5ba7de
commit
248b66dfe3
1 changed files with 5 additions and 3 deletions
|
@ -113,10 +113,12 @@ class Handler:
|
|||
return
|
||||
if not detected_suite_names:
|
||||
self._missing_suite_name(expected_suite_names, handler_time)
|
||||
for detected_suite_name in detected_suite_names:
|
||||
if detected_suite_name not in expected_suite_names:
|
||||
return
|
||||
# compare the expect and detect from end one by one without order
|
||||
_d_suite = detected_suite_names[-len(expected_suite_names):]
|
||||
if set(_d_suite) != set(expected_suite_names):
|
||||
if not set(_d_suite).issubset(set(expected_suite_names)):
|
||||
self._missing_suite_name(expected_suite_names, handler_time)
|
||||
break
|
||||
|
||||
def _missing_suite_name(self, expected_suite_names, handler_time):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue