Updating lava_helper to use latest states
scheduler.job_state returns "Finished" instead of "Complete" for
LAVA job completion. Now using scheduler.job_health to give us
the details on whether this job completed.
Change-Id: I1234c35756f425e6f225cdfd4e8a7098363422d7
diff --git a/tfm_ci_pylib/lava_rpc_connector.py b/tfm_ci_pylib/lava_rpc_connector.py
index b6d86ce..4006c45 100644
--- a/tfm_ci_pylib/lava_rpc_connector.py
+++ b/tfm_ci_pylib/lava_rpc_connector.py
@@ -138,11 +138,11 @@
# Check if the job is not running
cur_status = self.get_job_state(job_id)
# If in queue or running wait
- if cur_status == "Running" or cur_status == "Submitted":
+ if cur_status not in ["Canceling","Finished"]:
time.sleep(poll_freq)
else:
break
- return self.get_job_state(job_id)
+ return self.scheduler.job_health(job_id)["job_health"]
def test_credentials(self):
""" Attempt to querry the back-end and verify that the user provided