summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-11-14 02:41:50 +0100
committerBjörn Michaelsen <bjoern.michaelsen@canonical.com>2015-11-17 09:35:25 +0000
commit4f76e46290b26deeb4f9660c580a5ffef58a557e (patch)
treec5d692f73ddfde9f168b0b29a5d6a0626556586b /solenv
parent474f5eebb8d86df3384ddecac1452c85524b0c28 (diff)
make CPPUNITTRACE=TRUE a shortcut for debuging on WNT
Change-Id: Ie834e1e1592163977435f0af6dde04c4fe86c1bf Reviewed-on: https://gerrit.libreoffice.org/19977 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/CppunitTest.mk6
-rw-r--r--solenv/gbuild/platform/com_GCC_class.mk6
-rw-r--r--solenv/gbuild/platform/com_MSC_class.mk4
-rwxr-xr-xsolenv/gbuild/platform/unittest-failed-WNT.sh1
4 files changed, 14 insertions, 3 deletions
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 93aa1a3465b1..b90fb7fac7e4 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -22,12 +22,12 @@
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 $(DEBUGCPPUNIT)),TRUE)
-gb_CppunitTest_GDBTRACE := gdb -nx -ex "add-auto-load-safe-path $(INSTDIR)" --batch --command=$(SRCDIR)/solenv/bin/gdbtrycatchtrace-stdout -return-child-result --args
-else ifneq ($(strip $(CPPUNITTRACE)),)
+ifeq ($(strip $(gb_CppunitTest_GDBTRACE)),)
+ifneq ($(strip $(CPPUNITTRACE)),)
gb_CppunitTest_GDBTRACE := $(CPPUNITTRACE)
gb_CppunitTest__interactive := $(true)
endif
+endif
ifneq ($(strip $(VALGRIND)),)
gb_CppunitTest_VALGRINDTOOL := valgrind --tool=$(VALGRIND) --num-callers=50 --error-exitcode=1 --trace-children=yes --trace-children-skip='*/java,*/gij'
diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk
index 917b1557dec7..b7c1e6537184 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -190,6 +190,12 @@ $(call gb_Helper_abbreviate_dirs,\
endef
+# CppunitTest class
+
+ifeq ($(strip $(DEBUGCPPUNIT)),TRUE)
+gb_CppunitTest_GDBTRACE := gdb -nx -ex "add-auto-load-safe-path $(INSTDIR)" --batch --command=$(SRCDIR)/solenv/bin/gdbtrycatchtrace-stdout -return-child-result --args
+endif
+
# ExternalProject class
gb_ExternalProject_use_autoconf :=
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index 41bab51d7f21..2ed964955937 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -439,6 +439,10 @@ endef
gb_PythonTest_PRECOMMAND := $(gb_CppunitTest_CPPTESTPRECOMMAND)
gb_PythonTest_DEPS := $(call gb_Package_get_target,python3)
+ifeq ($(strip $(CPPUNITTRACE)),TRUE)
+gb_CppunitTest_GDBTRACE := '$(DEVENV)' /debugexe
+endif
+
# SrsPartTarget class
ifeq ($(gb_FULLDEPS),$(true))
diff --git a/solenv/gbuild/platform/unittest-failed-WNT.sh b/solenv/gbuild/platform/unittest-failed-WNT.sh
index 9ac742bab65a..55b583d1108d 100755
--- a/solenv/gbuild/platform/unittest-failed-WNT.sh
+++ b/solenv/gbuild/platform/unittest-failed-WNT.sh
@@ -19,6 +19,7 @@
cat << EOF
Error: a unit test failed, please do one of:
+make $1Test_$2 CPPUNITTRACE=TRUE # which is a shortcut for the following line
make $1Test_$2 CPPUNITTRACE="'$DEVENV' /debugexe" # for interactive debugging in Visual Studio
make $1Test_$2 CPPUNITTRACE="drmemory -free_max_frames 20" # for memory checking (install Dr.Memory first, and put it to your PATH)