def __init__(self, ansible_host, marker_prefix, dut_run_dir="/tmp"):
        self.ansible_host = ansible_host
        self.dut_run_dir = dut_run_dir
        self.extracted_syslog = os.path.join(self.dut_run_dir, "syslog")
        self.marker_prefix = marker_prefix
        self.ansible_loganalyzer = ansible_loganalyzer(self.marker_prefix,
                                                       False)

        self.match_regex = []
        self.expect_regex = []
        self.ignore_regex = []
        self._markers = []
Beispiel #2
0
    def __init__(self, ansible_host, marker_prefix, dut_run_dir="/tmp", start_marker=None, additional_files={}):
        self.ansible_host = ansible_host
        self.dut_run_dir = dut_run_dir
        self.extracted_syslog = os.path.join(self.dut_run_dir, "syslog")
        self.marker_prefix = marker_prefix.replace(' ', '_')
        # use existing syslog msg as marker to search in logs instead of writing a new one
        self.start_marker = start_marker
        self.ansible_loganalyzer = ansible_loganalyzer(self.marker_prefix, False, start_marker=self.start_marker)

        self.match_regex = []
        self.expect_regex = []
        self.ignore_regex = []
        self.expected_matches_target = 0
        self._markers = []
        self.fail = True

        self.additional_files = list(additional_files.keys())
        self.additional_start_str = list(additional_files.values())