solenv/gbuild/CppunitTest.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit b308d0b061b24688cf1312af817a2af1c21e2bd8 Author: Jan Holesovsky <[email protected]> Date: Tue Apr 30 14:11:44 2013 +0200 More helpful message how to re-run a unit test that failed. Change-Id: Ibd85ecd6a24611313a24b79b3e4b122eccd02a81 diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk index a4478ee..cb12753 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),, \ > [email protected] 2>&1 \ - || (RET=$$? && cat [email protected] && $(UNIT_FAILED_MSG) \ + || (RET=$$? && cat [email protected] && $(call gb_UNIT_FAILED_MSG,$*) \ $(if $(value gb_CppunitTest_postprocess), \ && $(call gb_CppunitTest_postprocess,$(gb_CppunitTest_CPPTESTCOMMAND),[email protected],$$RET)) \ && false)))) _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
