Example:
>>> dut.on()
- >>> dut.run_cmd(['ls','-alF','/','|','grep','usr'])
+ >>> dut.run_cmd('ls -alF / | grep usr')
\'drwxr-xr-x 15 root root 4096 Apr 29 2016 usr/\\r\\n\'
:returns str: stdout of sdb shell command
"""
c = ['sdb', '-s', self.get_id(), 'shell']
- c.extend(command)
+ c.extend(convert_single_item_to_list(command))
logging.debug(c)
result = check_output(c, timeout=timeout)
return result
self.refresh_sdb_server()
if self._find_device_id() == self.get_id():
self._sdb_root_on()
- self.run_cmd(['reboot', '-f'])
+ self.run_cmd('reboot -f')
time.sleep(60)
self.refresh_sdb_server()
self._sdb_root_on()
raise Exception('There\'s no file to flash.')
try:
self._sdb_root_on()
- self.run_cmd(['reboot', '-f', 'download'], timeout=10)
+ self.run_cmd('reboot -f download', timeout=10)
time.sleep(5)
if flasher == 'lthor':
self.thor(filenames=filenames)