[oe-commits] [openembedded-core] 07/09: resulttool/report: Ensure test suites with no results show up on the report
git at git.openembedded.org
git at git.openembedded.org
Wed Feb 27 18:07:21 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit 58268151704246a81ec8dae46c26346023057554
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Feb 27 17:05:29 2019 +0000
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.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
scripts/lib/resulttool/report.py | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/scripts/lib/resulttool/report.py b/scripts/lib/resulttool/report.py
index 5ffe262..ff1b32c 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': []}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list