Added new functionality: now you can use -P switch to test MUT's peripherals only

pull/260/head
Przemek Wirkus 2014-04-08 16:01:00 +01:00 committed by bcostm
parent 086e0c239d
commit 136b042f02
1 changed files with 11 additions and 0 deletions

View File

@ -472,6 +472,12 @@ if __name__ == '__main__':
action="store_true",
help='Prints information about all tests and exits')
parser.add_option('-P', '--only-peripheral',
dest='test_only_peripheral',
default=False,
action="store_true",
help='Test only peripheral declared for MUT and skip common tests')
parser.add_option('-v', '--verbose',
dest='verbose',
default=False,
@ -527,6 +533,11 @@ if __name__ == '__main__':
if test_ids and test_id not in test_ids:
continue
if opts.test_only_peripheral and not test.peripherals:
if opts.verbose:
print "TargetTest::%s::NotPeripheralTestSkipped(%s)" % (target, ",".join(test.peripherals))
continue
if test.automated and test.is_supported(target, toolchain):
if not is_peripherals_available(target, test.peripherals):
if opts.verbose: