solenv/gbuild/UITest.mk | 9 ++++++++- uitest/libreoffice/connection.py | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-)
New commits: commit 0fd2e787974853b48c54ed7a165ee7edda80af64 Author: Miklos Vajna <[email protected]> Date: Mon Sep 25 17:31:18 2017 +0200 solenv: support gb_UITest_DEBUGRUN for ui tests This is similar to gb_JunitTest_DEBUGRUN, i.e. allows running soffice in gdb, and then connecting to that soffice from the test, instead of starting an own one. Change-Id: I023d6b0ede146837666c946cb865feb9046e5a94 Reviewed-on: https://gerrit.libreoffice.org/42756 Tested-by: Jenkins <[email protected]> Reviewed-by: Markus Mohrhard <[email protected]> diff --git a/solenv/gbuild/UITest.mk b/solenv/gbuild/UITest.mk index 74ffda1b25db..cebb030a12cd 100644 --- a/solenv/gbuild/UITest.mk +++ b/solenv/gbuild/UITest.mk @@ -30,6 +30,13 @@ gb_UITest_GDBTRACE := --gdb gb_UITest__interactive := $(true) endif +ifneq ($(gb_UITest_DEBUGRUN),) +gb_UITest_SOFFICEARG:=connect:pipe,name=$(USER) +gb_UITest__interactive := $(true) +else +gb_UITest_SOFFICEARG:=path:$(INSTROOT)/$(LIBO_BIN_FOLDER)/soffice +endif + gb_UITest_COMMAND := LIBO_LANG=en_US.UTF-8 $(gb_UITest_EXECUTABLE) $(SRCDIR)/uitest/test_main.py .PHONY : $(call gb_UITest_get_clean_target,%) @@ -66,7 +73,7 @@ else SAL_USE_VCLPLUGIN=svp \ )) \ $(gb_UITest_COMMAND) \ - --soffice=path:$(INSTROOT)/$(LIBO_BIN_FOLDER)/soffice \ + --soffice="$(gb_UITest_SOFFICEARG)" \ --userdir=$(call gb_Helper_make_url,$(dir $(call gb_UITest_get_target,$*))user) \ --dir=$(strip $(MODULES)) \ $(gb_UITest_GDBTRACE) \ diff --git a/uitest/libreoffice/connection.py b/uitest/libreoffice/connection.py index cc1e6acd2b0f..50fdda33fd34 100644 --- a/uitest/libreoffice/connection.py +++ b/uitest/libreoffice/connection.py @@ -94,7 +94,7 @@ class OfficeConnection: url = "uno:" + socket + ";urp;StarOffice.ComponentContext" print("OfficeConnection: connecting to: " + url) while True: - if self.soffice.poll() is not None: + if self.soffice and self.soffice.poll() is not None: raise Exception("soffice has stopped.") try: _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
