mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-12-04 07:34:15 +08:00
11a97b644c
Some refactoring was needed to make LAVAJobSubmitter class testable via pytest. Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22500>
30 lines
746 B
Python
30 lines
746 B
Python
from datetime import timedelta
|
|
|
|
|
|
class MesaCIException(Exception):
|
|
pass
|
|
|
|
|
|
class MesaCITimeoutError(MesaCIException):
|
|
def __init__(self, *args, timeout_duration: timedelta) -> None:
|
|
super().__init__(*args)
|
|
self.timeout_duration = timeout_duration
|
|
|
|
|
|
class MesaCIRetryError(MesaCIException):
|
|
def __init__(self, *args, retry_count: int, last_job: None) -> None:
|
|
super().__init__(*args)
|
|
self.retry_count = retry_count
|
|
self.last_job = last_job
|
|
|
|
|
|
class MesaCIParseException(MesaCIException):
|
|
pass
|
|
|
|
|
|
class MesaCIKnownIssueException(MesaCIException):
|
|
"""Exception raised when the Mesa CI script finds something in the logs that
|
|
is known to cause the LAVA job to eventually fail"""
|
|
|
|
pass
|