Kaydet (Commit) 0fd2e787 authored tarafından Miklos Vajna's avatar Miklos Vajna Kaydeden (comit) Markus Mohrhard

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/42756Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst 9fc7fb0e
...@@ -30,6 +30,13 @@ gb_UITest_GDBTRACE := --gdb ...@@ -30,6 +30,13 @@ gb_UITest_GDBTRACE := --gdb
gb_UITest__interactive := $(true) gb_UITest__interactive := $(true)
endif 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 gb_UITest_COMMAND := LIBO_LANG=en_US.UTF-8 $(gb_UITest_EXECUTABLE) $(SRCDIR)/uitest/test_main.py
.PHONY : $(call gb_UITest_get_clean_target,%) .PHONY : $(call gb_UITest_get_clean_target,%)
...@@ -66,7 +73,7 @@ else ...@@ -66,7 +73,7 @@ else
SAL_USE_VCLPLUGIN=svp \ SAL_USE_VCLPLUGIN=svp \
)) \ )) \
$(gb_UITest_COMMAND) \ $(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) \ --userdir=$(call gb_Helper_make_url,$(dir $(call gb_UITest_get_target,$*))user) \
--dir=$(strip $(MODULES)) \ --dir=$(strip $(MODULES)) \
$(gb_UITest_GDBTRACE) \ $(gb_UITest_GDBTRACE) \
......
...@@ -94,7 +94,7 @@ class OfficeConnection: ...@@ -94,7 +94,7 @@ class OfficeConnection:
url = "uno:" + socket + ";urp;StarOffice.ComponentContext" url = "uno:" + socket + ";urp;StarOffice.ComponentContext"
print("OfficeConnection: connecting to: " + url) print("OfficeConnection: connecting to: " + url)
while True: while True:
if self.soffice.poll() is not None: if self.soffice and self.soffice.poll() is not None:
raise Exception("soffice has stopped.") raise Exception("soffice has stopped.")
try: try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment