mirror of https://github.com/ARMmbed/mbed-os.git
Added new flag -L to list all tests available. Also removed trailing spaces
parent
3d49a491d4
commit
493ad639e2
|
@ -75,6 +75,8 @@ if __name__ == '__main__':
|
|||
default=None, help="The mbed serial port")
|
||||
parser.add_option("-b", "--baud", type="int", dest="baud",
|
||||
default=None, help="The mbed serial baud rate")
|
||||
parser.add_option("-L", "--list-tests", action="store_true", dest="list_tests",
|
||||
default=False, help="List available tests in order and exit")
|
||||
|
||||
# Ideally, all the tests with a single "main" thread can be run with, or
|
||||
# without the rtos
|
||||
|
@ -87,6 +89,11 @@ if __name__ == '__main__':
|
|||
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
# Print available tests in order and exit
|
||||
if options.list_tests is True:
|
||||
print '\n'.join(map(str, sorted(TEST_MAP.values())))
|
||||
sys.exit()
|
||||
|
||||
# force program to "0" if a source dir is specified
|
||||
if options.source_dir is not None:
|
||||
p = 0
|
||||
|
|
Loading…
Reference in New Issue