scripts: runners: nrfjprog: sort SNR list before prompting

This guarantees muscle memory will work over multiple runs when the
same boards are connected. (The "nrfjprog --help" output for --ids
does not guarantee an order.)

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
Martí Bolívar 2020-01-09 14:52:24 -08:00 committed by Anas Nashif
commit 60db6a6e2f

View file

@ -88,6 +88,7 @@ class NrfJprogBinaryRunner(ZephyrBinaryRunner):
'disabled since standard input is not a terminal.) '
'Please specify a serial number on the command line.')
snrs = sorted(snrs)
print('There are multiple boards connected.')
for i, snr in enumerate(snrs, 1):
print('{}. {}'.format(i, snr))