solenv/gbuild/JunitTest.mk       |    2 +-
 solenv/gbuild/platform/macosx.mk |   21 ++++++++++++++++++++-
 2 files changed, 21 insertions(+), 2 deletions(-)

New commits:
commit 8a4e5e55100d396af2ab4a95f70e0fe0b1b8b079
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Fri Apr 19 13:18:08 2013 +0200

    Interactive JuniTest debugging on Mac OS X, too
    
    Change-Id: If1faab6b5903e287d800899f243b8b568b27c312

diff --git a/solenv/gbuild/JunitTest.mk b/solenv/gbuild/JunitTest.mk
index 1224087..3c1ca48 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 011aaae..5ce425c 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
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to