Add gb_CppunitTest_use_confpreinit:

For unit tests that use the VCL event loop we can use this to
avoid the otherwise required restart.

Change-Id: I48265d7e7188a4efaa6f87432c762320331c0c78
This commit is contained in:
Andrzej Hunt
2014-07-21 19:35:13 +02:00
committed by Tomaž Vajngerl
parent 5acadbfb0c
commit b1646178d8

View File

@@ -82,6 +82,8 @@ $(call gb_CppunitTest_get_target,%) :| $(gb_CppunitTest_CPPTESTDEPS)
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $@) && \
rm -fr $@.user && mkdir $@.user && \
$(if $(gb_CppunitTest__use_confpreinit), \
$(INSTDIR)/program/lokconf_init $(call gb_CppunitTest__make_args) &&) \
$(if $(gb_CppunitTest__interactive),, \
$(if $(value gb_CppunitTest_postprocess), \
rm -fr $@.core && mkdir $@.core && cd $@.core &&)) \
@@ -177,6 +179,12 @@ endif
endef
define gb_CppunitTest_use_confpreinit
$(call gb_CppunitTest_use_executable,$(1),lokconf_init)
$(call gb_CppunitTest_get_target,$(1)) : gb_CppunitTest__use_confpreinit := TRUE
endef
define gb_CppunitTest_use_vcl
$(call gb_CppunitTest__use_vcl,$(1),$(true))