Call system.exit if we run non existing group

Change-Id: I2448d824a0d3f052720dc9e495b44239a699fb67
Closes-Bug: #1545727
This commit is contained in:
Tatyana Leontovich 2016-02-16 13:33:55 +02:00
parent 5053d23c4c
commit e8eae3dc0e
1 changed files with 3 additions and 1 deletions

View File

@ -126,6 +126,9 @@ def run(**kwargs):
else:
register_system_test_cases(groups=[g])
groups_to_run.append(g)
if not set(groups_to_run) < set(get_groups()):
sys.exit('There are no cases mapped to current group, '
'please be sure that you put right test group name.')
if explain:
print_explain(groups)
else:
@ -143,7 +146,6 @@ def explain_group(**kwargs):
def show_all_groups(**kwargs):
"""Show all Proboscis groups"""
groups_nums = get_groups()
out = {k: len(v) for k, v in groups_nums.iteritems()}
print(pretty_log(out))