Kaydet (Commit) b308d0b0 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

More helpful message how to re-run a unit test that failed.

Change-Id: Ibd85ecd6a24611313a24b79b3e4b122eccd02a81
üst 0ef769f4
......@@ -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))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment