diff options
author | Gabor Kelemen <gabor.kelemen.extern@allotropia.de> | 2022-08-19 15:36:26 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-09-14 11:46:22 +0200 |
commit | 04bb93160fa4e10e3eed56df742ebfaebc2153d9 (patch) | |
tree | 0bd38145d47378c06730bf5573569c913946ed43 | |
parent | 5a9fa894bb0e546fc0d825ee3458b89ffce7fd27 (diff) |
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 <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | test-bugzilla-files/test-bugzilla-files.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test-bugzilla-files/test-bugzilla-files.py b/test-bugzilla-files/test-bugzilla-files.py index 32d6bde9..ec3d492d 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) |