summaryrefslogtreecommitdiff
path: root/solenv/gbuild
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-04-30 23:14:26 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-04-30 23:14:26 +0200
commit2736aff1f9a5c32c13993ff540e599291b7688ca (patch)
treee7bf6eb2ffca6533ce1ca9bc4170d327e1506b70 /solenv/gbuild
parent385ed97ac31e807288b77d74b510d098a1f9dbf0 (diff)
...and fix gb_UNIT_FAILED_MSG output
Change-Id: I0fa3036c5be34eb598e0390430028ae818ebef0d
Diffstat (limited to 'solenv/gbuild')
-rw-r--r--solenv/gbuild/CppunitTest.mk8
-rw-r--r--solenv/gbuild/PythonTest.mk2
2 files changed, 5 insertions, 5 deletions
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index cb12753cf377..3daa20252282 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -29,10 +29,10 @@
# CppunitTest class
-
-# 1st parameter gives the name of the unit test that failed
+# $(1): "Cppunit" or "Python"
+# $(2): the name of the unit test that failed
define gb_UNIT_FAILED_MSG
-echo; echo "Error: a unit test failed, please do one of:"; echo; echo "export DEBUGCPPUNIT=TRUE \# for exception catching"; echo "export GDBCPPUNITTRACE=\"gdb --args\" \# for interactive debugging"; echo "export VALGRIND=memcheck \# for memory checking" ; echo ; echo "and retry using: make CppunitTest_$(1)"
+printf '\nError: a unit test failed, please do one of:\n\nexport DEBUGCPPUNIT=TRUE # for exception catching\nexport GDBCPPUNITTRACE="gdb --args" # for interactive debugging\nexport VALGRIND=memcheck # for memory checking\n\nand retry using: make %sTest_%s' $(1) $(2)
endef
ifeq ($(strip $(DEBUGCPPUNIT)),TRUE)
@@ -100,7 +100,7 @@ $(call gb_CppunitTest_get_target,%) :| $(gb_CppunitTest_CPPTESTDEPS)
$(call gb_CppunitTest__make_args) \
$(if $(gb_CppunitTest__interactive),, \
> $@.log 2>&1 \
- || (RET=$$? && cat $@.log && $(call gb_UNIT_FAILED_MSG,$*) \
+ || (RET=$$? && cat $@.log && $(call gb_UNIT_FAILED_MSG,Cppunit,$*) \
$(if $(value gb_CppunitTest_postprocess), \
&& $(call gb_CppunitTest_postprocess,$(gb_CppunitTest_CPPTESTCOMMAND),$@.core,$$RET)) \
&& false))))
diff --git a/solenv/gbuild/PythonTest.mk b/solenv/gbuild/PythonTest.mk
index a7b398fb01ee..9b450e7353c8 100644
--- a/solenv/gbuild/PythonTest.mk
+++ b/solenv/gbuild/PythonTest.mk
@@ -46,7 +46,7 @@ $(call gb_PythonTest_get_target,%) :
$(MODULES) \
$(if $(gb_CppunitTest__interactive),, \
> $@.log 2>&1 \
- || (cat $@.log && $(call gb_UNIT_FAILED_MSG,$*) \
+ || (cat $@.log && $(call gb_UNIT_FAILED_MSG,Python,$*) \
$(if $(value gb_CppunitTest_postprocess), \
&& $(call gb_CppunitTest_postprocess,$(gb_PythonTest_EXECUTABLE_GDB),$@.core,139)) \
&& false))))