summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/resulttool/report.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/lib/resulttool/report.py b/scripts/lib/resulttool/report.py
index 5ffe262f89..ff1b32c770 100644
--- a/scripts/lib/resulttool/report.py
+++ b/scripts/lib/resulttool/report.py
@@ -30,6 +30,14 @@ class ResultsTextReport(object):
30 30
31 def handle_ptest_result(self, k, status, result): 31 def handle_ptest_result(self, k, status, result):
32 if k == 'ptestresult.sections': 32 if k == 'ptestresult.sections':
33 # Ensure tests without any test results still show up on the report
34 for suite in result['ptestresult.sections']:
35 if suite not in self.ptests:
36 self.ptests[suite] = {'passed': 0, 'failed': 0, 'skipped': 0, 'duration' : '-', 'failed_testcases': []}
37 if 'duration' in result['ptestresult.sections'][suite]:
38 self.ptests[suite]['duration'] = result['ptestresult.sections'][suite]['duration']
39 if 'timeout' in result['ptestresult.sections'][suite]:
40 self.ptests[suite]['duration'] += " T"
33 return 41 return
34 try: 42 try:
35 _, suite, test = k.split(".", 2) 43 _, suite, test = k.split(".", 2)
@@ -48,11 +56,6 @@ class ResultsTextReport(object):
48 for tk in self.result_types: 56 for tk in self.result_types:
49 if status in self.result_types[tk]: 57 if status in self.result_types[tk]:
50 self.ptests[suite][tk] += 1 58 self.ptests[suite][tk] += 1
51 if 'ptestresult.sections' in result and suite in result['ptestresult.sections']:
52 if 'duration' in result['ptestresult.sections'][suite]:
53 self.ptests[suite]['duration'] = result['ptestresult.sections'][suite]['duration']
54 if 'timeout' in result['ptestresult.sections'][suite]:
55 self.ptests[suite]['duration'] += " T"
56 59
57 def get_aggregated_test_result(self, logger, testresult): 60 def get_aggregated_test_result(self, logger, testresult):
58 test_count_report = {'passed': 0, 'failed': 0, 'skipped': 0, 'failed_testcases': []} 61 test_count_report = {'passed': 0, 'failed': 0, 'skipped': 0, 'failed_testcases': []}