summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-04-19 13:18:08 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-04-19 13:18:08 +0200
commit8a4e5e55100d396af2ab4a95f70e0fe0b1b8b079 (patch)
tree0a3310536569b39c080c07f9e9bd33ea4e4aa718 /solenv
parent7c0c20076d95e911fb44fd2c5b4a028d87b7023e (diff)
Interactive JuniTest debugging on Mac OS X, too
Change-Id: If1faab6b5903e287d800899f243b8b568b27c312
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/JunitTest.mk2
-rw-r--r--solenv/gbuild/platform/macosx.mk21
2 files changed, 21 insertions, 2 deletions
diff --git a/solenv/gbuild/JunitTest.mk b/solenv/gbuild/JunitTest.mk
index 12240879c1f9..3c1ca4840d8e 100644
--- a/solenv/gbuild/JunitTest.mk
+++ b/solenv/gbuild/JunitTest.mk
@@ -57,7 +57,7 @@ $(call gb_JunitTest_get_target,%) :
&& echo "to rerun just this failed test without all others, run:" \
&& echo && echo " make JunitTest_$*" && echo \
&& echo "cd into the module dir to run the tests faster" \
- && echo "Or to do interactive debugging, run two shells with (Linux only):" \
+ && echo "Or to do interactive debugging (non-Windows), run two shells with:" \
&& echo \
&& echo " make debugrun" \
&& echo " make gb_JunitTest_DEBUGRUN=T JunitTest_$*" \
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 011aaaeec407..5ce425cfa5a4 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -313,15 +313,34 @@ endef
# JunitTest class
+ifneq ($(OOO_TEST_SOFFICE),)
+gb_JunitTest_SOFFICEARG:=$(OOO_TEST_SOFFICE)
+else
+ifneq ($(gb_JunitTest_DEBUGRUN),)
+gb_JunitTest_SOFFICEARG:=connect:pipe,name=$(USER)
+else
+gb_JunitTest_SOFFICEARG:=path:$(DEVINSTALLDIR)/opt/LibreOffice.app/Contents/MacOS/soffice
+endif
+endif
+
define gb_JunitTest_JunitTest_platform
$(call gb_JunitTest_get_target,$(1)) : DEFS := \
- -Dorg.openoffice.test.arg.soffice="$$$${OOO_TEST_SOFFICE:-path:$(DEVINSTALLDIR)/opt/LibreOffice.app/Contents/MacOS/soffice}" \
+ -Dorg.openoffice.test.arg.soffice="$(gb_JunitTest_SOFFICEARG)" \
-Dorg.openoffice.test.arg.env=DYLD_LIBRARY_PATH"$$$${DYLD_LIBRARY_PATH+=$$$$DYLD_LIBRARY_PATH}" \
-Dorg.openoffice.test.arg.user=$(call gb_Helper_make_url,$(call gb_JunitTest_get_userdir,$(1))) \
-Dorg.openoffice.test.arg.workdir=$(call gb_JunitTest_get_userdir,$(1)) \
endef
+# Module class
+
+define gb_Module_DEBUGRUNCOMMAND
+OFFICESCRIPT=$$($(gb_MKTEMP)) && \
+printf '%s\n' "set args --norestore --nologo '--accept=pipe,name=$(USER);urp;' -env:UserInstallation=$(call gb_Helper_make_url,$(DEVINSTALLDIR)/)" > $${OFFICESCRIPT} && \
+gdb -x $${OFFICESCRIPT} $(DEVINSTALLDIR)/opt/LibreOffice.app/Contents/MacOS/soffice && \
+rm $${OFFICESCRIPT}
+endef
+
# InstallModuleTarget class
define gb_InstallModuleTarget_InstallModuleTarget_platform