solenv/gbuild/CppunitTest.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 6850b0c528a7d405d81f0c1a0e95868566fd41f5 Author: Michael Meeks <michael.me...@suse.com> Date: Fri Oct 21 11:44:50 2011 +0100 more helpful error messages for debugging when a unit test fails diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk index 586a247..9908b90 100644 --- a/solenv/gbuild/CppunitTest.mk +++ b/solenv/gbuild/CppunitTest.mk @@ -33,6 +33,8 @@ DBGSV_ERROR_OUT := shell export DBGSV_ERROR_OUT +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 \# for interactive debugging"; echo "export VALGRIND=memcheck \# for memory checking" ; echo "and retry." + ifeq ($(strip $(DEBUGCPPUNIT)),TRUE) gb_CppunitTest_GDBTRACE := gdb -nx --command=$(SOLARENV)/bin/gdbtrycatchtrace-stdout -return-child-result --args else ifneq ($(strip $(GDBCPPUNITTRACE)),) @@ -85,7 +87,7 @@ $(call gb_CppunitTest_get_target,%) :| $(gb_CppunitTest_CPPTESTTARGET) $(call gb_Output_announce,$*,$(true),CUT,2) $(call gb_Helper_abbreviate_dirs_native,\ mkdir -p $(dir $@) && \ - ($(gb_CppunitTest_CPPTESTCOMMAND) $(call gb_LinkTarget_get_target,CppunitTest/$(call gb_CppunitTest_get_libfilename,$*)) $(call gb_CppunitTest__make_args,$(ARGS),$(UNO_SERVICES),$(UNO_TYPES)) $(if $(gb_CppunitTest__interactive),,> $@.log 2>&1 || (cat $@.log && false)))) + ($(gb_CppunitTest_CPPTESTCOMMAND) $(call gb_LinkTarget_get_target,CppunitTest/$(call gb_CppunitTest_get_libfilename,$*)) $(call gb_CppunitTest__make_args,$(ARGS),$(UNO_SERVICES),$(UNO_TYPES)) $(if $(gb_CppunitTest__interactive),,> $@.log 2>&1 || (cat $@.log && $(UNIT_FAILED_MSG) && false)))) define gb_CppunitTest_CppunitTest $(call gb_CppunitTest__CppunitTest_impl,$(1),$(call gb_CppunitTest__get_linktargetname,$(1))) _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits