Loading ci/collect_artifacts.py +5 −24 Original line number Diff line number Diff line Loading @@ -15,39 +15,20 @@ def main(args): collect_for_sanitizer_test(file) def find_failed_files_for_sanitizer_test( console_log: list, subfolder: str, which="LOGS" ) -> dict(): def find_failed_files_for_sanitizer_test(console_log: list) -> dict(): assert which in ["LOGS", "FILE_BASENAMES"] pattern_line = "(Encoding|Decoding) failed .*for \/.*(CLANG.|VALGRIND)\/(.*)" pattern_file = "(.*_b[0-9]*_.*_rs|.*_b[0-9]*_.*_cbr).*" pattern_line = r"(CLANG.) reports . error\(s\) for (.*)" files_found = dict() for line in console_log: m_line = re.match(pattern_line, line) if m_line is not None: _, test, filename = m_line.groups() filename = pathlib.Path(filename).name m_file = re.match(pattern_file, filename) if m_file is None: print(f"Unexpected: no match on {filename} with {pattern_file} - skip") continue filename_start = m_file.groups()[0] if which == "LOGS": folder = pathlib.Path(f"{test}/{subfolder}/") files = [ f for f in folder.iterdir() if f.name.startswith(filename_start) ] elif which == "FILE_BASENAMES": files = [filename_start] test, filename = m_line.groups() if test in files_found: files_found[test].extend(files) files_found[test].append(filename) else: files_found[test] = files files_found[test] = [filename] return files_found Loading ci/run_scheduled_sanitizer_test.py +1 −3 Original line number Diff line number Diff line Loading @@ -179,9 +179,7 @@ def run_check(in_format: str, out_formats: list, tests: list, run_fec: bool = Tr # delete bitstream files for all failed modes to prevent follow-up errors in decoder-only run with open(CONSOLE_OUT_FILE) as f: console_log = f.readlines() failed_files = find_failed_files_for_sanitizer_test( console_log, "logs", "FILE_BASENAMES" ) failed_files = find_failed_files_for_sanitizer_test(console_log) for t in failed_files.keys(): bs_folder = pathlib.Path(f"{t}/enc") file_starts = failed_files[t] Loading Loading
ci/collect_artifacts.py +5 −24 Original line number Diff line number Diff line Loading @@ -15,39 +15,20 @@ def main(args): collect_for_sanitizer_test(file) def find_failed_files_for_sanitizer_test( console_log: list, subfolder: str, which="LOGS" ) -> dict(): def find_failed_files_for_sanitizer_test(console_log: list) -> dict(): assert which in ["LOGS", "FILE_BASENAMES"] pattern_line = "(Encoding|Decoding) failed .*for \/.*(CLANG.|VALGRIND)\/(.*)" pattern_file = "(.*_b[0-9]*_.*_rs|.*_b[0-9]*_.*_cbr).*" pattern_line = r"(CLANG.) reports . error\(s\) for (.*)" files_found = dict() for line in console_log: m_line = re.match(pattern_line, line) if m_line is not None: _, test, filename = m_line.groups() filename = pathlib.Path(filename).name m_file = re.match(pattern_file, filename) if m_file is None: print(f"Unexpected: no match on {filename} with {pattern_file} - skip") continue filename_start = m_file.groups()[0] if which == "LOGS": folder = pathlib.Path(f"{test}/{subfolder}/") files = [ f for f in folder.iterdir() if f.name.startswith(filename_start) ] elif which == "FILE_BASENAMES": files = [filename_start] test, filename = m_line.groups() if test in files_found: files_found[test].extend(files) files_found[test].append(filename) else: files_found[test] = files files_found[test] = [filename] return files_found Loading
ci/run_scheduled_sanitizer_test.py +1 −3 Original line number Diff line number Diff line Loading @@ -179,9 +179,7 @@ def run_check(in_format: str, out_formats: list, tests: list, run_fec: bool = Tr # delete bitstream files for all failed modes to prevent follow-up errors in decoder-only run with open(CONSOLE_OUT_FILE) as f: console_log = f.readlines() failed_files = find_failed_files_for_sanitizer_test( console_log, "logs", "FILE_BASENAMES" ) failed_files = find_failed_files_for_sanitizer_test(console_log) for t in failed_files.keys(): bs_folder = pathlib.Path(f"{t}/enc") file_starts = failed_files[t] Loading