def __init__(self, name, cmd=None, path=None, logger=None): self.name = name self.proc = None self.logger = logger self.cmd = None self.cmd_arr = None self.path = None self.gdb = False self.gdbs = False self.vgdb = False self.gdbs_port = None self.nobuf = False self.valgrind = None self.valgrind_xml = None self.valgrind_console = None self.valgrind_track_origins = None self.valgrind_extra_params = None self.__print_io = True self.__valgrind_log_basename = None self.read_thread = None self.__ignore_return_code = False self.default_retcode = 0 if not self.logger: self.logger = LogManager.get_bench_logger(name, 'GP', False) self.cmd = cmd self.path = path
def __init__(self, name, params=None): if Dut._dutlist is None: Dut._dutlist = [] self.testcase = '' self.version = {} self.dutinformation = None self.name = name self.dut_name = name self.stopped = False self.comport = False # TODO: Move to DutProcess? # TODO: Move to MeshCommands self.MAC = None # pylint: disable=invalid-name self.location = Location(0, 0) self.logger = LogManager.get_bench_logger('Dut.%s' % name, name) self.get_time = time.time self.query = None # Query to node self.query_timeout = 0 self.query_async_expected = None # Expected retcode for async cmd self.query_async_response = None # Async response to fullfill when response is available self.waiting_for_response = None self.response_coming_in = None # Response coming in self.prev = None # Previous command, stored for logging purposes self.traces = [] # All traces self.response_traces = [] # Incoming response lines self.response_received = Event() self.response_received.set() self.config = {} self.init_cli_cmds = None self.post_cli_cmds = None self.params = params self.index = None self.init_done = Event() self.init_event_matcher = None self.init_wait_timeout = None Dut._dutlist.append(self)
def __init__(self, dut): try: self.logger = LogManager.get_bench_logger() except KeyError: self.logger = None self.response = None self.dut = dut
def __init__(self): NwPacketManager.__init__(self) self.logger = LogManager.get_bench_logger("bench", "WS") self.__captureThreadLive = None self.__captureThreadFile = None if not pyshark: raise ImportError("Pyshark not installed.")
def __init__(self): try: self.logger = LogManager.get_bench_logger() except KeyError: self.logger = logging.getLogger("bench") self.timeout = False self.timedelta = 0 self.retcode = None self.lines = [] self.traces = [] self.parsed = None
def start_dut_thread(self): # pylint: disable=no-self-use """ Start Dut thread. :return: Nothing """ if Dut._th is None: Dut._run = True Dut._sem = Semaphore(0) Dut._signalled_duts = deque() Dut._logger = LogManager.get_bench_logger('Dut') Dut._th = Thread(target=Dut.run, name='DutThread') Dut._th.daemon = True Dut._th.start()
def __init__(self, dut): self.logger = LogManager.get_bench_logger() self.response = None self.dut = dut
def __init__(self): self.__packets = [] self.__marks = [] self.__lock = Lock() self.setMarkForHead('start') self.logger = LogManager.get_bench_logger("bench", "WS")
def __init__(self): NwPacketManager.__init__(self) self.logger = LogManager.get_bench_logger("bench", "WS") self.__captureThreadLive = None self.__captureThreadFile = None