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


class  ExeTest
class  PyTest
class  Test
class  TestConfig
class  TestConfigFromText


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 ()


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)
bool linux = True
 list_only = list_tagsorlist_tests
bool list_tags = False
bool list_tests = False
string logdir = target+os.sep+'unit-tests'
 n_errors = log.n_errors()
int n_tests = 0
string pyrs = ""
 pyrs_path = repo.root+os.sep+pyrs
 regex = None
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

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

Definition at line 334 of file

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

Definition at line 187 of file

def run-unit-tests.config (   self)

Definition at line 349 of file

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

def run-unit-tests.configurations (   self)

Definition at line 256 of file

def run-unit-tests.debug_dump (   self)

Definition at line 242 of file

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 533 of file

def run-unit-tests.flags (   self)

Definition at line 272 of file

def run-unit-tests.get_log (   self)

Definition at line 360 of file

def run-unit-tests.get_tests ( )

Definition at line 482 of file

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

Definition at line 368 of file

def (   self)

Definition at line 353 of file

def run-unit-tests.prioritize_tests (   tests)

Definition at line 530 of file

def run-unit-tests.priority (   self)

Definition at line 260 of file

def run-unit-tests.ran (   self)

Definition at line 357 of file

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

Definition at line 341 of file

def run-unit-tests.subprocess_run (   cmd,
  stdout = None,
  timeout = 200,
  append = False 
Wrapper function for
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

def run-unit-tests.tags (   self)

Definition at line 268 of file

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

Definition at line 556 of file

def run-unit-tests.timeout (   self)

Definition at line 264 of file

def run-unit-tests.usage ( void  )

Definition at line 23 of file

Variable Documentation


Definition at line 337 of file


Definition at line 236 of file


Definition at line 239 of file


Definition at line 336 of file


Definition at line 237 of file


Definition at line 338 of file


Definition at line 238 of file


Definition at line 240 of file


Definition at line 48 of file

string = repo.root+os.sep+'build'

Definition at line 86 of file

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

Definition at line 18 of file

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

Definition at line 90 of file


Definition at line 100 of file

bool run-unit-tests.linux = True

Definition at line 42 of file

run-unit-tests.list_only = list_tagsorlist_tests

Definition at line 577 of file

bool run-unit-tests.list_tags = False

Definition at line 56 of file

bool run-unit-tests.list_tests = False

Definition at line 57 of file

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

Definition at line 97 of file


Definition at line 49 of file

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

Definition at line 649 of file

int run-unit-tests.n_tests = 0

Definition at line 101 of file


Definition at line 48 of file


Definition at line 12 of file

run-unit-tests.pyrs = ""

Definition at line 106 of file

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

Definition at line 117 of file


Definition at line 619 of file

run-unit-tests.regex = None

Definition at line 53 of file


Definition at line 619 of file

int run-unit-tests.skip_live_tests = 0

Definition at line 585 of file

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

Definition at line 40 of file

run-unit-tests.tag = None

Definition at line 55 of file

run-unit-tests.tags = set()

Definition at line 588 of file = None

Definition at line 78 of file

list run-unit-tests.tests = []

Definition at line 589 of file

bool run-unit-tests.to_stdout = False

Definition at line 54 of file

Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:43