twister: fix platform len check for device-testing
For using --device-testing with --device-serial or --device-serial-pty it is necessary to provide the platform to be used for testing. Not specifying a platform or specifying more than one is an error. Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This commit is contained in:
parent
ccd3612575
commit
568f754f59
1 changed files with 4 additions and 4 deletions
|
@ -786,10 +786,10 @@ def parse_arguments(parser, args, options = None):
|
||||||
logger.error("valgrind enabled but valgrind executable not found")
|
logger.error("valgrind enabled but valgrind executable not found")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if options.device_testing and (options.device_serial or options.device_serial_pty) and len(options.platform) > 1:
|
if options.device_testing and (options.device_serial or options.device_serial_pty) and len(options.platform) != 1:
|
||||||
logger.error("""When --device-testing is used with
|
logger.error("When --device-testing is used with --device-serial "
|
||||||
--device-serial or --device-serial-pty,
|
"or --device-serial-pty, exactly one platform must "
|
||||||
only one platform is allowed""")
|
"be specified")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if options.device_flash_with_test and not options.device_testing:
|
if options.device_flash_with_test and not options.device_testing:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue