[Libreoffice-commits] core.git: solenv/gbuild

Stephan Bergmann sbergman at redhat.com
Fri Mar 2 13:21:33 UTC 2018


 solenv/gbuild/UITest.mk |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 35c4650ef871fd0fd3baba409d6219c8c6c3cb44
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Mar 2 11:14:29 2018 +0100

    Restrict UITest SAL_LOG_FILE hack to Windows
    
    ...where it appears to be necessary, as the subprocess.Popen in
    uitest/libreoffice/connection.py apparently doesn't manage to make the spawned
    soffice process send stdout/-err output to the python process's stdout/-err (as
    works fine e.g. on Linux).  (Only using that hack on Windows has the advantage
    that on other platforms output from the python and the soffice process will be
    properly interspersed.  On Windows, at least sal/log.hxx messages from the
    soffice process are captured that way, while its stdout/-err output is still
    lost.)
    
    Also dump the soffice.out.log content in case of failure.  (Note that, despite
    the file's name, it contains any sal/log.hxx messages from both the python and
    the soffice process.)
    
    Change-Id: Ic99a62b1abbe2fbbf98128a35203e2fd05335266
    Reviewed-on: https://gerrit.libreoffice.org/50620
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/solenv/gbuild/UITest.mk b/solenv/gbuild/UITest.mk
index cebb030a12cd..10bddcb677cf 100644
--- a/solenv/gbuild/UITest.mk
+++ b/solenv/gbuild/UITest.mk
@@ -63,7 +63,7 @@ else
 		$(if $(G_SLICE),G_SLICE=$(G_SLICE)) \
 		$(if $(GLIBCXX_FORCE_NEW),GLIBCXX_FORCE_NEW=$(GLIBCXX_FORCE_NEW)) \
 		$(DEFS) \
-		SAL_LOG_FILE="$(dir $(call gb_UITest_get_target,$*))/soffice.out.log" \
+		$(if $(filter WNT,$(OS)),SAL_LOG_FILE="$(dir $(call gb_UITest_get_target,$*))/soffice.out.log") \
 		TEST_LIB=$(call gb_Library_get_target,test) \
 		URE_BOOTSTRAP=vnd.sun.star.pathname:$(call gb_Helper_get_rcfile,$(INSTROOT)/$(LIBO_ETC_FOLDER)/fundamental) \
 		PYTHONPATH="$(PYPATH)" \
@@ -82,6 +82,10 @@ else
 		    || ($(if $(value gb_CppunitTest_postprocess), \
 				    RET=$$?; \
 				    $(call gb_CppunitTest_postprocess,$(gb_UITest_EXECUTABLE_GDB),$@.core,$$RET) >> $@.log 2>&1;) \
+                $(if $(filter WNT,$(OS)), \
+                    printf '%s: <<<\n' $(dir $(call gb_UITest_get_target,$*))/soffice.out.log; \
+                    cat $(dir $(call gb_UITest_get_target,$*))/soffice.out.log; \
+                    printf ' >>>\n\n';) \
 			    cat $@.log; $(gb_UITest_UNITTESTFAILED) UI $*))))
 endif
 


More information about the Libreoffice-commits mailing list