Commit 3f917e5d authored by Mylène Josserand's avatar Mylène Josserand Committed by Guillaume Tucker
Browse files

boot: depthcharge: Handle timeout as Infrastucture error

Handle the timeout of depthcharge as an Infrastucture error
and not an job error.

Applied-Upstream: 2020.09, 1e21b3e1



Signed-off-by: Mylène Josserand's avatarMylène Josserand <mylene.josserand@collabora.com>
parent a6aaf9f6
......@@ -21,8 +21,12 @@
import os.path
from lava_common.exceptions import ConfigurationError
from lava_common.exceptions import (
ConfigurationError,
InfrastructureError,
)
from lava_dispatcher.action import Action, Pipeline
from lava_common.timeout import Timeout
from lava_dispatcher.actions.boot import (
AutoLoginAction,
BootAction,
......@@ -30,6 +34,7 @@ from lava_dispatcher.actions.boot import (
BootloaderCommandsAction,
OverlayUnpack,
)
from lava_common.constants import BOOTLOADER_DEFAULT_CMD_TIMEOUT
from lava_dispatcher.actions.boot.environment import ExportDeviceEnvironment
from lava_dispatcher.connections.serial import ConnectDevice
from lava_dispatcher.logical import Boot
......@@ -210,10 +215,14 @@ class DepthchargeStart(Action):
name = "depthcharge-start"
description = "wait for Depthcharge to start"
summary = "Depthcharge start"
timeout_exception = InfrastructureError
def __init__(self):
super().__init__()
self.start_message = None
self.timeout = Timeout(
self.name, BOOTLOADER_DEFAULT_CMD_TIMEOUT, exception=self.timeout_exception
)
def validate(self):
super().validate()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment