Lava: Fix the name of Jenkins Lava key
[lttng-ci.git] / scripts / lttng-baremetal-tests / lava-submit.py
index 5566e8a486f44bbb4bdade98e9ddd38068b2d745..cfd73b4fda3a9efed02b0f0caad08c8ce9ede97b 100644 (file)
@@ -354,9 +354,9 @@ def main():
 
     lava_api_key = None
     try:
-        lava_api_key = os.environ['LAVA_FRDESO_TOKEN']
+        lava_api_key = os.environ['LAVA_JENKINS_TOKEN']
     except Exception as e:
-        print('LAVA_FRDESO_TOKEN not found in the environment variable. Exiting...', e )
+        print('LAVA_JENKINS_TOKEN not found in the environment variable. Exiting...', e )
         return -1
 
     if test_type is TestType.baremetal_benchmarks:
@@ -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())
This page took 0.024322 seconds and 4 git commands to generate.