[Libreoffice-commits] core.git: solenv/gbuild
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 25 07:11:19 UTC 2020
solenv/gbuild/CppunitTest.mk | 4 ++--
solenv/gbuild/PythonTest.mk | 11 ++++++++---
2 files changed, 10 insertions(+), 5 deletions(-)
New commits:
commit 0ddcdaf289aa2e3d986811b6289b11880284602e
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Sep 25 08:11:34 2020 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Sep 25 09:10:42 2020 +0200
Adapt PythonTest on macOS to PRE-/POSTGDBTRACE
Change-Id: Ie23f2fc2e588721ab87e35f52f306e342a5ab246
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103368
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index f0bad770cf6c..9d32cc2533ca 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -37,9 +37,9 @@ gb_CppunitTest_GDBTRACE := $(subst lldb,\
lldb -s $$lo_dyldpathfile $(gb_CppunitTest_malloc_check),\
$(CPPUNITTRACE))
gb_CppunitTest_POSTGDBTRACE := rm $$lo_dyldpathfile
-#TODO: PythonTest.mk probably needs to handle gb_CppunitTest_PREGDBTRACE and
-# gb_CppunitTest_POSTGDBTRACE in addition to gb_PythonTest_GDBTRACE (aka gb_CppunitTest_GDBTRACE):
+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)
diff --git a/solenv/gbuild/PythonTest.mk b/solenv/gbuild/PythonTest.mk
index 998df0767d2c..bc404d4fb817 100644
--- a/solenv/gbuild/PythonTest.mk
+++ b/solenv/gbuild/PythonTest.mk
@@ -9,7 +9,7 @@
# PythonTest class
-# (gb_PythonTest_GDBTRACE is defined alongside gb_CppunitTest_GDBTRACE in CppunitTest.mk)
+# (gb_PythonTest_GDBTRACE et al are defined alongside gb_CppunitTest_GDBTRACE in CppunitTest.mk)
gb_PythonTest_UNITTESTFAILED ?= $(GBUILDDIR)/platform/unittest-failed-default.sh
@@ -48,7 +48,9 @@ else
$(if $(gb_CppunitTest__interactive),, \
$(if $(value gb_CppunitTest_postprocess), \
rm -fr $@.core && mkdir $@.core && cd $@.core &&)) \
- ($(if $(filter gdb,$(gb_PythonTest_GDBTRACE)),,$(gb_PythonTest_PRECOMMAND)) \
+ { \
+ $(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)) \
$(DEFS) \
@@ -62,12 +64,15 @@ 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 \
|| ($(if $(value gb_CppunitTest_postprocess), \
RET=$$?; \
$(call gb_CppunitTest_postprocess,$(gb_PythonTest_EXECUTABLE_GDB),$@.core,$$RET) >> $@.log 2>&1;) \
- cat $@.log; $(gb_PythonTest_UNITTESTFAILED) Python $*))))
+ cat $@.log; $(gb_PythonTest_UNITTESTFAILED) Python $*)))
$(call gb_Trace_EndRange,$*,PYT)
endif
More information about the Libreoffice-commits
mailing list