From 73c1d4bc4fa0f60708012e8620d5f279c4787d3f Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Tue, 10 Jan 2017 14:10:09 -0500 Subject: [PATCH] Lava: Fetching the results bundle should be done only on successful jobs Signed-off-by: Francis Deslauriers --- scripts/lttng-baremetal-tests/lava-submit.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/lttng-baremetal-tests/lava-submit.py b/scripts/lttng-baremetal-tests/lava-submit.py index 5566e8a..e4fbc7f 100644 --- a/scripts/lttng-baremetal-tests/lava-submit.py +++ b/scripts/lttng-baremetal-tests/lava-submit.py @@ -411,8 +411,6 @@ def main(): time.sleep(30) jobstatus = server.scheduler.job_status(jobid)['job_status'] - passed, failed=check_job_all_test_cases_state_count(server, jobid) - if test_type is TestType.kvm_tests or test_type is TestType.baremetal_tests: print_test_output(server, jobid) elif test_type is TestType.baremetal_benchmarks: @@ -422,12 +420,13 @@ def main(): if jobstatus not in 'Complete': return -1 else: + passed, failed=check_job_all_test_cases_state_count(server, jobid) print('With {} passed and {} failed Lava test cases.'.format(passed, failed)) - if failed == 0: - return 0 - else: - return -1 + if failed == 0: + return 0 + else: + return -1 if __name__ == "__main__": sys.exit(main()) -- 2.34.1