summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-06-04 08:45:54 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-06-04 08:55:12 +0200
commit369d95931f42267eb2f55e066f58ee859183025d (patch)
treef6047cebccb31dea56653bb1adfa08f853d09918 /solenv
parent9e13afeaf67b9c07762692cd858de4b577234ab7 (diff)
DeInitVCL at end of tests
This required some changes to the framework: * Init-/DeInitVCL is no longer done per individual test in BootstrapFixture, but once per CppunitTest invocation in a new vclbootstrapprotector (similarly to the exisiting unobootstrapprotector). CppunitTests that need VCL now need to declare gb_CppunitTest_use_vcl. * For things to work properly, the UNO component context needs to be disposed from within DeInitVCL (cf. Desktop's Application::DeInit called from DeInitVCL). The easiest solution was to introduce an Application::setDeInitHook (where the hook is called from DeInitVCL) specifically for vclbootstrapprotector to call. * PythonTests don't (yet) call DeInitVCL; they still hook into BootstrapFixture's original test_init functionality (to call InitVCL), and do not make use of the vclbootstrapprotector. Change-Id: I4f3a3c75db30b58c1cd49d81c51db14902ed68b2
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/CppunitTest.mk13
1 files changed, 12 insertions, 1 deletions
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index cfbfd815eeab..c442601bd84c 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -57,7 +57,11 @@ $(if $(URE),\
-env:LO_JAVA_DIR=$(call gb_Helper_make_url,$(INSTROOT)/$(LIBO_SHARE_JAVA_FOLDER)) \
--protector $(call gb_Library_get_target,unoexceptionprotector) unoexceptionprotector \
--protector $(call gb_Library_get_target,unobootstrapprotector) unobootstrapprotector \
- ) $(ARGS)
+ ) \
+$(if $(VCL),\
+ --protector $(call gb_Library_get_target,vclbootstrapprotector) vclbootstrapprotector \
+ ) \
+$(ARGS)
endef
.PHONY : $(call gb_CppunitTest_get_clean_target,%)
@@ -115,6 +119,7 @@ $(call gb_CppunitTest_CppunitTest_platform,$(1),$(2),$(gb_CppunitTest_DLLDIR)/$(
$(call gb_CppunitTest_get_target,$(1)) : ARGS :=
$(call gb_CppunitTest_get_target,$(1)) : CONFIGURATION_LAYERS :=
$(call gb_CppunitTest_get_target,$(1)) : URE := $(false)
+$(call gb_CppunitTest_get_target,$(1)) : VCL := $(false)
$(call gb_CppunitTest_get_target,$(1)) : UNO_SERVICES :=
$(call gb_CppunitTest_get_target,$(1)) : UNO_TYPES :=
$(call gb_CppunitTest_get_target,$(1)) : HEADLESS := --headless
@@ -142,6 +147,12 @@ $(call gb_CppunitTest_get_target,$(1)) : $(call gb_Library_get_target,unoexcepti
endef
+define gb_CppunitTest_use_vcl
+$(call gb_CppunitTest_get_target,$(1)) : VCL := $(true)
+$(call gb_CppunitTest_get_target,$(1)) : $(call gb_Library_get_target,vclbootstrapprotector)
+
+endef
+
define gb_CppunitTest__use_api
$(call gb_CppunitTest_get_target,$(1)) : $(call gb_UnoApi_get_target,$(2))
$(call gb_CppunitTest_get_target,$(1)) : UNO_TYPES += $(call gb_UnoApi_get_target,$(2))