test-bugzilla-files/test-bugzilla-files.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit dc01a975a1066b54bb1712cfa5071175633a7238 Author: Gülşah Köse <[email protected]> AuthorDate: Tue Sep 7 10:19:10 2021 +0300 Commit: Miklos Vajna <[email protected]> CommitDate: Tue Sep 7 12:15:44 2021 +0200 Ignore some diffs if file is in exclude list. /srv/crashtestdata/odfundiff_exclude_list.txt is manuel exclude list. If the file has difference but file name in exclude list it will be ignored. Example entry for odfundiff_exclude_list.txt /srv/crashtestdata/files/odt/test.odt Change-Id: Ibfb568e49d492458b824704cfb5a8734f59de850 Reviewed-on: https://gerrit.libreoffice.org/c/dev-tools/+/121744 Tested-by: Miklos Vajna <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> diff --git a/test-bugzilla-files/test-bugzilla-files.py b/test-bugzilla-files/test-bugzilla-files.py index 0ade4eb..710364d 100644 --- a/test-bugzilla-files/test-bugzilla-files.py +++ b/test-bugzilla-files/test-bugzilla-files.py @@ -661,6 +661,12 @@ if __name__ == "__main__": # Check the roundtripped files doesn't crash at import time runLoadFileTests(opts, exportedFiles, False) + exclude_list = [] + if os.path.exists("/srv/crashtestdata/odfundiff_exclude_list.txt"): + with open('/srv/crashtestdata/odfundiff_exclude_list.txt') as file: + exclude_list = file.readlines() + exclude_list = [line.rstrip() for line in exclude_list] + if isPreviousExist(): for filename in exportedFiles: if filename[-3:] == 'odt': @@ -668,7 +674,8 @@ if __name__ == "__main__": print(odfundiffCommandWithURL) try: output = str(subprocess.check_output(odfundiffCommandWithURL, shell=True, timeout=600), encoding='utf-8') - if not "Diff finished, number of differences found: 0" in output: + if not "Diff finished, number of differences found: 0" in output and \ + not filename in exclude_list: validLog = open("/srv/crashtestdata/current" + filename + ".log.odfundiff", "w") validLog.write(output) validLog.close()
