aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur She <arthur.she@linaro.org>2015-10-05 21:19:41 -0700
committerArthur She <arthur.she@linaro.org>2015-10-05 21:19:41 -0700
commit7c3752d50b921462e1441370be1ace50690adddd (patch)
tree33e5eff13eefff11db59c6ceb58ab614c1bcfb68
parent0a3f1e55af3d3b5efbf99c8e2e0b5493753c17fb (diff)
Modify parse_benchmark_test() for WA tests
modified: report_automation.py
-rwxr-xr-xreport_automation.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/report_automation.py b/report_automation.py
index c0de257..f427283 100755
--- a/report_automation.py
+++ b/report_automation.py
@@ -74,7 +74,8 @@ class LAVA(object):
job_info['type'] = "lava_test"
elif any(t['test_id'] == 'cts-host' for t in job_info['result_bundle']['test_runs']):
job_info['type'] = "cts"
- elif any(t['test_id'] == 'lava-android-benchmark-target' for t in job_info['result_bundle']['test_runs']):
+ elif any(t['test_id'] == 'lava-android-benchmark-target' or t['test_id'] == 'wa2-host-postprocessing'
+ for t in job_info['result_bundle']['test_runs']):
job_info['type'] = "benchmark"
else:
job_info['type'] = "other"
@@ -174,20 +175,22 @@ class Report(object):
lava_tests['test_cases'].append(test_case)
self.lava_tests = lava_tests
-# return lava_tests
-
def parse_benchmark_test(self, job_info):
print("Parsing benchmark test job #%s" % job_info['job_no'])
benchmark_test = {}
sub_tests = []
try:
test_run = (t for t in job_info['result_bundle']['test_runs']
- if t['test_id'] == 'lava-android-benchmark-host').next()
- src = (s for s in test_run['software_context']['sources'] if 'test_params' in s).next()
+ if t['test_id'] == 'lava-android-benchmark-host' or
+ t['test_id'] == 'wa2-host-postprocessing').next()
+ src = (s for s in test_run['software_context']['sources'] if 'test_params' in s).next()
except Exception as e:
print("Job %s seems not be a completed job." % job_info['job_no'])
print e
- benchmark_test['test_id'] = ast.literal_eval(src['test_params'])['TEST_NAME']
+ if test_run['test_id'] == 'lava-android-benchmark-host':
+ benchmark_test['test_id'] = ast.literal_eval(src['test_params'])['TEST_NAME']
+ else:
+ benchmark_test['test_id'] = ast.literal_eval(src['test_params'])['JOB_NAME']
benchmark_test['result_link'] = job_info['result_link']
for test in test_run['test_results']:
if not str(test['test_case_id']).startswith('lava-test-shell'):
@@ -241,7 +244,6 @@ class Report(object):
shutil.rmtree(CTS_TEST_RESULT_DIR)
-
def to_dict(self):
# Calculate numbers of CTS tests
for pkg in self.cts_tests['test_pkgs']:
@@ -291,6 +293,9 @@ if __name__ == '__main__':
# Query test job IDs
test_job_ids = []
test_job_ids = jenkins.get_test_job_ids(args.build_no)
+ if not test_job_ids:
+ print("There is no test jobs in this build!")
+ exit(-1)
print("Get the test job IDs:")
if args.exclude_lava_jobs:
test_job_ids = [id for id in test_job_ids if id not in args.exclude_lava_jobs]