diff options
author | Jan Holesovsky <kendy@suse.cz> | 2013-04-30 14:11:44 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2013-04-30 14:12:50 +0200 |
commit | b308d0b061b24688cf1312af817a2af1c21e2bd8 (patch) | |
tree | 7e0d2d8afd4b3db5a45f6d88dc427f722c122d86 /solenv | |
parent | 0ef769f4ad4ee47eb6c5f316c4f9891ae724c975 (diff) |
More helpful message how to re-run a unit test that failed.
Change-Id: Ibd85ecd6a24611313a24b79b3e4b122eccd02a81
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/CppunitTest.mk | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk index a4478eea355d..cb12753cf377 100644 --- a/solenv/gbuild/CppunitTest.mk +++ b/solenv/gbuild/CppunitTest.mk @@ -30,7 +30,10 @@ # CppunitTest class -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 "and retry." +# 1st parameter gives 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)" +endef ifeq ($(strip $(DEBUGCPPUNIT)),TRUE) gb_CppunitTest_GDBTRACE := gdb -nx -ex "add-auto-load-safe-path $(OUTDIR)/lib" --command=$(SOLARENV)/bin/gdbtrycatchtrace-stdout -return-child-result --args @@ -97,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 && $(UNIT_FAILED_MSG) \ + || (RET=$$? && cat $@.log && $(call gb_UNIT_FAILED_MSG,$*) \ $(if $(value gb_CppunitTest_postprocess), \ && $(call gb_CppunitTest_postprocess,$(gb_CppunitTest_CPPTESTCOMMAND),$@.core,$$RET)) \ && false)))) |