Classes | Functions | Variables
run-unit-tests Namespace Reference

Classes

class  ExeTest
 
class  PyTest
 
class  Test
 
class  TestConfig
 
class  TestConfigFromText
 

Functions

def __init__ (self)
 
def __init__ (self, testname)
 
def check_log_for_fails (path_to_log, testname, configuration=None)
 
def config (self)
 
def configuration_str (configuration, prefix='', suffix='')
 
def configurations (self)
 
def debug_dump (self)
 
def devices_by_test_config (test)
 
def flags (self)
 
def get_log (self)
 
def get_tests ()
 
def is_live (self)
 
def name (self)
 
def prioritize_tests (tests)
 
def priority (self)
 
def ran (self)
 
def run_test (self, configuration=None, log_path=None)
 
def subprocess_run (cmd, stdout=None, timeout=200, append=False)
 
def tags (self)
 
def test_wrapper (test, configuration=None)
 
def timeout (self)
 
def usage ()
 

Variables

 _config
 
 _configurations
 
 _flags
 
 _name
 
 _priority
 
 _ran
 
 _tags
 
 _timeout
 
 args
 
string build = repo.root+os.sep+'build'
 
 current_dir = os.path.dirname( os.path.abspath( __file__ ))
 
 dir_with_test = build+os.sep+os.path.dirname(executable)
 
 exist_ok
 
bool linux = True
 
bool list_tags = False
 
bool list_tests = False
 
string logdir = target+os.sep+'unit-tests'
 
 longopts
 
 n_errors = log.n_errors()
 
int n_tests = 0
 
 opts
 
 path
 
string pyrs = ""
 
 pyrs_path = repo.root+os.sep+pyrs
 
 recycle
 
 regex = None
 
 serial_numbers
 
int skip_live_tests = 0
 
 system = platform.system()
 
 tag = None
 
 tags = set()
 
 target = None
 
list tests = []
 
bool to_stdout = False
 

Function Documentation

def run-unit-tests.__init__ (   self)
Configuration for a test, encompassing any metadata needed to control its run, like retries etc.

Definition at line 235 of file run-unit-tests.py.

def run-unit-tests.__init__ (   self,
  testname 
)
Abstract class for a test. Holds the name of the test

Definition at line 329 of file run-unit-tests.py.

def run-unit-tests.check_log_for_fails (   path_to_log,
  testname,
  configuration = None 
)

Definition at line 187 of file run-unit-tests.py.

def run-unit-tests.config (   self)

Definition at line 344 of file run-unit-tests.py.

def run-unit-tests.configuration_str (   configuration,
  prefix = '',
  suffix = '' 
)
Return a string repr (with a prefix and/or suffix) of the configuration or '' if it's None 

Definition at line 180 of file run-unit-tests.py.

def run-unit-tests.configurations (   self)

Definition at line 256 of file run-unit-tests.py.

def run-unit-tests.debug_dump (   self)

Definition at line 242 of file run-unit-tests.py.

def run-unit-tests.devices_by_test_config (   test)
Yield <configuration,serial-numbers> pairs for each valid configuration under which the
test should run.

The <configuration> is a list of ('test:device') designations, e.g. ['L500*', 'D415'].
The <serial-numbers> is a set of device serial-numbers that fit this configuration.

:param test: The test (of class type Test) we're interested in

Definition at line 528 of file run-unit-tests.py.

def run-unit-tests.flags (   self)

Definition at line 272 of file run-unit-tests.py.

def run-unit-tests.get_log (   self)

Definition at line 355 of file run-unit-tests.py.

def run-unit-tests.get_tests ( )

Definition at line 477 of file run-unit-tests.py.

def run-unit-tests.is_live (   self)
Returns True if the test configurations specify devices (test has a 'device' directive)

Definition at line 363 of file run-unit-tests.py.

def run-unit-tests.name (   self)

Definition at line 348 of file run-unit-tests.py.

def run-unit-tests.prioritize_tests (   tests)

Definition at line 525 of file run-unit-tests.py.

def run-unit-tests.priority (   self)

Definition at line 260 of file run-unit-tests.py.

def run-unit-tests.ran (   self)

Definition at line 352 of file run-unit-tests.py.

def run-unit-tests.run_test (   self,
  configuration = None,
  log_path = None 
)

Definition at line 336 of file run-unit-tests.py.

