Added switch -C to run only common tests. This is oposite option to -P which will test only peripherals

pull/357/head
Przemek Wirkus 2014-06-12 16:03:43 +01:00
parent 86e953d817
commit 5fade0ff20
1 changed files with 12 additions and 1 deletions

View File

@ -514,12 +514,18 @@ if __name__ == '__main__':
action="store_true",
help='Prints information about all tests and exits')
parser.add_option('-P', '--only-peripheral',
parser.add_option('-P', '--only-peripherals',
dest='test_only_peripheral',
default=False,
action="store_true",
help='Test only peripheral declared for MUT and skip common tests')
parser.add_option('-C', '--only-commons',
dest='test_only_common',
default=False,
action="store_true",
help='Test only board internals. Skip perpherials tests and perform common tests')
parser.add_option('-n', '--test-by-names',
dest='test_by_names',
help='Runs only test enumerated it this switch')
@ -598,6 +604,11 @@ if __name__ == '__main__':
print "TargetTest::%s::NotPeripheralTestSkipped()" % (target)
continue
if opts.test_only_common and test.peripherals:
if opts.verbose:
print "TargetTest::%s::PeripheralTestSkipped()" % (target)
continue
if test.automated and test.is_supported(target, toolchain):
if not is_peripherals_available(target, test.peripherals):
if opts.verbose: