summaryrefslogtreecommitdiff
path: root/solenv/gbuild/CppunitTest.mk
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-01-23 12:51:38 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-01-23 12:55:09 +0100
commitb5e988ffc121147c052cf9d6992afc35db3df49b (patch)
treea53aa6530614fa683b2d236c230b8ffdd73146ee /solenv/gbuild/CppunitTest.mk
parent62c2022ba73b165072e0bf01f7f368f0ecda9aad (diff)
make unittest failure foo a script
- first of all, code from CppunitTest.mk used from PythonTest.mk is bad anyway - also, this shortens and removes noise from the commandline executed Change-Id: I6c5b41a0c497b766c3293aeec5c59240aa3ef37c
Diffstat (limited to 'solenv/gbuild/CppunitTest.mk')
-rw-r--r--solenv/gbuild/CppunitTest.mk9
1 files changed, 1 insertions, 8 deletions
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index b2c268ddeaf7..ba3ddac11570 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -17,15 +17,8 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-
# CppunitTest class
-# $(1): "Cppunit" or "Python"
-# $(2): the name of the unit test that failed
-define gb_UNIT_FAILED_MSG
-printf '\nError: a unit test failed, please do one of:\n\nexport DEBUGCPPUNIT=TRUE # for exception catching\nexport CPPUNITTRACE="gdb --args" # for interactive debugging on linux\nexport CPPUNITTRACE="\"[full path to devenv.exe]\" /debugexe" # for interactive debugging in Visual Studio\nexport VALGRIND=memcheck # for memory checking\n\nand retry using: make %sTest_%s\n\n' $(1) $(2)
-endef
-
ifeq ($(strip $(DEBUGCPPUNIT)),TRUE)
gb_CppunitTest_GDBTRACE := gdb -nx -ex "add-auto-load-safe-path $(INSTDIR)" --command=$(SRCDIR)/solenv/bin/gdbtrycatchtrace-stdout -return-child-result --args
else ifneq ($(strip $(CPPUNITTRACE)),)
@@ -96,7 +89,7 @@ $(call gb_CppunitTest_get_target,%) :| $(gb_CppunitTest_CPPTESTDEPS)
|| ($(if $(value gb_CppunitTest_postprocess), \
RET=$$?; \
$(call gb_CppunitTest_postprocess,$(gb_CppunitTest_CPPTESTCOMMAND),$@.core,$$RET) >> $@.log 2>&1;) \
- cat $@.log; $(call gb_UNIT_FAILED_MSG,Cppunit,$*); false))))
+ cat $@.log; $(SRCDIR)/solenv/bin/unittest-failed.sh Cppunit $*))))
define gb_CppunitTest_CppunitTest
$(call gb_CppunitTest__CppunitTest_impl,$(1),$(call gb_CppunitTest_get_linktarget,$(1)))