Lava: Handle results bundle download error
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 2 Dec 2016 14:35:34 +0000 (09:35 -0500)
committerFrancis Deslauriers <francis.deslauriers@efficios.com>
Sat, 10 Dec 2016 23:56:42 +0000 (18:56 -0500)
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
scripts/lttng-baremetal-tests/lava-submit.py

index 4e67b4b9a8beb0111fe69a13a92211d6f0916103..7669b1ce6262b992bce955f4084058d57d54f570 100644 (file)
@@ -34,8 +34,11 @@ class TestType(Enum):
     kvm_tests=3
 
 def get_job_bundle_content(server, job):
-    bundle_sha = server.scheduler.job_status(str(job))['bundle_sha1']
-    bundle = server.dashboard.get(bundle_sha)
+    try:
+        bundle_sha = server.scheduler.job_status(str(job))['bundle_sha1']
+        bundle = server.dashboard.get(bundle_sha)
+    except Fault as f:
+        print 'Error while fetching results bundle', f
 
     return json.loads(bundle['content'])
 
@@ -375,7 +378,7 @@ def main():
 
     passed, failed=check_job_all_test_cases_state_count(server, jobid)
 
-    if test_type is TestType.kvm_tests:
+    if test_type is TestType.kvm_tests or test_type is TestType.baremetal_tests:
         print_test_output(server, jobid)
 
     print('Job ended with {} status.'.format(jobstatus))
This page took 0.023472 seconds and 4 git commands to generate.