lava_rpc_connector: Deduce job info "description" field for the Tux case
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: I762f1fc3e73815643a1df8ccc3fc2d3bd0b2f758
diff --git a/tfm_ci_pylib/lava_rpc_connector.py b/tfm_ci_pylib/lava_rpc_connector.py
index 1234ce6..f9547e5 100644
--- a/tfm_ci_pylib/lava_rpc_connector.py
+++ b/tfm_ci_pylib/lava_rpc_connector.py
@@ -168,6 +168,10 @@
# the rest of code.
job_info["state"] = job_info["state"].capitalize()
job_info["health"] = {"pass": "Complete"}.get(job_info["result"], job_info["result"])
+ # There's no "job_name" aka "description" in Tux data, but we utilize
+ # the fact that it's included in the original name of the job definition
+ # file, that info included in the Tux data.
+ job_info["description"] = job_info["extra"]["job_definition"].split("/", 1)[1].split(".", 1)[0]
return job_info
job_info = self.scheduler.jobs.show(job_id)