3Copyright (c) 2011-2015 ARM Limited
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
9 http://www.apache.org/licenses/LICENSE-2.0
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
17Author: Przemyslaw Wirkus <Przemyslaw.Wirkus@arm.com>
21from .host_test_plugins
import HostTestPluginBase
27 name =
'HostTestPluginCopyMethod_JN51xx'
29 capabilities = [
'jn51xx']
30 required_parameters = [
'image_path',
'serial']
35 HostTestPluginBase.__init__(self)
38 """! In this implementation this plugin only is supporeted under Windows machines
45 if os_name
and os_name.startswith(
'Windows'):
49 def setup(self, *args, **kwargs):
50 """! Configure plugin, this function should be called before plugin execute() method is used.
55 def execute(self, capability, *args, **kwargs):
56 """! Executes capability by name
58 @param capability Capability name
59 @param args Additional arguments
60 @param kwargs Additional arguments
61 @details Each capability e.g. may directly just call some command line program or execute building pythonic function
62 @return Capability call return value
64 if not kwargs[
'image_path']:
68 if not kwargs[
'serial']:
74 if kwargs[
'image_path']
and kwargs[
'serial']:
75 image_path = os.path.normpath(kwargs[
'image_path'])
76 serial_port = kwargs[
'serial']
77 if capability ==
'jn51xx':
90 """ Returns plugin available in this module
Base class for all plugins used with host tests.
mbed_os_support(self)
Function used to determine host OS.
print_plugin_error(self, text)
Interface helper methods - overload only if you need to have custom behaviour.
run_command(self, cmd, shell=True)
Runs command from command line.
check_parameters(self, capability, *args, **kwargs)
This function should be ran each time we call execute() to check if none of the required parameters i...
setup(self, *args, **kwargs)
Configure plugin, this function should be called before plugin execute() method is used.
execute(self, capability, *args, **kwargs)
Executes capability by name.
is_os_supported(self, os_name=None)
In this implementation this plugin only is supporeted under Windows machines.