ci/lava: set exit code in exception case

Set exit_code to 1 in case of an exception; otherwise,
the job exits with 0, and GitLab shows the job as successful.

Fixes: b9cee06f9e ("ci/lava: handle non-zero exit codes")
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31556>
This commit is contained in:
Vignesh Raman
2024-10-08 12:00:31 +05:30
committed by Marge Bot
parent 59d909eb56
commit d43fec5da9

View File

@@ -183,6 +183,9 @@ class LAVAJob:
self.cancel()
self.exception = exception
# Set the exit code to nonzero value
self.exit_code = 1
# Give more accurate status depending on exception
if isinstance(exception, MesaCIKnownIssueException):
self.status = "canceled"