[Libreoffice-commits] dev-tools.git: test-bugzilla-files/analyze-logs.py test-bugzilla-files/test-bugzilla-files.py
GülÅah Köse (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 14 07:49:27 UTC 2021
test-bugzilla-files/analyze-logs.py | 20 ++++++++++++++++++++
test-bugzilla-files/test-bugzilla-files.py | 2 +-
2 files changed, 21 insertions(+), 1 deletion(-)
New commits:
commit 1369b051e6de093c496fbdb4bd932f872053d52a
Author: Gülşah Köse <gulsah.kose at collabora.com>
AuthorDate: Mon Sep 13 10:04:14 2021 +0300
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Sep 14 09:49:10 2021 +0200
Create csv file from odfundiff log.
Change-Id: Ida77283c7537d56eca13e7cf2d4b35961b406a66
Reviewed-on: https://gerrit.libreoffice.org/c/dev-tools/+/122019
Tested-by: Miklos Vajna <vmiklos at collabora.com>
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/test-bugzilla-files/analyze-logs.py b/test-bugzilla-files/analyze-logs.py
index c27230b..3c74d0c 100644
--- a/test-bugzilla-files/analyze-logs.py
+++ b/test-bugzilla-files/analyze-logs.py
@@ -35,6 +35,19 @@ def analyze_import_crash(crashtest_file, crashes):
crashes[format] = 1 + crashes[format]
return crashes
+def analyze_odfundifflog(odfundifflog_file, differences):
+ if not os.path.exists(odfundifflog_file):
+ return 0
+
+ regex = re.compile("Difference in :/srv/crashtestdata/files/(\w*)")
+ for line in open(odfundifflog_file):
+ r = regex.search(line)
+ format = r.groups()[0]
+ if format not in differences:
+ differences[format] = 0
+ differences[format] = 1 + differences[format]
+ return differences
+
def analyze_export_crash(crashtest_file, crashes):
if not os.path.exists(crashtest_file):
return 0
@@ -99,6 +112,13 @@ def update_validation():
reader = import_csv("validationErrors.csv")
export_csv("validationErrors.csv", validation_errors, reader)
+def update_odfundiff():
+ differences = dict()
+ analyze_odfundifflog("odfundifflog.txt", differences)
+ reader = import_csv("odfundiff.csv")
+ export_csv("odfundiff.csv", differences, reader)
+
update_import()
update_export()
update_validation()
+update_odfundiff()
diff --git a/test-bugzilla-files/test-bugzilla-files.py b/test-bugzilla-files/test-bugzilla-files.py
index 0f2d7d3..de6bb26 100644
--- a/test-bugzilla-files/test-bugzilla-files.py
+++ b/test-bugzilla-files/test-bugzilla-files.py
@@ -335,7 +335,7 @@ def handleCrash(file, disposed):
def handleODFunDiff(file):
print("File: " + file + " has differences")
diffLog = open("odfundifflog.txt", "a")
- diffLog.write(file + ' has differences after saving')
+ diffLog.write('Difference in :' + file)
diffLog.write('\n')
diffLog.close()
More information about the Libreoffice-commits
mailing list