INNER CODE UNIT · Python
compare_text_files
uxlfoundation/oneDAL · dev/release_tests/compare_release_trees.py:511
def compare_text_files(make_root, bazel_root, files, limit):
errors = 0
mismatches = []
compared = 0
for path in sorted(files):
if not is_text_path(path):
continue
compared += 1
make_path = make_root / path
bazel_path = bazel_root / path
if path in NORMALIZED_TEXT_LINES:
equal = read_normalized_text(make_root, path) == read_normalized_text(bazel_root, path)
else:
equal = filecmp.cmp(make_path, bazel_path, shallow=False)
if not equal:
mismatches.append(path)