solenv/gbuild/CppunitTest.mk | 4 ++-- solenv/gbuild/platform/com_GCC_class.mk | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-)
New commits: commit 9ad61fe99f02e0da7333e7b81834a96983ad48c2 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Thu Sep 24 10:53:30 2020 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Thu Sep 24 15:16:43 2020 +0200 Implement DEBUGCPPUNIT as a special case of CPPUNITTRACE ...so that gb_CppunitTest_GDBTRACE is only defined in a single place now (in solenv/gbuild/CppunitTest.mk), which should make reasoning about the code simpler Change-Id: I275a20c2fe473e68f4bb08a3fe2691a5809f91a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103298 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk index 612a89286935..356b4317ab4f 100644 --- a/solenv/gbuild/CppunitTest.mk +++ b/solenv/gbuild/CppunitTest.mk @@ -22,12 +22,11 @@ gb_CppunitTest_UNITTESTFAILED ?= $(GBUILDDIR)/platform/unittest-failed-default.sh gb_CppunitTest_PYTHONDEPS ?= $(call gb_Library_get_target,pyuno_wrapper) $(if $(SYSTEM_PYTHON),,$(call gb_Package_get_target,python3)) -ifeq ($(strip $(gb_CppunitTest_GDBTRACE)),) ifneq ($(strip $(CPPUNITTRACE)),) ifneq ($(filter gdb,$(CPPUNITTRACE)),) # sneak (a) setting the LD_LIBRARY_PATH, and (b) setting malloc debug flags, into the "gdb --args" command line gb_CppunitTest_GDBTRACE := $(subst gdb,\ - gdb -return-child-result -ex "add-auto-load-safe-path $(INSTDIR)" -ex "set environment $(subst =, ,$(gb_CppunitTest_CPPTESTPRECOMMAND))" $(gb_CppunitTest_malloc_check),\ + gdb -return-child-result -ex "add-auto-load-safe-path $(INSTDIR)" -ex "set environment $(subst =, ,$(gb_CppunitTest_CPPTESTPRECOMMAND))" $(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)) @@ -38,6 +37,7 @@ gb_CppunitTest_POSTGDBTRACE := rm $$lo_dyldpathfile else gb_CppunitTest_GDBTRACE := $(CPPUNITTRACE) endif +ifneq ($(strip $(DEBUGCPPUNIT)),TRUE) gb_CppunitTest__interactive := $(true) endif endif diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk index ea4f69efcd35..4d3003923433 100644 --- a/solenv/gbuild/platform/com_GCC_class.mk +++ b/solenv/gbuild/platform/com_GCC_class.mk @@ -194,7 +194,13 @@ endef # CppunitTest class ifeq ($(strip $(DEBUGCPPUNIT)),TRUE) -gb_CppunitTest_GDBTRACE := gdb -nx -ex "set environment $(subst =, ,$(gb_CppunitTest_CPPTESTPRECOMMAND))" --batch --command=$(SRCDIR)/solenv/bin/gdbtrycatchtrace-stdout --args +ifeq ($(strip $(CPPUNITTRACE)),) +CPPUNITTRACE := gdb --args +endif +ifeq ($(filter gdb,$(CPPUNITTRACE)),) +$(error For DEBUGCPPUNIT=TRUE, CPPUNITTRACE must be a command that runs gdb) +endif +gb_CppunitTest_DEBUGCPPUNIT := -nx --batch --command=$(SRCDIR)/solenv/bin/gdbtrycatchtrace-stdout endif # ExternalProject class _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits