From 534a243d391ab93aa208563ff87f75550ed028c3 Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Fri, 2 Dec 2016 09:35:34 -0500 Subject: [PATCH] Lava: Handle results bundle download error Signed-off-by: Francis Deslauriers --- scripts/lttng-baremetal-tests/lava-submit.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/lttng-baremetal-tests/lava-submit.py b/scripts/lttng-baremetal-tests/lava-submit.py index 4e67b4b..7669b1c 100644 --- a/scripts/lttng-baremetal-tests/lava-submit.py +++ b/scripts/lttng-baremetal-tests/lava-submit.py @@ -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)) -- 2.34.1