mirror of https://github.com/ARMmbed/mbed-os.git
Bugfix: copy plugin assumed always that all commands like cp, copy, xcopy are
shell command. In fact copy and xcopy are shell commands under Windows and 'cp' is always a separate app. not shell command e.g. in Windows.pull/1094/head
parent
abee10eee8
commit
65bae00f61
|
@ -106,6 +106,7 @@ class HostTestPluginBase:
|
|||
""" Runs command from command line.
|
||||
"""
|
||||
result = True
|
||||
ret = 0
|
||||
try:
|
||||
ret = call(cmd, shell=shell)
|
||||
if ret:
|
||||
|
|
|
@ -51,10 +51,11 @@ class HostTestPluginCopyMethod_Shell(HostTestPluginBase):
|
|||
if capabilitity == 'shell':
|
||||
if os.name == 'nt': capabilitity = 'copy'
|
||||
elif os.name == 'posix': capabilitity = 'cp'
|
||||
if capabilitity == 'cp' or capabilitity == 'copy' or capabilitity == 'copy':
|
||||
if capabilitity == 'cp' or capabilitity == 'copy' or capabilitity == 'xcopy':
|
||||
copy_method = capabilitity
|
||||
cmd = [copy_method, image_path, destination_path]
|
||||
result = self.run_command(cmd)
|
||||
shell = not capabilitity == 'cp'
|
||||
result = self.run_command(cmd, shell=shell)
|
||||
return result
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue