diff options
Diffstat (limited to 'utils/test/scripts/conf_utils.py')
-rw-r--r-- | utils/test/scripts/conf_utils.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/utils/test/scripts/conf_utils.py b/utils/test/scripts/conf_utils.py new file mode 100644 index 000000000..e35d5ed10 --- /dev/null +++ b/utils/test/scripts/conf_utils.py @@ -0,0 +1,20 @@ +import yaml + + +with open('./testcases.yaml') as f: + testcases_yaml = yaml.safe_load(f) +f.close() + + +def get_format(project, case): + testcases = testcases_yaml.get(project) + if isinstance(testcases, list): + for case_dict in testcases: + if case_dict['name'] == case: + return 'format_' + case_dict['format'].strip() + return None + + +if __name__ == '__main__': + fmt = get_format('functest', 'vping_ssh') + print fmt
\ No newline at end of file |