Skip to content

Commit 1ac1ba4

Browse files
committed
Added test by nane execution to test suite execution script
1 parent ef1f475 commit 1ac1ba4

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

workspace_tools/singletest.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,12 +430,12 @@ def get_result_summary_table():
430430
pt.align['percent [%]'] = "r"
431431

432432
percent_progress = round(100.0 * counter_automated / float(counter_all), 1)
433-
str_progress = progress_bar(percent_progress, 75)
433+
str_progress = progress_bar(percent_progress, 75)
434434
pt.add_row([counter_automated, counter_all, percent_progress, str_progress])
435435
print "Automation coverage:"
436436
print pt
437437
print
438-
438+
439439
# Test automation coverage table print
440440
test_id_cols = ['id', 'automated', 'all', 'percent [%]', 'progress']
441441
pt = PrettyTable(test_id_cols)
@@ -512,6 +512,10 @@ def progress_bar(percent_progress, saturation=0):
512512
action="store_true",
513513
help='Test only peripheral declared for MUT and skip common tests')
514514

515+
parser.add_option('-n', '--test-by-names',
516+
dest='test_by_names',
517+
help='Runs only test enumerated it this switch')
518+
515519
parser.add_option('-v', '--verbose',
516520
dest='verbose',
517521
default=False,
@@ -564,6 +568,9 @@ def progress_bar(percent_progress, saturation=0):
564568
build_dir = join(BUILD_DIR, "test", target, toolchain)
565569

566570
for test_id, test in TEST_MAP.iteritems():
571+
if opts.test_by_names and test_id not in opts.test_by_names.split(','):
572+
continue
573+
567574
if test_ids and test_id not in test_ids:
568575
continue
569576

0 commit comments

Comments
 (0)