diff options
-rw-r--r-- | smoketest/CppunitTest_smoketest.mk | 2 | ||||
-rw-r--r-- | solenv/gbuild/CppunitTest.mk | 21 |
2 files changed, 21 insertions, 2 deletions
diff --git a/smoketest/CppunitTest_smoketest.mk b/smoketest/CppunitTest_smoketest.mk index da2538caf8d7..c2d4f2f47265 100644 --- a/smoketest/CppunitTest_smoketest.mk +++ b/smoketest/CppunitTest_smoketest.mk @@ -27,6 +27,8 @@ $(eval $(call gb_CppunitTest_CppunitTest,smoketest)) +$(eval $(call gb_CppunitTest_abort_on_assertion,smoketest)) + $(eval $(call gb_CppunitTest_add_exception_objects,smoketest,\ smoketest/smoketest \ )) diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk index 0d8959e0c841..15e5aa161b63 100644 --- a/solenv/gbuild/CppunitTest.mk +++ b/solenv/gbuild/CppunitTest.mk @@ -52,7 +52,7 @@ endif # gb_CppunitTest_get_filename # DBGSV_ERROR_OUT => in non-product builds, ensure that tools-based assertions do not pop up as message box, but are routed to the shell gb_CppunitTest_CPPTESTTARGET := $(call gb_Executable_get_target,cppunit/cppunittester) -gb_CppunitTest_CPPTESTCOMMAND := $(gb_CppunitTest_CPPTESTPRECOMMAND) $(if $(G_SLICE),G_SLICE=$(G_SLICE)) $(if $(GLIBCXX_FORCE_NEW),GLIBCXX_FORCE_NEW=$(GLIBCXX_FORCE_NEW)) DBGSV_ERROR_OUT=shell STAR_RESOURCEPATH=$(dir $(call gb_ResTarget_get_outdir_target,example)) $(gb_CppunitTest_GDBTRACE) $(gb_CppunitTest_VALGRINDTOOL) $(gb_CppunitTest_CPPTESTTARGET) + gb_CppunitTest__get_linktargetname = CppunitTest/$(call gb_CppunitTest_get_filename,$(1)) # TODO: move this to platform under suitable name @@ -83,7 +83,16 @@ $(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 && $(UNIT_FAILED_MSG) && false)))) + ($(gb_CppunitTest_CPPTESTPRECOMMAND) \ + $(if $(G_SLICE),G_SLICE=$(G_SLICE)) \ + $(if $(GLIBCXX_FORCE_NEW),GLIBCXX_FORCE_NEW=$(GLIBCXX_FORCE_NEW)) \ + $(if $(DBGSV_ERROR_OUT),DBGSV_ERROR_OUT=$(DBGSV_ERROR_OUT)) \ + $(if $(SAL_DIAGNOSE_ABORT),SAL_DIAGNOSE_ABORT=$(SAL_DIAGNOSE_ABORT)) \ + STAR_RESOURCEPATH=$(dir $(call gb_ResTarget_get_outdir_target,example)) \ + $(gb_CppunitTest_GDBTRACE) $(gb_CppunitTest_VALGRINDTOOL) $(gb_CppunitTest_CPPTESTTARGET) \ + $(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))) @@ -111,10 +120,18 @@ $(call gb_CppunitTest_get_target,$(1)) : ARGS := $(call gb_CppunitTest_get_target,$(1)) : URE := $(false) $(call gb_CppunitTest_get_target,$(1)) : UNO_SERVICES := $(call gb_CppunitTest_get_target,$(1)) : UNO_TYPES := +$(call gb_CppunitTest_get_target,$(1)) : DBGSV_ERROR_OUT := shell +$(call gb_CppunitTest_get_target,$(1)) : SAL_DIAGNOSE_ABORT := $$(eval $$(call gb_Module_register_target,$(call gb_CppunitTest_get_target,$(1)),$(call gb_CppunitTest_get_clean_target,$(1)))) endef +define gb_CppunitTest_abort_on_assertion +$(call gb_CppunitTest_get_target,$(1)) : DBGSV_ERROR_OUT := abort +$(call gb_CppunitTest_get_target,$(1)) : SAL_DIAGNOSE_ABORT := TRUE + +endef + define gb_CppunitTest_set_args $(call gb_CppunitTest_get_target,$(1)) : ARGS := $(2) |