Skip to content

Commit 8f2f179

Browse files
committed
Added new functionality: now you can use -P switch to test MUT's peripherals only
1 parent 497f8c5 commit 8f2f179

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

workspace_tools/singletest.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,12 @@ def get_result_summary_table():
472472
action="store_true",
473473
help='Prints information about all tests and exits')
474474

475+
parser.add_option('-P', '--only-peripheral',
476+
dest='test_only_peripheral',
477+
default=False,
478+
action="store_true",
479+
help='Test only peripheral declared for MUT and skip common tests')
480+
475481
parser.add_option('-v', '--verbose',
476482
dest='verbose',
477483
default=False,
@@ -527,6 +533,11 @@ def get_result_summary_table():
527533
if test_ids and test_id not in test_ids:
528534
continue
529535

536+
if opts.test_only_peripheral and not test.peripherals:
537+
if opts.verbose:
538+
print "TargetTest::%s::NotPeripheralTestSkipped(%s)" % (target, ",".join(test.peripherals))
539+
continue
540+
530541
if test.automated and test.is_supported(target, toolchain):
531542
if not is_peripherals_available(target, test.peripherals):
532543
if opts.verbose:

0 commit comments

Comments
 (0)