Files
phs_v1.0.1.0/third_party/musl/scripts/compare.py
2024-09-27 19:21:56 +08:00

20 lines
483 B
Python

import difflib
import os
def compare_file():
if os.path.exists(r'result.html'):
os.remove(r'result.html')
f = open(r'../libc-test/REPORT','r')
a = f.readlines()
f.close()
f = open(r'REPORT','r')
b = f.readlines()
f.close()
if a != b:
compare = difflib.HtmlDiff()
c = compare.make_file(a,b)
f = open(r'result.html','w')
f.write(c)
f.close
if __name__ == '__main__':
compare_file()