summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-27 17:05:29 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-03-26 15:38:23 +0000
commit19a3f1ba470c38c4bb18f01efd01673f063b002f (patch)
tree6d87d14f1228fed8c1a3a3e0414f6a44cdc9b8bc /scripts
parent4b5686a0fd220fd97bb7a205d746f27cb8d21ce2 (diff)
downloadpoky-19a3f1ba470c38c4bb18f01efd01673f063b002f.tar.gz
poky-19a3f1ba470c38c4bb18f01efd01673f063b002f.tar.bz2
poky-19a3f1ba470c38c4bb18f01efd01673f063b002f.zip
resulttool/report: Ensure test suites with no results show up on the report
ptest suites with no results don't show up on the reports even though we have a duration for them. Fix this so the fact they report no tests is visible. (From OE-Core rev: eb67a3cc4f8f57e85f1f95ced8f2c32ab5090866) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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):
def handle_ptest_result(self, k, status, result):
if k == 'ptestresult.sections':
+ # Ensure tests without any test results still show up on the report
+ for suite in result['ptestresult.sections']:
+ if suite not in self.ptests:
+ self.ptests[suite] = {'passed': 0, 'failed': 0, 'skipped': 0, 'duration' : '-', 'failed_testcases': []}
+ if 'duration' in result['ptestresult.sections'][suite]:
+ self.ptests[suite]['duration'] = result['ptestresult.sections'][suite]['duration']
+ if 'timeout' in result['ptestresult.sections'][suite]:
+ self.ptests[suite]['duration'] += " T"
return
try:
_, suite, test = k.split(".", 2)
@@ -48,11 +56,6 @@ class ResultsTextReport(object):
for tk in self.result_types:
if status in self.result_types[tk]:
self.ptests[suite][tk] += 1
- if 'ptestresult.sections' in result and suite in result['ptestresult.sections']:
- if 'duration' in result['ptestresult.sections'][suite]:
- self.ptests[suite]['duration'] = result['ptestresult.sections'][suite]['duration']
- if 'timeout' in result['ptestresult.sections'][suite]:
- self.ptests[suite]['duration'] += " T"
def get_aggregated_test_result(self, logger, testresult):
test_count_report = {'passed': 0, 'failed': 0, 'skipped': 0, 'failed_testcases': []}