summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxudan <xudan16@huawei.com>2017-12-13 02:00:34 -0500
committerLeo wang <grakiss.wanglei@huawei.com>2017-12-25 01:55:03 +0000
commite7912589acafa0ca4e456396c6bc5301aee496fc (patch)
tree02ed00c2e511d8848ed6572d6f85562dfe7f5102
parent6c1edfb5272e5f3fb05e28d100dda25fd6320423 (diff)
[Bugfix] Local summary with wrong results when Tempest failed at the SetupClass
When Tempest test cases failed at the SetupClass, the record is the class name of the test cases rather than the name of the test cases. The local summary will say they are passed wrongly. JIRA: DOVETAIL-575 Change-Id: Iec879378770017eddd37e9a99346d980355bb6e2 Signed-off-by: xudan <xudan16@huawei.com> (cherry picked from commit cb03da10feb8af4cd48add8ab96b134f6d6ebd1c)
-rw-r--r--dovetail/report.py25
1 files changed, 14 insertions, 11 deletions
diff --git a/dovetail/report.py b/dovetail/report.py
index 12d6dcad..39326b98 100644
--- a/dovetail/report.py
+++ b/dovetail/report.py
@@ -274,10 +274,12 @@ class FunctestCrawler(object):
if complex_testcase:
tests = data['details']['tests']
failed_num = data['details']['failures']
+ success_case = data['details']['success']
error_case = data['details']['errors']
skipped_case = data['details']['skipped']
details = {"tests": tests,
"failures": failed_num,
+ "success": success_case,
"errors": error_case,
"skipped": skipped_case}
except KeyError as e:
@@ -456,6 +458,13 @@ class FunctestChecker(object):
@staticmethod
def get_sub_testcase(sub_testcase, result):
+ # This adaption is because of the danube bug of Functest.
+ # Has been fixed in Euphrates.
+ # Patch link https://gerrit.opnfv.org/gerrit/#/c/47897/
+ if sub_testcase == "tempest.api.identity.v3.test_tokens." \
+ "TokensV3Test.test_create_token":
+ sub_testcase = "tempest.api.identity.v3.test_t"
+
if not result:
return False
sub_testcase = re.sub("\[.*?\]", "", sub_testcase)
@@ -487,30 +496,24 @@ class FunctestChecker(object):
if sub_testcase_list is None:
return
- testcase_passed = 'SKIP'
+ testcase_passed = 'PASS'
for sub_testcase in sub_testcase_list:
self.logger.debug('Check sub_testcase: {}'.format(sub_testcase))
try:
if self.get_sub_testcase(sub_testcase,
- db_result['details']['errors']):
- testcase.sub_testcase_passed(sub_testcase, 'FAIL')
- testcase_passed = 'FAIL'
+ db_result['details']['success']):
+ testcase.sub_testcase_passed(sub_testcase, 'PASS')
continue
if self.get_sub_testcase(sub_testcase,
db_result['details']['skipped']):
testcase.sub_testcase_passed(sub_testcase, 'SKIP')
else:
- testcase.sub_testcase_passed(sub_testcase, 'PASS')
+ testcase.sub_testcase_passed(sub_testcase, 'FAIL')
+ testcase_passed = 'FAIL'
except KeyError:
testcase.sub_testcase_passed(sub_testcase, 'FAIL')
testcase_passed = 'FAIL'
- if testcase_passed == 'SKIP':
- for sub_testcase in sub_testcase_list:
- if testcase.sub_testcase_status[sub_testcase] == 'PASS':
- testcase_passed = 'PASS'
- break
-
testcase.passed(testcase_passed)