summaryrefslogtreecommitdiff
path: root/solenv/gbuild/CppunitTest.mk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-09-24 19:11:02 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-09-25 07:08:15 +0200
commitfb06d5b1784cb8b91ea6d286b3f2baa38fed0b4c (patch)
treedd79d598de00340de5f3c4a0ed6bf540ed5319bf /solenv/gbuild/CppunitTest.mk
parentd237230ea014ba7a792c5ebccab28abe09868fc7 (diff)
Run gdb with PYTHONWARNINGS=default
Otherwise, --enable-werror (setting PYTHONWARNINGS=error) would cause Cppunit-/PythonTest with CPPUNITTRACE='gdb --args' on Linux to print lots of messages like > Python Exception <class 'DeprecationWarning'> the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses: > gdb: warning: > Could not load the Python gdb module from `/usr/share/gdb/python'. > Limited Python support is available from the _gdb module. > Suggest passing --data-directory=/path/to/gdb/data-directory. and > Traceback (most recent call last): > File "instdir/program/python.bin-gdb.py", line 48, in <module> > import gdb > File "/usr/share/gdb/python/gdb/__init__.py", line 23, in <module> > from imp import reload > File "/usr/lib64/python3.8/imp.py", line 31, in <module> > warnings.warn("the imp module is deprecated in favour of importlib; " DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses Change-Id: Id85b2ee6d3cfaeaf91659bfb649a3cb78c707447 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103349 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'solenv/gbuild/CppunitTest.mk')
-rw-r--r--solenv/gbuild/CppunitTest.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index cd28e578cc1e..f0bad770cf6c 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -26,10 +26,10 @@ 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) $(gb_CppunitTest_DEBUGCPPUNIT),\
+ PYTHONWARNINGS=default gdb -return-child-result -ex "add-auto-load-safe-path $(INSTDIR)" -ex "set environment $(subst =, ,$(gb_CppunitTest_CPPTESTPRECOMMAND))" $(if $(PYTHONWARNINGS),-ex 'set environment PYTHONWARNINGS $(PYTHONWARNINGS)') $(gb_CppunitTest_malloc_check) $(gb_CppunitTest_DEBUGCPPUNIT),\
$(CPPUNITTRACE))
gb_PythonTest_GDBTRACE := $(subst gdb,\
- gdb -return-child-result -ex "add-auto-load-safe-path $(INSTDIR)" -ex "set environment $(subst =, ,$(gb_PythonTest_PRECOMMAND))" $(gb_CppunitTest_malloc_check) $(gb_CppunitTest_DEBUGCPPUNIT),\
+ 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))