summaryrefslogtreecommitdiff
path: root/solenv/gbuild
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-10-28 14:08:59 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-10-28 20:41:00 +0200
commite06ba31a037ea3ff192c9a00db6152179eb298a6 (patch)
treee9410d4444f04983770ad4d598936bf394ec1144 /solenv/gbuild
parent39fbcc330b20f2f4d1c93024734f1b330edd5408 (diff)
Fix passing DYLD_LIBRARY_PATH into lldb on macOS
...making sure that the shell expands the leading DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH:+$DYLD_LIBRARY_PATH:}... before it reaches lldb. (This gets rid of gb_{Cppunit,Pyhton}_{PRE,POST}GDBTRACE again. No idea why c38a4d9ce248b4b3fcc9208b25dfa599fe506ac0 "Make the CPPUNITTRACE="lldb --" thing work again (on macOS)" used -s with a temp file rather than -o to pass that env var into lldb.) Change-Id: I9ae5217a9629981c8652fc5aca8f97fa6eb99729 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124331 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'solenv/gbuild')
-rw-r--r--solenv/gbuild/CppunitTest.mk9
-rw-r--r--solenv/gbuild/PythonTest.mk3
2 files changed, 1 insertions, 11 deletions
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 895cb3edca49..bf29724d7eaf 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -32,14 +32,10 @@ gb_PythonTest_GDBTRACE := $(subst gdb,\
PYTHONWARNINGS=default gdb -return-child-result -ex "add-auto-load-safe-path $(INSTDIR)" -ex "set environment $(subst =, ,$(gb_PythonTest_PRECOMMAND))" $(if $(PYTHONWARNINGS),-ex 'set environment PYTHONWARNINGS $(PYTHONWARNINGS)') $(gb_CppunitTest_malloc_check) $(gb_CppunitTest_DEBUGCPPUNIT),\
$(CPPUNITTRACE))
else ifneq ($(filter lldb,$(CPPUNITTRACE)),)
-gb_CppunitTest_PREGDBTRACE := lo_dyldpathfile=$(call var2file,$(shell $(gb_MKTEMP)),500,settings set target.env-vars $(gb_CppunitTest_CPPTESTPRECOMMAND))
gb_CppunitTest_GDBTRACE := $(subst lldb,\
- lldb -s $$lo_dyldpathfile $(gb_CppunitTest_malloc_check),\
+ lldb -o "env $(gb_CppunitTest_CPPTESTPRECOMMAND)" $(gb_CppunitTest_malloc_check),\
$(CPPUNITTRACE))
-gb_CppunitTest_POSTGDBTRACE := rm $$lo_dyldpathfile
-gb_PythonTest_PREGDBTRACE := lo_dyldpathfile=$(call var2file,$(shell $(gb_MKTEMP)),500,settings set target.env-vars $(gb_PythonTest_PRECOMMAND))
gb_PythonTest_GDBTRACE := $(gb_CppunitTest_GDBTRACE)
-gb_PythonTest_POSTGDBTRACE := $(gb_CppunitTest_POSTGDBTRACE)
else
gb_CppunitTest_GDBTRACE := $(CPPUNITTRACE)
gb_PythonTest_GDBTRACE := $(gb_CppunitTest_GDBTRACE)
@@ -133,7 +129,6 @@ else
( \
$(if $(gb_CppunitTest_localized),for l in $(WITH_LANG_LIST) ; do \
printf 'LO_TEST_LOCALE=%s\n' "$$l" && LO_TEST_LOCALE="$$l" ) \
- $(if $(gb_CppunitTest_PREGDBTRACE),$(gb_CppunitTest_PREGDBTRACE) &&) \
$(if $(gb_CppunitTest__vcl_no_svp), \
$(filter-out SAL_USE_VCLPLUGIN=svp,$(gb_TEST_ENV_VARS)),$(gb_TEST_ENV_VARS)) \
$(EXTRA_ENV_VARS) \
@@ -146,8 +141,6 @@ else
$(gb_CppunitTest_CPPTESTCOMMAND) \
$(call gb_LinkTarget_get_target,$(call gb_CppunitTest_get_linktarget,$*)) \
$(call gb_CppunitTest__make_args) "-env:CPPUNITTESTTARGET=$@" \
- $(if $(gb_CppunitTest_POSTGDBTRACE), \
- ; RET=$$? && $(gb_CppunitTest_POSTGDBTRACE) && (exit $$RET)) \
$(if $(gb_CppunitTest_localized),|| exit $$?; done) \
) \
$(if $(gb_CppunitTest__interactive),, \
diff --git a/solenv/gbuild/PythonTest.mk b/solenv/gbuild/PythonTest.mk
index bc404d4fb817..4e81261d2354 100644
--- a/solenv/gbuild/PythonTest.mk
+++ b/solenv/gbuild/PythonTest.mk
@@ -49,7 +49,6 @@ else
$(if $(value gb_CppunitTest_postprocess), \
rm -fr $@.core && mkdir $@.core && cd $@.core &&)) \
{ \
- $(if $(gb_PythonTest_PREGDBTRACE),$(gb_PythonTest_PREGDBTRACE) &&) \
$(if $(filter gdb,$(gb_PythonTest_GDBTRACE)),,$(gb_PythonTest_PRECOMMAND)) \
$(if $(G_SLICE),G_SLICE=$(G_SLICE)) \
$(if $(GLIBCXX_FORCE_NEW),GLIBCXX_FORCE_NEW=$(GLIBCXX_FORCE_NEW)) \
@@ -64,8 +63,6 @@ else
$(ICECREAM_RUN) $(gb_PythonTest_GDBTRACE) $(gb_CppunitTest_VALGRINDTOOL) $(gb_CppunitTest_RR) \
$(gb_PythonTest_COMMAND) \
$(if $(PYTHON_TEST_NAME),$(PYTHON_TEST_NAME),$(MODULES)) \
- $(if $(gb_PythonTest_POSTGDBTRACE), \
- ; RET=$$? && $(gb_PythonTest_POSTGDBTRACE) && (exit $$RET)) \
; } \
$(if $(gb_CppunitTest__interactive),, \
> $@.log 2>&1 \