Rtos API example

Embed: (wiki syntax)

« Back to documentation index

HostTestPluginBase Class Reference

HostTestPluginBase Class Reference

Public Member Functions

def setup
 Interface methods.
def execute
def print_plugin_error
 Interface helper methods - overload only if you need to have custom behaviour.
def print_plugin_info
def print_plugin_char
def check_mount_point_ready
def check_parameters
def run_command

Static Public Attributes

string name = "HostTestPluginBase"
 Interface:

Detailed Description

Base class for all plug-ins used with host tests.

Definition at line 24 of file host_test_plugins.py.


Member Function Documentation

def check_mount_point_ready (   self,
  destination_disk,
  init_delay = 0.2,
  loop_delay = 0.25 
)
Checks if destination_disk is ready and can be accessed by e.g. copy commands
    @init_delay - Initial delay time before first access check
    @loop_delay - pooling delay for access check

Definition at line 80 of file host_test_plugins.py.

def check_parameters (   self,
  capabilitity,
  args,
  kwargs 
)
This function should be ran each time we call execute()
    to check if none of the required parameters is missing.

Definition at line 92 of file host_test_plugins.py.

def execute (   self,
  capabilitity,
  args,
  kwargs 
)
Executes capability by name.
    Each capability e.g. may directly just call some command line
    program or execute building pythonic function

Definition at line 48 of file host_test_plugins.py.

def print_plugin_char (   self,
  char 
)
Function prints char on stdout

Definition at line 73 of file host_test_plugins.py.

def print_plugin_error (   self,
  text 
)

Interface helper methods - overload only if you need to have custom behaviour.

Function prints error in console and exits always with False

Definition at line 58 of file host_test_plugins.py.

def print_plugin_info (   self,
  text,
  NL = True 
)
Function prints notification in console and exits always with True

Definition at line 64 of file host_test_plugins.py.

def run_command (   self,
  cmd,
  shell = True 
)
Runs command from command line.

Definition at line 105 of file host_test_plugins.py.

def setup (   self,
  args,
  kwargs 
)

Interface methods.

Configure plugin, this function should be called before plugin execute() method is used.

Definition at line 43 of file host_test_plugins.py.


Field Documentation

string name = "HostTestPluginBase" [static]

Interface:

Interface attributes defining plugin name, type etc.

Definition at line 34 of file host_test_plugins.py.