diff options
-rw-r--r-- | py3o_report_juno_template.odt | bin | 24244 -> 24318 bytes | |||
-rwxr-xr-x | report_automation.py | 45 |
2 files changed, 33 insertions, 12 deletions
diff --git a/py3o_report_juno_template.odt b/py3o_report_juno_template.odt Binary files differindex a217422..463ba08 100644 --- a/py3o_report_juno_template.odt +++ b/py3o_report_juno_template.odt diff --git a/report_automation.py b/report_automation.py index 6078047..f867feb 100755 --- a/report_automation.py +++ b/report_automation.py @@ -88,16 +88,28 @@ class Report(object): self.firmware_version = "3.11" self.android_version = "5.1.1 Lollipop" self.kernel_version = "4.10.79" - self.cts_tests = [] -# self.cts_tests = [ -# {"package_name": "android.app", -# "total": 100, -# "passed": 90, -# "failed": 5, -# "skipped": 5, -# "pass_rate": 85 -# } -# ] + self.cts_tests = {} + self.cts_tests['total_pkgs'] = 0 + self.cts_tests['total_passed'] = 0 + self.cts_tests['total_failed'] = 0 + self.cts_tests['total_skipped'] = 0 + self.cts_tests['total_pass_rate'] = 0 + self.cts_tests['test_pkgs'] = [] +# self.cts_tests = { +# "total_pkgs": 2000, +# "total_passed": 1950, +# "total_failed": 50, +# "total_pass_rate": 98, +# test_pkgs: [ +# {"package_name": "android.app", +# "total": 100, +# "passed": 90, +# "failed": 5, +# "skipped": 5, +# "pass_rate": 85 +# } +# ] +# } self.lava_tests = {} # self.lava_tests = { # "result_link": "RESULT BUNDLE URL", @@ -224,12 +236,21 @@ class Report(object): cts_test['failed'] = len(pkg.findall(".//Test[@result='fail']")) cts_test['skipped'] = len(pkg.findall(".//Test[@result='skip']")) cts_test['pass_rate'] = 100 * cts_test['passed']/cts_test['total'] - self.cts_tests.append(cts_test) + self.cts_tests['test_pkgs'].append(cts_test) shutil.rmtree(CTS_TEST_RESULT_DIR) def to_dict(self): + # Calculate numbers of CTS tests + for pkg in self.cts_tests['test_pkgs']: + self.cts_tests['total_pkgs'] += pkg['total'] + self.cts_tests['total_passed'] += pkg['passed'] + self.cts_tests['total_failed'] += pkg['failed'] + self.cts_tests['total_skipped'] += pkg['skipped'] + if self.cts_tests['total_passed'] != 0: + self.cts_tests['total_pass_rate'] = 100 * self.cts_tests['total_passed']/self.cts_tests['total_pkgs'] + return { "kernel_version" : self.kernel_version, "compiler_version" : self.compiler_version, @@ -257,7 +278,7 @@ if __name__ == '__main__': parser.add_argument("-a", "--manual_lava_jobs", nargs = '+', help="Specify the test jobs that were submitted manually") parser.add_argument("-d", "--exclude_lava_jobs", nargs = '+', - help="Specify the test jobs that wouldn't be included in the report") + help="Specify the test jobs that don't want to be included in the report") args = parser.parse_args() |