summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-09-25 17:31:18 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-10-02 20:05:23 +0200
commit0fd2e787974853b48c54ed7a165ee7edda80af64 (patch)
tree8dca03b68665b1e304318f80ce1cdbf5925ed6ea
parenttdf#112769 Don't multi-trigger AllEventsProcessed (diff)
downloadcore-0fd2e787974853b48c54ed7a165ee7edda80af64.tar.gz
core-0fd2e787974853b48c54ed7a165ee7edda80af64.zip
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 <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--solenv/gbuild/UITest.mk9
-rw-r--r--uitest/libreoffice/connection.py2
2 files changed, 9 insertions, 2 deletions
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: