diff options
author | Dan Xu <xudan16@huawei.com> | 2018-09-05 06:48:40 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-09-05 06:48:40 +0000 |
commit | 11524e93a98ba3e72140f1ed4e6474d449874c59 (patch) | |
tree | 30b16bef332431cf95b324c8026ea2b21e0047a5 | |
parent | 6589667277b4c0a8922c6749f5fb7cf83a776781 (diff) | |
parent | 733c2f23838be6d13ff6c751faea1bfbf98b3161 (diff) |
Merge "Gen-test-cases tool: Print total number of test cases"
-rwxr-xr-x | utils/generate-testcase-list/generate-testcases-list.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/generate-testcase-list/generate-testcases-list.py b/utils/generate-testcase-list/generate-testcases-list.py index bafd329..5bfaa2f 100755 --- a/utils/generate-testcase-list/generate-testcases-list.py +++ b/utils/generate-testcase-list/generate-testcases-list.py @@ -71,6 +71,7 @@ class TestcaseList: } for area in ['mandatory', 'optional']: + total_per_area = 0 testcase_names = testsuite_data.values()[0]['testcases_list'][area] for name in testcase_names: tc = { @@ -87,8 +88,12 @@ class TestcaseList: tc['cases'] = cases tc['total'] = len(cases) + total_per_area += tc['total'] testcase_list[area][name] = tc + print "Total number of test cases in area {}: {}".format( + area, total_per_area) + output_file = os.path.join(self.output_dir, 'testcases.json') with open(output_file, 'w') as file: json.dump(testcase_list, file, indent=4, sort_keys=True) |