diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-27 17:05:29 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-03-26 15:38:23 +0000 |
| commit | 19a3f1ba470c38c4bb18f01efd01673f063b002f (patch) | |
| tree | 6d87d14f1228fed8c1a3a3e0414f6a44cdc9b8bc /scripts/lib | |
| parent | 4b5686a0fd220fd97bb7a205d746f27cb8d21ce2 (diff) | |
| download | poky-19a3f1ba470c38c4bb18f01efd01673f063b002f.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: eb67a3cc4f8f57e85f1f95ced8f2c32ab5090866)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
| -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': []} |
