...
 
Commits (2)
......@@ -79,3 +79,49 @@ class MinimalBoot(BootAction):
connection = super().run(connection, max_end_time)
self.set_namespace_data(action='shared', label='shared', key='connection', value=connection)
return connection
class MinimalLogin(Boot):
compatibility = 1
def __init__(self, parent, parameters):
super().__init__(parent)
self.action = MinimalLoginAction()
self.action.section = self.action_type
self.action.job = self.job
parent.add_action(self.action, parameters)
@classmethod
def accepts(cls, device, parameters):
if 'minimallogin' not in device['actions']['boot']['methods']:
return False, '"minimal" was not in device configuration boot methods'
if 'method' not in parameters:
return False, '"method" was not in parameters'
if parameters['method'] != 'minimallogin':
return False, '"method" was not "minimallogin"'
return True, 'accepted'
class MinimalLoginAction(BootAction):
name = 'minimal-login'
description = "wait for the login"
summary = "wait for the login"
def populate(self, parameters):
self.internal_pipeline = Pipeline(parent=self, job=self.job, parameters=parameters)
self.internal_pipeline.add_action(ConnectDevice())
if self.has_prompts(parameters):
self.internal_pipeline.add_action(AutoLoginAction())
if self.test_has_shell(parameters):
self.internal_pipeline.add_action(ExpectShellSession())
if 'transfer_overlay' in parameters:
self.internal_pipeline.add_action(OverlayUnpack())
self.internal_pipeline.add_action(ExportDeviceEnvironment())
def run(self, connection, max_end_time):
connection = self.get_namespace_data(
action='shared', label='shared', key='connection', deepcopy=False)
connection = super().run(connection, max_end_time)
self.set_namespace_data(action='shared', label='shared', key='connection', value=connection)
return connection
......@@ -283,7 +283,7 @@ class Command(LAVADaemonCommand):
filename = os.path.join(job.output_dir, 'description.yaml')
# If description.yaml already exists: a END was already received
if os.path.exists(filename):
if os.path.exists(filename) and job.state == TestJob.STATE_FINISHED:
self.logger.info("[%d] %s => END (duplicated), skipping", job_id, hostname)
else:
if compressed_description:
......