=== modified file 'lava_dispatcher/device/master.py'
@@ -83,7 +83,7 @@
if config.pre_connect_command:
self.context.run_command(config.pre_connect_command)
- self.proc = connect_to_serial(self.context)
+ self.proc = connect_to_serial(self.context, config)
def get_device_version(self):
return self.device_version
=== modified file 'lava_dispatcher/device/sdmux.py'
@@ -221,7 +221,7 @@
self.context.run_command(self.config.power_off_cmd)
def power_on(self):
- self.proc = connect_to_serial(self.context)
+ self.proc = connect_to_serial(self.context, self.config)
logging.info('powering on')
self.context.run_command(self.config.power_on_cmd)
=== modified file 'lava_dispatcher/utils.py'
@@ -214,7 +214,7 @@
timeout=1, lava_no_logging=1)
-def connect_to_serial(context):
+def connect_to_serial(context, config):
"""
Attempts to connect to a serial console server like conmux or cyclades
"""
@@ -238,7 +238,7 @@
while retry_count < retry_limit:
proc = context.spawn(
- context.client.config.connection_command,
+ config.connection_command,
timeout=1200)
logging.info('Attempting to connect to device')
match = proc.expect(patterns, timeout=10)
@@ -253,7 +253,7 @@
atexit.register(proc.close, True)
return proc
elif result == 'reset-port':
- reset_cmd = context.client.config.reset_port_command
+ reset_cmd = config.reset_port_command
if reset_cmd:
context.run_command(reset_cmd)
else: