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 <anas.nashif@intel.com>
This commit is contained in:
parent
e3ed783359
commit
734c345457
|
@ -4640,7 +4640,7 @@ class HardwareMap:
|
|||
with open(hwm_file, 'r') as yaml_file:
|
||||
hwm = yaml.load(yaml_file, Loader=SafeLoader)
|
||||
if hwm:
|
||||
hwm.sort(key=lambda x: x.get('serial', ''))
|
||||
hwm.sort(key=lambda x: x.get('id', ''))
|
||||
|
||||
# disconnect everything
|
||||
for h in hwm:
|
||||
|
|
Loading…
Reference in New Issue