Skip to content

Commit 734c345

Browse files
committed
twister: sort hardware map based on id
Serial is not required, in some cases it might be set to null or we might be using serial_pty, so sort existing map file based on ID instead. Fixes #45713 Signed-off-by: Anas Nashif <[email protected]>
1 parent e3ed783 commit 734c345

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/pylib/twister/twisterlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4640,7 +4640,7 @@ def save(self, hwm_file):
46404640
with open(hwm_file, 'r') as yaml_file:
46414641
hwm = yaml.load(yaml_file, Loader=SafeLoader)
46424642
if hwm:
4643-
hwm.sort(key=lambda x: x.get('serial', ''))
4643+
hwm.sort(key=lambda x: x.get('id', ''))
46444644

46454645
# disconnect everything
46464646
for h in hwm:

0 commit comments

Comments
 (0)