uitest/libreoffice/connection.py |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 1058d5edc0b6bbaddea2af520d8b5c3e54ec7498
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Thu Sep 21 07:55:26 2023 -0400
Commit:     Henry Castro <hcas...@collabora.com>
CommitDate: Wed Oct 4 17:46:52 2023 +0200

    uitest: flush print messages
    
    Signed-off-by: Henry Castro <hcas...@collabora.com>
    Change-Id: I87098a438d476529aa25b6608408d07bbc98ce0d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157145
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157557
    Tested-by: Jenkins

diff --git a/uitest/libreoffice/connection.py b/uitest/libreoffice/connection.py
index 101a5385fd4a..e3b76b4baf44 100644
--- a/uitest/libreoffice/connection.py
+++ b/uitest/libreoffice/connection.py
@@ -16,9 +16,9 @@ try:
     import pyuno
     import uno
 except ImportError:
-    print("pyuno not found: try to set PYTHONPATH and URE_BOOTSTRAP variables")
-    print("PYTHONPATH=/installation/opt/program")
-    print("URE_BOOTSTRAP=file:///installation/opt/program/fundamentalrc")
+    print("pyuno not found: try to set PYTHONPATH and URE_BOOTSTRAP 
variables", flush=True)
+    print("PYTHONPATH=/installation/opt/program", flush=True)
+    print("URE_BOOTSTRAP=file:///installation/opt/program/fundamentalrc", 
flush=True)
     raise
 
 def signal_handler(signal_num, frame):
@@ -104,7 +104,7 @@ class OfficeConnection:
         xUnoResolver = xLocalContext.ServiceManager.createInstanceWithContext(
                 "com.sun.star.bridge.UnoUrlResolver", xLocalContext)
         url = "uno:" + socket + ";urp;StarOffice.ComponentContext"
-        print("OfficeConnection: connecting to: " + url)
+        print("OfficeConnection: connecting to: " + url, flush=True)
         while True:
             if self.soffice and self.soffice.poll() is not None:
                 raise Exception("soffice has stopped.")
@@ -113,7 +113,7 @@ class OfficeConnection:
                 xContext = xUnoResolver.resolve(url)
                 return xContext
             except 
pyuno.getClass("com.sun.star.connection.NoConnectException"):
-                print("NoConnectException: sleeping...")
+                print("NoConnectException: sleeping...", flush=True)
                 time.sleep(1)
 
     def tearDown(self):
@@ -126,17 +126,17 @@ class OfficeConnection:
         if self.soffice:
             if self.xContext:
                 try:
-                    print("tearDown: calling terminate()...")
+                    print("tearDown: calling terminate()...", flush=True)
                     xMgr = self.xContext.ServiceManager
                     xDesktop = xMgr.createInstanceWithContext(
                             "com.sun.star.frame.Desktop", self.xContext)
                     xDesktop.terminate()
-                    print("...done")
+                    print("...done", flush=True)
                 except 
pyuno.getClass("com.sun.star.beans.UnknownPropertyException"):
-                    print("caught while TearDown:\n", traceback.format_exc())
+                    print("caught while TearDown:\n", traceback.format_exc(), 
flush=True)
                     pass  # ignore, also means disposed
                 except pyuno.getClass("com.sun.star.lang.DisposedException"):
-                    print("caught while TearDown:\n", traceback.format_exc())
+                    print("caught while TearDown:\n", traceback.format_exc(), 
flush=True)
                     pass  # ignore
             else:
                 self.soffice.terminate()

Reply via email to