def run-unit-tests.subprocess_run (   cmd,
  stdout = None,
  timeout = 200,
  append = False 
)
Wrapper function for subprocess.run.
If the child process times out or ends with a non-zero exit status an exception is raised!

:param cmd: the command and argument for the child process, as a list
:param stdout: path of file to direct the output of the process to (None to disable)
:param timeout: number of seconds to give the process before forcefully ending it (None to disable)
:param append: if True and stdout is not None, the log of the test will be appended to the file instead of
               overwriting it
:return: the output written by the child, if stdout is None -- otherwise N/A

Definition at line 135 of file run-unit-tests.py.

def run-unit-tests.tags (   self)

Definition at line 268 of file run-unit-tests.py.

def run-unit-tests.test_wrapper (   test,
  configuration = None 
)

Definition at line 551 of file run-unit-tests.py.

def run-unit-tests.timeout (   self)

Definition at line 264 of file run-unit-tests.py.

def run-unit-tests.usage ( void  )

Definition at line 23 of file run-unit-tests.py.

Variable Documentation

run-unit-tests._config
private

Definition at line 332 of file run-unit-tests.py.

run-unit-tests._configurations
private

Definition at line 236 of file run-unit-tests.py.

run-unit-tests._flags
private

Definition at line 239 of file run-unit-tests.py.

run-unit-tests._name
private

Definition at line 331 of file run-unit-tests.py.

run-unit-tests._priority
private

Definition at line 237 of file run-unit-tests.py.

run-unit-tests._ran
private

Definition at line 333 of file run-unit-tests.py.

run-unit-tests._tags
private

Definition at line 238 of file run-unit-tests.py.

run-unit-tests._timeout
private

Definition at line 240 of file run-unit-tests.py.

run-unit-tests.args

Definition at line 48 of file run-unit-tests.py.

string run-unit-tests.build = repo.root+os.sep+'build'

Definition at line 86 of file run-unit-tests.py.

run-unit-tests.current_dir = os.path.dirname( os.path.abspath( __file__ ))

Definition at line 18 of file run-unit-tests.py.

run-unit-tests.dir_with_test = build+os.sep+os.path.dirname(executable)

Definition at line 90 of file run-unit-tests.py.

run-unit-tests.exist_ok

Definition at line 100 of file run-unit-tests.py.

bool run-unit-tests.linux = True

Definition at line 42 of file run-unit-tests.py.

bool run-unit-tests.list_tags = False

Definition at line 56 of file run-unit-tests.py.

bool run-unit-tests.list_tests = False

Definition at line 57 of file run-unit-tests.py.

run-unit-tests.logdir = target+os.sep+'unit-tests'

Definition at line 97 of file run-unit-tests.py.

run-unit-tests.longopts

Definition at line 49 of file run-unit-tests.py.

run-unit-tests.n_errors = log.n_errors()

Definition at line 642 of file run-unit-tests.py.

int run-unit-tests.n_tests = 0

Definition at line 101 of file run-unit-tests.py.

run-unit-tests.opts

Definition at line 48 of file run-unit-tests.py.

run-unit-tests.path

Definition at line 12 of file run-unit-tests.py.

run-unit-tests.pyrs = ""

Definition at line 106 of file run-unit-tests.py.

run-unit-tests.pyrs_path = repo.root+os.sep+pyrs

Definition at line 117 of file run-unit-tests.py.

run-unit-tests.recycle

Definition at line 612 of file run-unit-tests.py.

run-unit-tests.regex = None

Definition at line 53 of file run-unit-tests.py.

run-unit-tests.serial_numbers

Definition at line 612 of file run-unit-tests.py.

int run-unit-tests.skip_live_tests = 0

Definition at line 578 of file run-unit-tests.py.

run-unit-tests.system = platform.system()

Definition at line 40 of file run-unit-tests.py.

run-unit-tests.tag = None

Definition at line 55 of file run-unit-tests.py.

run-unit-tests.tags = set()

Definition at line 581 of file run-unit-tests.py.

run-unit-tests.target = None

Definition at line 78 of file run-unit-tests.py.

list run-unit-tests.tests = []

Definition at line 582 of file run-unit-tests.py.

bool run-unit-tests.to_stdout = False

Definition at line 54 of file run-unit-tests.py.



librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Sat Apr 3 2021 02:51:30