mirror of https://github.com/ARMmbed/mbed-os.git
Changed 'default' flashing method for cli option -c to 'shell'
parent
cefba29822
commit
598654fa4d
|
@ -250,12 +250,15 @@ class Mbed:
|
||||||
""" Copy file depending on method you want to use. Handles exception
|
""" Copy file depending on method you want to use. Handles exception
|
||||||
and return code from shell copy commands.
|
and return code from shell copy commands.
|
||||||
"""
|
"""
|
||||||
|
# image_path - Where is binary with target's firmware
|
||||||
if copy_method is not None:
|
if copy_method is not None:
|
||||||
# image_path - Where is binary with target's firmware
|
# We override 'default' method with 'shell' method
|
||||||
result = host_tests_plugins.call_plugin('CopyMethod', copy_method, image_path=image_path, destination_disk=disk)
|
if copy_method == 'default':
|
||||||
|
copy_method = 'shell'
|
||||||
else:
|
else:
|
||||||
copy_method = 'default'
|
copy_method = 'shell'
|
||||||
result = host_tests_plugins.call_plugin('CopyMethod', copy_method, image_path=image_path, destination_disk=disk)
|
|
||||||
|
result = host_tests_plugins.call_plugin('CopyMethod', copy_method, image_path=image_path, destination_disk=disk)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
def flush(self):
|
def flush(self):
|
||||||
|
|
|
@ -41,7 +41,7 @@ class HostTestPluginCopyMethod_Mbed(HostTestPluginBase):
|
||||||
name = 'HostTestPluginCopyMethod_Mbed'
|
name = 'HostTestPluginCopyMethod_Mbed'
|
||||||
type = 'CopyMethod'
|
type = 'CopyMethod'
|
||||||
stable = True
|
stable = True
|
||||||
capabilities = ['default']
|
capabilities = ['shutil', 'default']
|
||||||
required_parameters = ['image_path', 'destination_disk']
|
required_parameters = ['image_path', 'destination_disk']
|
||||||
|
|
||||||
def setup(self, *args, **kwargs):
|
def setup(self, *args, **kwargs):
|
||||||
|
@ -56,7 +56,8 @@ class HostTestPluginCopyMethod_Mbed(HostTestPluginBase):
|
||||||
"""
|
"""
|
||||||
result = False
|
result = False
|
||||||
if self.check_parameters(capabilitity, *args, **kwargs) is True:
|
if self.check_parameters(capabilitity, *args, **kwargs) is True:
|
||||||
if capabilitity == 'default':
|
# Capability 'default' is a dummy capability
|
||||||
|
if capability == 'shutil':
|
||||||
image_path = kwargs['image_path']
|
image_path = kwargs['image_path']
|
||||||
destination_disk = kwargs['destination_disk']
|
destination_disk = kwargs['destination_disk']
|
||||||
# Wait for mount point to be ready
|
# Wait for mount point to be ready
|
||||||
|
|
Loading…
Reference in New Issue