test-bugzilla-files/test-bugzilla-files.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit 04bb93160fa4e10e3eed56df742ebfaebc2153d9 Author: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> AuthorDate: Fri Aug 19 15:36:26 2022 +0200 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Sep 14 11:46:22 2022 +0200 Use more CRASHTESTDATA in test-bugzilla-files.py Change-Id: I480eab54b6ab972b0416969aa3f5353d1f8882bf Reviewed-on: https://gerrit.libreoffice.org/c/dev-tools/+/138720 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/test-bugzilla-files/test-bugzilla-files.py b/test-bugzilla-files/test-bugzilla-files.py index 32d6bde..ec3d492 100644 --- a/test-bugzilla-files/test-bugzilla-files.py +++ b/test-bugzilla-files/test-bugzilla-files.py @@ -416,7 +416,7 @@ def getODFunDiffCommand(): return os.environ["HOME"] + "/source/bin/odfundiff-exe" def isPreviousExist(): - previous_path = "/srv/crashtestdata/previous" + previous_path = os.environ["CRASHTESTDATA"] + "/previous" if os.path.exists(previous_path): return True return False @@ -662,8 +662,8 @@ if __name__ == "__main__": 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: + if os.path.exists(os.environ["CRASHTESTDATA"] + "/odfundiff_exclude_list.txt"): + with open('os.environ["CRASHTESTDATA"] + /odfundiff_exclude_list.txt') as file: exclude_list = file.readlines() exclude_list = [line.rstrip() for line in exclude_list] @@ -671,7 +671,7 @@ if __name__ == "__main__": odf_file_ext = ['odt', 'odp', 'odb', 'ods', 'odg'] for filename in exportedFiles: if filename[-3:] in odf_file_ext: - odfundiffCommandWithURL = getODFunDiffCommand() + " /srv/crashtestdata/previous" + filename + " /srv/crashtestdata/current" + filename + odfundiffCommandWithURL = getODFunDiffCommand() + " " + os.environ["CRASHTESTDATA"] + "/previous" + filename + " " + os.environ["CRASHTESTDATA"] + "/current" + filename print(odfundiffCommandWithURL) try: output = str(subprocess.check_output(odfundiffCommandWithURL, shell=True, timeout=600), encoding='utf-8') @@ -682,7 +682,7 @@ if __name__ == "__main__": continue elif 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 = open(os.environ["CRASHTESTDATA"] + "/current" + filename + ".log.odfundiff", "w") validLog.write(output) validLog.close() handleODFunDiff(filename, output)