aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur She <arthur.she@linaro.org>2016-03-08 15:49:08 +0700
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2016-03-11 17:01:17 +0000
commit53716cee6493af65bce534510eb0143120568a92 (patch)
treecc9bc3ec5fa64b2d2143b81404f5a4ee275a2af9
parentb7589f8f71c638cc5587c159f8850301208f54f4 (diff)
Fix issue. While the test job is finished OK, but didn't produce any
result bundle. Change-Id: Ia776263f26b45721aa8539765e357c7b961e72dd
-rwxr-xr-xreport_automation.py23
1 files changed, 14 insertions, 9 deletions
diff --git a/report_automation.py b/report_automation.py
index 5fa80ac..10ecf0f 100755
--- a/report_automation.py
+++ b/report_automation.py
@@ -92,16 +92,21 @@ class LAVA(object):
job_detail = self.server.scheduler.job_details(job_no)
job_info['job_no'] = job_no
job_info['result_link'] = job_detail['_results_link']
- job_info['result_bundle'] = json.loads(self.server.dashboard.get(job_status['bundle_sha1'])['content'])
- if any(t['test_id'] == 'busybox' for t in job_info['result_bundle']['test_runs']):
- 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' or t['test_id'] == 'wa2-host-postprocessing'
- for t in job_info['result_bundle']['test_runs']):
- job_info['type'] = "benchmark"
+ try:
+ job_info['result_bundle'] = json.loads(self.server.dashboard.get(job_status['bundle_sha1'])['content'])
+ except:
+ logger.warning("Can not get job #%s's result bundle" % job_no)
+ job_info = {}
else:
- job_info['type'] = "other"
+ if any(t['test_id'] == 'busybox' for t in job_info['result_bundle']['test_runs']):
+ 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' 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"
return job_info