[Libreoffice-commits] dev-tools.git: test-bugzilla-files/new-control.py

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 7 06:35:22 UTC 2021


 test-bugzilla-files/new-control.py |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 858af229a711dd6fa28878a095f8a3458c8af8a8
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue Sep 7 08:34:34 2021 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Sep 7 08:34:34 2021 +0200

    crashtest: also copy ODF output for non-ODF input to the previous/ dir
    
    We only copied ODF output for ODF input, but then tried to invoke
    odfundiff for both cases.
    
    Change-Id: Id3abe95e84d09a8aac6ca76e5b0345c1e2f030dc

diff --git a/test-bugzilla-files/new-control.py b/test-bugzilla-files/new-control.py
index 6807d8e..9a56fa3 100644
--- a/test-bugzilla-files/new-control.py
+++ b/test-bugzilla-files/new-control.py
@@ -55,16 +55,16 @@ def execute_task(task_file, asan):
 
 def saveAsPreviousState(exported_files):
     odf_file_ext = ['odt']
-    previous_path = "/srv/crashtestdata/previous/srv/crashtestdata/files/odt"
+    previous_path = "/srv/crashtestdata/previous"
     if os.path.exists(previous_path):
         rmtree("/srv/crashtestdata/previous")
-    os.makedirs(previous_path)
 
+    prefix = "/srv/crashtestdata/current"
     for file in exported_files:
         ext = file[-3:]
         if ext in odf_file_ext and os.path.exists(file):
-            os.makedirs(os.path.dirname("/srv/crashtestdata/previous"+file[26:]), exist_ok=True)
-            copyfile(file, "/srv/crashtestdata/previous"+file[26:])
+            os.makedirs(os.path.dirname("/srv/crashtestdata/previous"+file[len(prefix):]), exist_ok=True)
+            copyfile(file, "/srv/crashtestdata/previous"+file[len(prefix):])
 
 def get_list_of_files(directory_name):
     list_of_file = os.listdir(directory_name)
@@ -122,5 +122,5 @@ if __name__ == "__main__":
             else:
                 print('%r successfully passed' % (task))
 
-    exported_files = get_list_of_files("/srv/crashtestdata/current/srv/crashtestdata/files/odt/")
+    exported_files = get_list_of_files("/srv/crashtestdata/current/srv/crashtestdata/files/")
     saveAsPreviousState(exported_files)


More information about the Libreoffice-commits mailing list