summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2016-12-06 19:30:00 +0200
committerTor Lillqvist <tml@collabora.com>2016-12-06 20:55:47 +0200
commitc38a4d9ce248b4b3fcc9208b25dfa599fe506ac0 (patch)
treeb25b16dd5ff1d13fb35402993090da0cc645be77 /solenv
parent367c9550ccbe324ed345ead9c288c9bd2f72ea93 (diff)
Make the CPPUNITTRACE="lldb --" thing work again (on macOS)
It doesn't seem to work (any longer in 10.12) to pass DYLD_LIBRARY_PATH in the environment to the process to be run under lldb. We need to make lldb execute an explicit 'settings set target.env-vars' command. Use a temporary file to pass that command. I could not figure out where to call the gb_CppunitTest_POSTGDBTRACE macro I define, to remove the temporary file, sorry. Help appreciated. Change-Id: I46bd05f14623639e6ce10112b92ef497cdbb0755
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/CppunitTest.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 1e4ed412074a..9d60a0271b16 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -29,7 +29,13 @@ gb_CppunitTest_PYTHONDEPS ?= $(call gb_Library_get_target,pyuno_wrapper) $(if $(
ifeq ($(strip $(gb_CppunitTest_GDBTRACE)),)
ifneq ($(strip $(CPPUNITTRACE)),)
+ifneq ($(filter gdb,$(CPPUNITTRACE)),)
gb_CppunitTest_GDBTRACE := $(subst gdb,gdb -ex "set environment $(subst =, ,$(gb_CppunitTest_CPPTESTPRECOMMAND))",$(CPPUNITTRACE))
+else ifneq ($(filter lldb,$(CPPUNITTRACE)),)
+dyldpathfile=$(call var2file,$(shell $(gb_MKTEMP)),500,settings set target.env-vars $(gb_CppunitTest_CPPTESTPRECOMMAND))
+gb_CppunitTest_GDBTRACE := $(subst lldb,lldb -s $(dyldpathfile),$(CPPUNITTRACE))
+gb_CppunitTest_POSTGDBTRACE := ; rm -f $(dyldpathfile)
+endif
gb_CppunitTest__interactive := $(true)
endif
endif