From 369d95931f42267eb2f55e066f58ee859183025d Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 4 Jun 2014 08:45:54 +0200 Subject: 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 --- basic/CppunitTest_basic_coverage.mk | 1 + basic/CppunitTest_basic_enable.mk | 1 + basic/CppunitTest_basic_nested_struct.mk | 1 + basic/CppunitTest_basic_vba.mk | 1 + 4 files changed, 4 insertions(+) (limited to 'basic') diff --git a/basic/CppunitTest_basic_coverage.mk b/basic/CppunitTest_basic_coverage.mk index 52585fb0b898..4031177288ba 100644 --- a/basic/CppunitTest_basic_coverage.mk +++ b/basic/CppunitTest_basic_coverage.mk @@ -55,6 +55,7 @@ $(eval $(call gb_CppunitTest_use_api,basic_coverage,\ )) $(eval $(call gb_CppunitTest_use_ure,basic_coverage)) +$(eval $(call gb_CppunitTest_use_vcl,basic_coverage)) $(eval $(call gb_CppunitTest_use_components,basic_coverage,\ configmgr/source/configmgr \ diff --git a/basic/CppunitTest_basic_enable.mk b/basic/CppunitTest_basic_enable.mk index 1e3f6195bda1..c9bdef7483b4 100644 --- a/basic/CppunitTest_basic_enable.mk +++ b/basic/CppunitTest_basic_enable.mk @@ -51,6 +51,7 @@ $(eval $(call gb_CppunitTest_use_api,basic_enable,\ )) $(eval $(call gb_CppunitTest_use_ure,basic_enable)) +$(eval $(call gb_CppunitTest_use_vcl,basic_enable)) $(eval $(call gb_CppunitTest_use_components,basic_enable,\ configmgr/source/configmgr \ diff --git a/basic/CppunitTest_basic_nested_struct.mk b/basic/CppunitTest_basic_nested_struct.mk index fcb4583d5a4c..0c08cdcbe39e 100644 --- a/basic/CppunitTest_basic_nested_struct.mk +++ b/basic/CppunitTest_basic_nested_struct.mk @@ -52,6 +52,7 @@ $(eval $(call gb_CppunitTest_use_api,basic_nested_struct,\ )) $(eval $(call gb_CppunitTest_use_ure,basic_nested_struct)) +$(eval $(call gb_CppunitTest_use_vcl,basic_nested_struct)) $(eval $(call gb_CppunitTest_use_components,basic_nested_struct,\ configmgr/source/configmgr \ diff --git a/basic/CppunitTest_basic_vba.mk b/basic/CppunitTest_basic_vba.mk index 9d61671b64e3..02ac3eb3ffc3 100644 --- a/basic/CppunitTest_basic_vba.mk +++ b/basic/CppunitTest_basic_vba.mk @@ -56,6 +56,7 @@ $(eval $(call gb_CppunitTest_use_api,basic_vba,\ )) $(eval $(call gb_CppunitTest_use_ure,basic_vba)) +$(eval $(call gb_CppunitTest_use_vcl,basic_vba)) $(eval $(call gb_CppunitTest_use_components,basic_vba,\ configmgr/source/configmgr \ -- cgit