xref: /third_party/musl/scripts/compare.py
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/musl/scripts/
1570af302Sopenharmony_ciimport difflib
2570af302Sopenharmony_ciimport os
3570af302Sopenharmony_ci
4570af302Sopenharmony_cidef compare_file():
5570af302Sopenharmony_ci    if os.path.exists(r'result.html'):
6570af302Sopenharmony_ci        os.remove(r'result.html')
7570af302Sopenharmony_ci    f = open(r'../libc-test/REPORT','r')
8570af302Sopenharmony_ci    a = f.readlines()
9570af302Sopenharmony_ci    f.close()
10570af302Sopenharmony_ci    f = open(r'REPORT','r')
11570af302Sopenharmony_ci    b = f.readlines()
12570af302Sopenharmony_ci    f.close()
13570af302Sopenharmony_ci    if a != b:
14570af302Sopenharmony_ci        compare = difflib.HtmlDiff()
15570af302Sopenharmony_ci        c = compare.make_file(a,b)
16570af302Sopenharmony_ci        f = open(r'result.html','w')
17570af302Sopenharmony_ci        f.write(c)
18570af302Sopenharmony_ci        f.close
19570af302Sopenharmony_ciif __name__ == '__main__':
20570af302Sopenharmony_ci    compare_file()

Indexes created Thu Nov 07 10:32:03 CST 2024