diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-27 17:05:29 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-27 18:04:14 +0000 |
commit | f11237c0aacd127f6c2705dc869771dae75229f6 (patch) | |
tree | c552097a183c9d63c4fe14dcddcd647b057eb218 /scripts | |
parent | 43f793b78d64f08aa1a74d5d4fe54471c29646b9 (diff) | |
download | poky-f11237c0aacd127f6c2705dc869771dae75229f6.tar.gz |
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: 58268151704246a81ec8dae46c26346023057554)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/resulttool/report.py | 13 |
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': []} |