43
def __init__( self, verbose, debug, default_engine, dotest, skiptest
44
, reorder, suitelist, suitepaths, system_manager
43
def __init__( self, variables, system_manager):
47
45
self.system_manager = system_manager
48
46
self.time_manager = system_manager.time_manager
49
47
self.logging = system_manager.logging
48
if variables['verbose']:
51
49
self.logging.verbose("Initializing test manager...")
54
dotest = dotest.strip()
56
skiptest = skiptest.strip()
57
51
self.skip_keys = [ 'system_manager'
59
55
self.test_list = []
60
56
self.first_test = 1
61
57
self.total_test_count = 0
62
58
self.executed_tests = {} # We have a hash of 'status':[test_name..]
63
59
self.executing_tests = {}
64
self.verbose = verbose
66
self.default_engine = default_engine
68
self.skiptest = skiptest
69
self.reorder = reorder
70
self.suitelist = suitelist
73
self.code_tree = self.system_manager.code_tree
74
self.suitepaths = suitepaths + self.code_tree.suite_paths
75
self.testdir = self.code_tree.testdir
76
self.desired_tests = test_cases
77
self.mutex = thread.allocate_lock()
80
self.logging.debug(self)
60
self.verbose = variables['verbose']
61
self.debug = variables['debug']
62
self.default_engine = variables['defaultengine']
63
self.dotest = variables['dotest']
65
self.dotest = self.dotest.strip()
66
self.skiptest = variables['skiptest']
68
self.skiptest = self.skiptest.strip()
69
self.reorder = variables['reorder']
70
self.suitelist = variables['suitelist']
71
self.mode = variables['mode']
73
self.suitepaths = variables['suitepaths']
74
self.testdir = variables['testdir']
75
self.desired_tests = variables['test_cases']
77
self.logging.debug_class(self)
82
79
def add_test(self, new_test_case):
83
80
""" Add a new testCase to our self.test_list """
85
82
self.test_list.append(new_test_case)
87
84
def gather_tests(self):
120
117
self.total_test_count = len(self.test_list)
121
118
self.logging.info("Found %d test(s) for execution" %(self.total_test_count))
124
self.logging.debug("Found tests:")
125
self.logging.debug("%s" %(self.print_test_list()))
120
self.logging.debug("Found tests:")
121
self.logging.debug("%s" %(self.print_test_list()))
127
123
def find_suite_path(self, suitename):
128
124
""" We have a suitename, we need to locate the path to