aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur She <arthur.she@linaro.org>2015-10-05 11:38:15 -0700
committerArthur She <arthur.she@linaro.org>2015-10-05 11:38:15 -0700
commit864bf2b8d0eb8781b87357f84d22e46c24c2765a (patch)
tree90db0dcb4fb4bbbe6fd3fb8d757143f439590950
parent396532b0f511fb7f8f4895ee32a70942c0faccfd (diff)
Calculate CTS test numbers
modified: py3o_report_juno_template.odt modified: report_automation.py
-rw-r--r--py3o_report_juno_template.odtbin24244 -> 24318 bytes
-rwxr-xr-xreport_automation.py45
2 files changed, 33 insertions, 12 deletions
diff --git a/py3o_report_juno_template.odt b/py3o_report_juno_template.odt
index a217422..463ba08 100644
--- a/py3o_report_juno_template.odt
+++ b/py3o_report_juno_template.odt
Binary files differ
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()