Merge lp:~nick-schutt/lava-dispatcher/nick-1130814 into lp:lava-dispatcher

Proposed by Nicholas Schutt
Status: Merged
Merged at revision: 568
Proposed branch: lp:~nick-schutt/lava-dispatcher/nick-1130814
Merge into: lp:lava-dispatcher
Diff against target: 440 lines (+67/-62)
9 files modified
lava_dispatcher/actions/lava_android_test.py (+4/-5)
lava_dispatcher/client/lmc_utils.py (+7/-7)
lava_dispatcher/context.py (+24/-1)
lava_dispatcher/device/fastmodel.py (+5/-10)
lava_dispatcher/device/master.py (+3/-3)
lava_dispatcher/device/nexus.py (+6/-13)
lava_dispatcher/device/qemu.py (+1/-5)
lava_dispatcher/device/sdmux.py (+9/-11)
lava_dispatcher/utils.py (+8/-7)
To merge this branch: bzr merge lp:~nick-schutt/lava-dispatcher/nick-1130814
Reviewer Review Type Date Requested Status
Linaro Validation Team Pending
Review via email: mp+152326@code.launchpad.net

Description of the change

Ignore the number in the branch name; it's for bug #1127288

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lava_dispatcher/actions/lava_android_test.py'
--- lava_dispatcher/actions/lava_android_test.py 2012-11-22 02:14:51 +0000
+++ lava_dispatcher/actions/lava_android_test.py 2013-03-08 06:44:20 +0000
@@ -20,7 +20,6 @@
20# along with this program; if not, see <http://www.gnu.org/licenses>.20# along with this program; if not, see <http://www.gnu.org/licenses>.
2121
22import os22import os
23import subprocess
24import logging23import logging
25from lava_dispatcher.actions import BaseAction24from lava_dispatcher.actions import BaseAction
26from lava_dispatcher.errors import OperationFailed, TimeoutError25from lava_dispatcher.errors import OperationFailed, TimeoutError
@@ -69,7 +68,7 @@
69 t = DrainConsoleOutput(proc=session._connection, timeout=timeout)68 t = DrainConsoleOutput(proc=session._connection, timeout=timeout)
70 t.start()69 t.start()
71 logging.info("Execute command on host: %s" % (' '.join(cmds)))70 logging.info("Execute command on host: %s" % (' '.join(cmds)))
72 rc = subprocess.call(cmds)71 rc = self.context.run_command(cmds)
73 t.join()72 t.join()
74 if rc == 124:73 if rc == 124:
75 raise TimeoutError(74 raise TimeoutError(
@@ -132,7 +131,7 @@
132 cmds.insert(0, 'timeout')131 cmds.insert(0, 'timeout')
133 cmds.insert(1, '%ss' % timeout)132 cmds.insert(1, '%ss' % timeout)
134 logging.info("Execute command on host: %s" % (' '.join(cmds)))133 logging.info("Execute command on host: %s" % (' '.join(cmds)))
135 rc = subprocess.call(cmds)134 rc = self.context.run_command(cmds)
136 if rc == 124:135 if rc == 124:
137 raise TimeoutError(136 raise TimeoutError(
138 "The test (%s) on device(%s) times out." % (137 "The test (%s) on device(%s) times out." % (
@@ -180,7 +179,7 @@
180 cmds.insert(1, '%ss' % timeout)179 cmds.insert(1, '%ss' % timeout)
181180
182 logging.info("Execute command on host: %s" % (' '.join(cmds)))181 logging.info("Execute command on host: %s" % (' '.join(cmds)))
183 rc = subprocess.call(cmds)182 rc = self.context.run_command(cmds)
184 if rc == 124:183 if rc == 124:
185 raise TimeoutError(184 raise TimeoutError(
186 "Failed to run monkeyrunner test url[%s] "185 "Failed to run monkeyrunner test url[%s] "
@@ -219,7 +218,7 @@
219 cmds.insert(0, 'timeout')218 cmds.insert(0, 'timeout')
220 cmds.insert(1, '%ss' % timeout)219 cmds.insert(1, '%ss' % timeout)
221 logging.info("Execute command on host: %s" % (' '.join(cmds)))220 logging.info("Execute command on host: %s" % (' '.join(cmds)))
222 rc = subprocess.call(cmds)221 rc = self.context.run_commands(cmds)
223 if rc == 124:222 if rc == 124:
224 raise OperationFailed(223 raise OperationFailed(
225 "The installation of test case(%s)"224 "The installation of test case(%s)"
226225
=== modified file 'lava_dispatcher/client/lmc_utils.py'
--- lava_dispatcher/client/lmc_utils.py 2012-11-20 13:34:19 +0000
+++ lava_dispatcher/client/lmc_utils.py 2013-03-08 06:44:20 +0000
@@ -50,24 +50,24 @@
50 logging.info("Executing the linaro-media-create command")50 logging.info("Executing the linaro-media-create command")
51 logging.info(cmd)51 logging.info(cmd)
5252
53 _run_linaro_media_create(cmd)53 _run_linaro_media_create(client.context, cmd)
54 return image_file54 return image_file
5555
56def generate_fastmodel_image(hwpack, rootfs, odir, bootloader='u_boot', size="2000M"):56def generate_fastmodel_image(context, hwpack, rootfs, odir, bootloader='u_boot', size="2000M"):
57 cmd = ("flock /var/lock/lava-lmc.lck sudo linaro-media-create "57 cmd = ("flock /var/lock/lava-lmc.lck sudo linaro-media-create "
58 "--dev fastmodel --output-directory %s --image-size %s "58 "--dev fastmodel --output-directory %s --image-size %s "
59 "--hwpack %s --binary %s --hwpack-force-yes --bootloader %s" %59 "--hwpack %s --binary %s --hwpack-force-yes --bootloader %s" %
60 (odir, size, hwpack, rootfs, bootloader) )60 (odir, size, hwpack, rootfs, bootloader) )
61 logging.info("Generating fastmodel image with: %s" % cmd)61 logging.info("Generating fastmodel image with: %s" % cmd)
62 _run_linaro_media_create(cmd)62 _run_linaro_media_create(context, cmd)
6363
64def generate_android_image(device, boot, data, system, ofile, size="2000M"):64def generate_android_image(context, device, boot, data, system, ofile, size="2000M"):
65 cmd = ("flock /var/lock/lava-lmc.lck linaro-android-media-create "65 cmd = ("flock /var/lock/lava-lmc.lck linaro-android-media-create "
66 "--dev %s --image_file %s --image_size %s "66 "--dev %s --image_file %s --image_size %s "
67 "--boot %s --userdata %s --system %s" %67 "--boot %s --userdata %s --system %s" %
68 (device, ofile, size, boot, data, system) )68 (device, ofile, size, boot, data, system) )
69 logging.info("Generating android image with: %s" % cmd)69 logging.info("Generating android image with: %s" % cmd)
70 _run_linaro_media_create(cmd)70 _run_linaro_media_create(context, cmd)
7171
72def get_partition_offset(image, partno):72def get_partition_offset(image, partno):
73 cmd = 'parted %s -m -s unit b print' % image73 cmd = 'parted %s -m -s unit b print' % image
@@ -97,10 +97,10 @@
97 logging_system('sudo umount ' + mntdir)97 logging_system('sudo umount ' + mntdir)
98 logging_system('rm -rf ' + mntdir)98 logging_system('rm -rf ' + mntdir)
9999
100def _run_linaro_media_create(cmd):100def _run_linaro_media_create(context, cmd):
101 """Run linaro-media-create and accept licenses thrown up in the process.101 """Run linaro-media-create and accept licenses thrown up in the process.
102 """102 """
103 proc = pexpect.spawn(cmd, logfile=sys.stdout)103 proc = context.spawn(cmd)
104104
105 # This code is a bit out of control. It describes a state machine. Each105 # This code is a bit out of control. It describes a state machine. Each
106 # state has a name, a mapping patterns to wait for -> state to move to, a106 # state has a name, a mapping patterns to wait for -> state to move to, a
107107
=== modified file 'lava_dispatcher/context.py'
--- lava_dispatcher/context.py 2013-01-23 23:10:37 +0000
+++ lava_dispatcher/context.py 2013-03-08 06:44:20 +0000
@@ -21,13 +21,17 @@
21import atexit21import atexit
22import logging22import logging
23import os23import os
24import subprocess
24import sys25import sys
25import tempfile26import tempfile
2627
27from lava_dispatcher.config import get_device_config28from lava_dispatcher.config import get_device_config
28from lava_dispatcher.client.targetdevice import TargetBasedClient29from lava_dispatcher.client.targetdevice import TargetBasedClient
29from lava_dispatcher.test_data import LavaTestData30from lava_dispatcher.test_data import LavaTestData
30from lava_dispatcher.utils import rmtree31from lava_dispatcher.utils import (
32 logging_spawn,
33 rmtree,
34 )
3135
3236
33def _write_and_flush(fobj, data):37def _write_and_flush(fobj, data):
@@ -116,3 +120,22 @@
116120
117 def get_device_version(self):121 def get_device_version(self):
118 return self.client.target_device.get_device_version()122 return self.client.target_device.get_device_version()
123
124 def spawn(self, command, timeout=30):
125 proc = logging_spawn(command, timeout)
126 proc.logfile_read = self.logfile_read
127 return proc
128
129 def run_command(self, command, failok=True):
130 """run command 'command' with output going to output-dir if specified"""
131 if isinstance(command, (str, unicode)):
132 command = ['sh', '-c', command]
133 output_txt = self.client.context.output.output_txt
134 output_args = {'stdout': output_txt, 'stderr': subprocess.STDOUT}
135 logging.debug("Executing on host : '%r'" % command)
136 if failok:
137 rc = subprocess.call(command, **output_args)
138 else:
139 rc = subprocess.check_call(command, **output_args)
140 return rc
141
119142
=== modified file 'lava_dispatcher/device/fastmodel.py'
--- lava_dispatcher/device/fastmodel.py 2013-02-18 02:11:39 +0000
+++ lava_dispatcher/device/fastmodel.py 2013-03-08 06:44:20 +0000
@@ -25,8 +25,6 @@
25import os25import os
26import shutil26import shutil
27import stat27import stat
28import threading
29import re
30import subprocess28import subprocess
3129
32import lava_dispatcher.device.boot_options as boot_options30import lava_dispatcher.device.boot_options as boot_options
@@ -107,7 +105,7 @@
107 self._sd_image = '%s/android.img' % os.path.dirname(self._system)105 self._sd_image = '%s/android.img' % os.path.dirname(self._system)
108106
109 generate_android_image(107 generate_android_image(
110 'vexpress-a9', self._boot, self._data, self._system, self._sd_image108 self.context, 'vexpress-a9', self._boot, self._data, self._system, self._sd_image
111 )109 )
112110
113 self._copy_axf(self.config.boot_part, '')111 self._copy_axf(self.config.boot_part, '')
@@ -119,7 +117,7 @@
119 rootfs = download_image(rootfs, self.context, decompress=False)117 rootfs = download_image(rootfs, self.context, decompress=False)
120 odir = os.path.dirname(rootfs)118 odir = os.path.dirname(rootfs)
121119
122 generate_fastmodel_image(hwpack, rootfs, odir, bootloader)120 generate_fastmodel_image(self.context, hwpack, rootfs, odir, bootloader)
123 self._sd_image = '%s/sd.img' % odir121 self._sd_image = '%s/sd.img' % odir
124 self._axf = None122 self._axf = None
125 for f in self.config.simulator_axf_files:123 for f in self.config.simulator_axf_files:
@@ -203,10 +201,7 @@
203 # the simulator proc only has stdout/stderr about the simulator201 # the simulator proc only has stdout/stderr about the simulator
204 # we hook up into a telnet port which emulates a serial console202 # we hook up into a telnet port which emulates a serial console
205 logging.info('launching fastmodel with command %r' % sim_cmd)203 logging.info('launching fastmodel with command %r' % sim_cmd)
206 self._sim_proc = logging_spawn(204 self._sim_proc = self.context.spawn(sim_cmd, timeout=1200)
207 sim_cmd,
208 logfile=self.context.logfile_read,
209 timeout=1200)
210 self._sim_proc.expect(self.PORT_PATTERN, timeout=300)205 self._sim_proc.expect(self.PORT_PATTERN, timeout=300)
211 self._serial_port = self._sim_proc.match.groups()[0]206 self._serial_port = self._sim_proc.match.groups()[0]
212 logging.info('serial console port on: %s' % self._serial_port)207 logging.info('serial console port on: %s' % self._serial_port)
@@ -221,9 +216,9 @@
221 logging.info('simulator is started connecting to serial port')216 logging.info('simulator is started connecting to serial port')
222 self.proc = logging_spawn(217 self.proc = logging_spawn(
223 'telnet localhost %s' % self._serial_port,218 'telnet localhost %s' % self._serial_port,
224 logfile=self._create_rtsm_ostream(
225 self.context.logfile_read),
226 timeout=1200)219 timeout=1200)
220 self.proc.logfile_read = self._create_rtsm_ostream(
221 self.proc.logfile_read)
227 return self.proc222 return self.proc
228223
229 def get_test_data_attachments(self):224 def get_test_data_attachments(self):
230225
=== modified file 'lava_dispatcher/device/master.py'
--- lava_dispatcher/device/master.py 2013-01-30 18:45:16 +0000
+++ lava_dispatcher/device/master.py 2013-03-08 06:44:20 +0000
@@ -82,9 +82,9 @@
82 self.device_version = None82 self.device_version = None
8383
84 if config.pre_connect_command:84 if config.pre_connect_command:
85 logging_system(config.pre_connect_command)85 self.context.run_command(config.pre_connect_command)
8686
87 self.proc = connect_to_serial(config, self.context.logfile_read)87 self.proc = connect_to_serial(self.context)
8888
89 def get_device_version(self):89 def get_device_version(self):
90 return self.device_version90 return self.device_version
@@ -397,7 +397,7 @@
397 logging.info("Perform hard reset on the system")397 logging.info("Perform hard reset on the system")
398 self.master_ip = None398 self.master_ip = None
399 if self.config.hard_reset_command != "":399 if self.config.hard_reset_command != "":
400 logging_system(self.config.hard_reset_command)400 self.context.run_command(self.config.hard_reset_command)
401 else:401 else:
402 self.proc.send("~$")402 self.proc.send("~$")
403 self.proc.sendline("hardreset")403 self.proc.sendline("hardreset")
404404
=== modified file 'lava_dispatcher/device/nexus.py'
--- lava_dispatcher/device/nexus.py 2013-02-04 13:31:34 +0000
+++ lava_dispatcher/device/nexus.py 2013-03-08 06:44:20 +0000
@@ -19,7 +19,6 @@
19# with this program; if not, see <http://www.gnu.org/licenses>.19# with this program; if not, see <http://www.gnu.org/licenses>.
2020
21import subprocess21import subprocess
22import pexpect
23from time import sleep22from time import sleep
24import logging23import logging
25import contextlib24import contextlib
@@ -31,8 +30,6 @@
31 download_image30 download_image
32)31)
33from lava_dispatcher.utils import (32from lava_dispatcher.utils import (
34 logging_system,
35 logging_spawn,
36 mkdtemp33 mkdtemp
37)34)
38from lava_dispatcher.errors import (35from lava_dispatcher.errors import (
@@ -40,13 +37,9 @@
40)37)
4138
4239
43def _call(cmd, ignore_failure, timeout):40def _call(context, cmd, ignore_failure, timeout):
44 cmd = 'timeout ' + str(timeout) + 's ' + cmd41 cmd = 'timeout ' + str(timeout) + 's ' + cmd
45 logging.debug("Running on the host: %s", cmd)42 context.run_command(cmd, failok=ignore_failure)
46 if ignore_failure:
47 subprocess.call(cmd, shell=True)
48 else:
49 subprocess.check_call(cmd, shell=True)
5043
5144
52class FastBoot(object):45class FastBoot(object):
@@ -57,7 +50,7 @@
57 def __call__(self, args, ignore_failure=False, timeout=600):50 def __call__(self, args, ignore_failure=False, timeout=600):
58 command = self.device.config.fastboot_command + ' ' + args51 command = self.device.config.fastboot_command + ' ' + args
59 command = "flock /var/lock/lava-fastboot.lck " + command52 command = "flock /var/lock/lava-fastboot.lck " + command
60 _call(command, ignore_failure, timeout)53 _call(self.device.context, command, ignore_failure, timeout)
6154
62 def enter(self):55 def enter(self):
63 if self.on():56 if self.on():
@@ -71,7 +64,7 @@
71 # probably hung.64 # probably hung.
72 if self.device.config.hard_reset_command:65 if self.device.config.hard_reset_command:
73 logging.debug("Will hard reset the device")66 logging.debug("Will hard reset the device")
74 logging_system(self.device.config.hard_reset_command)67 self.context.run_command(self.device.config.hard_reset_command)
75 else:68 else:
76 logging.critical(69 logging.critical(
77 "Hard reset command not configured. "70 "Hard reset command not configured. "
@@ -187,9 +180,9 @@
187 def _adb(self, args, ignore_failure=False, spawn=False, timeout=600):180 def _adb(self, args, ignore_failure=False, spawn=False, timeout=600):
188 cmd = self.config.adb_command + ' ' + args181 cmd = self.config.adb_command + ' ' + args
189 if spawn:182 if spawn:
190 return logging_spawn(cmd, timeout=60)183 return self.context.spawn(cmd, timeout=60)
191 else:184 else:
192 _call(cmd, ignore_failure, timeout)185 _call(self.context, cmd, ignore_failure, timeout)
193186
194 def _get_image(self, url):187 def _get_image(self, url):
195 sdir = self.working_dir188 sdir = self.working_dir
196189
=== modified file 'lava_dispatcher/device/qemu.py'
--- lava_dispatcher/device/qemu.py 2013-01-16 23:27:28 +0000
+++ lava_dispatcher/device/qemu.py 2013-03-08 06:44:20 +0000
@@ -36,7 +36,6 @@
36from lava_dispatcher.utils import (36from lava_dispatcher.utils import (
37 ensure_directory,37 ensure_directory,
38 extract_targz,38 extract_targz,
39 logging_spawn,
40 )39 )
4140
4241
@@ -79,10 +78,7 @@
79 self.config.qemu_drive_interface,78 self.config.qemu_drive_interface,
80 self._sd_image)79 self._sd_image)
81 logging.info('launching qemu with command %r' % qemu_cmd)80 logging.info('launching qemu with command %r' % qemu_cmd)
82 proc = logging_spawn(81 proc = self.context.spawn(qemu_cmd, timeout=1200)
83 qemu_cmd,
84 logfile=self.context.logfile_read,
85 timeout=1200)
86 return proc82 return proc
8783
88 def get_device_version(self):84 def get_device_version(self):
8985
=== modified file 'lava_dispatcher/device/sdmux.py'
--- lava_dispatcher/device/sdmux.py 2013-01-28 23:59:47 +0000
+++ lava_dispatcher/device/sdmux.py 2013-03-08 06:44:20 +0000
@@ -42,7 +42,6 @@
42 connect_to_serial,42 connect_to_serial,
43 ensure_directory,43 ensure_directory,
44 extract_targz,44 extract_targz,
45 logging_system,
46)45)
4746
4847
@@ -87,7 +86,7 @@
87 raise CriticalError('Device config requires "power_off_cmd"')86 raise CriticalError('Device config requires "power_off_cmd"')
8887
89 if config.pre_connect_command:88 if config.pre_connect_command:
90 logging_system(config.pre_connect_command)89 self.context.run_command(config.pre_connect_command)
9190
92 def deploy_linaro(self, hwpack=None, rootfs=None):91 def deploy_linaro(self, hwpack=None, rootfs=None):
93 img = generate_image(self, hwpack, rootfs, self.scratch_dir)92 img = generate_image(self, hwpack, rootfs, self.scratch_dir)
@@ -115,7 +114,7 @@
115114
116 img = os.path.join(scratch, 'android.img')115 img = os.path.join(scratch, 'android.img')
117 device_type = self.config.lmc_dev_arg116 device_type = self.config.lmc_dev_arg
118 generate_android_image(device_type, boot, data, system, img)117 generate_android_image(self.context, device_type, boot, data, system, img)
119 self._customize_android(img)118 self._customize_android(img)
120 self._write_image(img)119 self._write_image(img)
121120
@@ -170,7 +169,7 @@
170 raise CriticalError('Unable to access sdmux device')169 raise CriticalError('Unable to access sdmux device')
171 finally:170 finally:
172 logging.info('powering off sdmux')171 logging.info('powering off sdmux')
173 subprocess.check_call([muxscript, '-d', muxid, 'off'])172 self.context.run_command([muxscript, '-d', muxid, 'off'], failok=False)
174173
175 @contextlib.contextmanager174 @contextlib.contextmanager
176 def file_system(self, partition, directory):175 def file_system(self, partition, directory):
@@ -185,7 +184,7 @@
185 with self.mux_device() as device:184 with self.mux_device() as device:
186 device = '%s%s' % (device, partition)185 device = '%s%s' % (device, partition)
187 try:186 try:
188 subprocess.check_call(['mount', device, mntdir])187 self.context.run_command(['mount', device, mntdir], failok=False)
189 if directory[0] == '/':188 if directory[0] == '/':
190 directory = directory[1:]189 directory = directory[1:]
191 path = os.path.join(mntdir, directory)190 path = os.path.join(mntdir, directory)
@@ -203,11 +202,11 @@
203 logging.info('unmounting sdmux')202 logging.info('unmounting sdmux')
204 try:203 try:
205 _flush_files(mntdir)204 _flush_files(mntdir)
206 subprocess.check_call(['umount', device])205 self.context.run_command(['umount', device], failok=False)
207 except subprocess.CalledProcessError:206 except subprocess.CalledProcessError:
208 logging.exception('umount failed, re-try in 10 seconds')207 logging.exception('umount failed, re-try in 10 seconds')
209 time.sleep(10)208 time.sleep(10)
210 if subprocess.call(['umount', device]) != 0:209 if self.context.run_command(['umount', device]) != 0:
211 logging.error(210 logging.error(
212 'Unable to unmount sdmux device %s', device)211 'Unable to unmount sdmux device %s', device)
213212
@@ -219,14 +218,13 @@
219218
220 def power_off(self, proc):219 def power_off(self, proc):
221 super(SDMuxTarget, self).power_off(proc)220 super(SDMuxTarget, self).power_off(proc)
222 logging_system(self.config.power_off_cmd)221 self.context.run_command(self.config.power_off_cmd)
223222
224 def power_on(self):223 def power_on(self):
225 self.proc = connect_to_serial(224 self.proc = connect_to_serial(self.context)
226 self.config, self.context.logfile_read)
227225
228 logging.info('powering on')226 logging.info('powering on')
229 logging_system(self.config.power_on_cmd)227 self.context.run_command(self.config.power_on_cmd)
230228
231 return self.proc229 return self.proc
232230
233231
=== modified file 'lava_dispatcher/utils.py'
--- lava_dispatcher/utils.py 2013-01-16 23:27:28 +0000
+++ lava_dispatcher/utils.py 2013-03-08 06:44:20 +0000
@@ -169,9 +169,9 @@
169169
170class logging_spawn(pexpect.spawn):170class logging_spawn(pexpect.spawn):
171171
172 def __init__(self, command, timeout=30, logfile=None):172 def __init__(self, command, timeout=30):
173 pexpect.spawn.__init__(173 pexpect.spawn.__init__(
174 self, command, timeout=timeout, logfile=logfile)174 self, command, timeout=timeout)
175175
176 # serial can be slow, races do funny things, so increase delay176 # serial can be slow, races do funny things, so increase delay
177 self.delaybeforesend = 0.05177 self.delaybeforesend = 0.05
@@ -214,7 +214,7 @@
214 timeout=1, lava_no_logging=1)214 timeout=1, lava_no_logging=1)
215215
216216
217def connect_to_serial(device_config, logfile_read):217def connect_to_serial(context):
218 """218 """
219 Attempts to connect to a serial console server like conmux or cyclades219 Attempts to connect to a serial console server like conmux or cyclades
220 """220 """
@@ -237,8 +237,9 @@
237 results.append(result)237 results.append(result)
238238
239 while retry_count < retry_limit:239 while retry_count < retry_limit:
240 proc = logging_spawn(device_config.connection_command, timeout=1200)240 proc = context.spawn(
241 proc.logfile_read = logfile_read241 context.client.config.connection_command,
242 timeout=1200)
242 logging.info('Attempting to connect to device')243 logging.info('Attempting to connect to device')
243 match = proc.expect(patterns, timeout=10)244 match = proc.expect(patterns, timeout=10)
244 result = results[match]245 result = results[match]
@@ -252,9 +253,9 @@
252 atexit.register(proc.close, True)253 atexit.register(proc.close, True)
253 return proc254 return proc
254 elif result == 'reset-port':255 elif result == 'reset-port':
255 reset_cmd = device_config.reset_port_command256 reset_cmd = context.client.config.reset_port_command
256 if reset_cmd:257 if reset_cmd:
257 logging_system(reset_cmd)258 context.run_command(reset_cmd)
258 else:259 else:
259 raise CriticalError('no reset_port command configured')260 raise CriticalError('no reset_port command configured')
260 proc.close(True)261 proc.close(True)

Subscribers

People subscribed via source and target branches