1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-05 19:35:48 +03:00

analyze_outcomes: exit immediately in case of invalid task

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
Valerio Setti
2023-10-17 10:11:45 +02:00
parent 5329ff06b9
commit fb2750e98e

View File

@@ -688,14 +688,14 @@ def main():
tasks_list = re.split(r'[, ]+', options.specified_tasks) tasks_list = re.split(r'[, ]+', options.specified_tasks)
for task in tasks_list: for task in tasks_list:
if task not in KNOWN_TASKS: if task not in KNOWN_TASKS:
main_log.error('invalid task: {}'.format(task)) sys.stderr.write('invalid task: {}'.format(task))
sys.exit(2)
KNOWN_TASKS['analyze_coverage']['args']['full_coverage'] = options.full_coverage KNOWN_TASKS['analyze_coverage']['args']['full_coverage'] = options.full_coverage
all_succeeded = True all_succeeded = True
for task in KNOWN_TASKS: for task in tasks_list:
if task in tasks_list:
test_function = KNOWN_TASKS[task]['test_function'] test_function = KNOWN_TASKS[task]['test_function']
test_args = KNOWN_TASKS[task]['args'] test_args = KNOWN_TASKS[task]['args']
test_log = test_function(options.outcomes, test_args) test_log = test_function(options.outcomes, test_args)