unittest: Split out registry entries to alter UI definition search path
Accessibility tests will require testing the normal UI, so will need not alter the search path for definitions. It will however benefit from other environmental overrides (locale, fonts, etc.). The solution here splits out to a separate registry the piece of configuration that alter the UI, so users can select the features set they need. The default gb_CppunitTest_use_configuration is updated to keep working the same as before, using both layers. gb_CppunitTest_use_unittest_configuration is replaced by specific ones for each configuration layer, and the two direct call sites removed as they were redundant anyway (gb_CppunitTest_use_unittest_configuration is only a subset of gb_CppunitTest_use_configuration). New macros are gb_CppunitTest_use_common_configuration for the common layer and gb_CppunitTest_use_user_ui_configuration for the UI one. Change-Id: I75f82092079752b4e173e48ab463636e7b7515b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136997 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
parent
c61f797110
commit
2dde21ea74
6 changed files with 35 additions and 19 deletions
|
@ -120,6 +120,4 @@ $(eval $(call gb_CppunitTest_use_components,sc_cond_format_merge,\
|
||||||
|
|
||||||
$(eval $(call gb_CppunitTest_use_configuration,sc_cond_format_merge))
|
$(eval $(call gb_CppunitTest_use_configuration,sc_cond_format_merge))
|
||||||
|
|
||||||
$(eval $(call gb_CppunitTest_use_unittest_configuration,sc_cond_format_merge))
|
|
||||||
|
|
||||||
# vim: set noet sw=4 ts=4:
|
# vim: set noet sw=4 ts=4:
|
||||||
|
|
|
@ -72,6 +72,4 @@ $(eval $(call gb_CppunitTest_use_components,sc_new_cond_format_api,\
|
||||||
|
|
||||||
$(eval $(call gb_CppunitTest_use_configuration,sc_new_cond_format_api))
|
$(eval $(call gb_CppunitTest_use_configuration,sc_new_cond_format_api))
|
||||||
|
|
||||||
$(eval $(call gb_CppunitTest_use_unittest_configuration,sc_new_cond_format_api))
|
|
||||||
|
|
||||||
# vim: set noet sw=4 ts=4:
|
# vim: set noet sw=4 ts=4:
|
||||||
|
|
|
@ -354,17 +354,25 @@ $(call gb_CppunitTest__use_configuration,$(1),xcsxcu,$(INSTROOT)/$(LIBO_SHARE_FO
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Use configuration in $(WORKDIR)/unittest/registry.
|
# Use configuration in $(WORKDIR)/unittest/registry-common.
|
||||||
define gb_CppunitTest_use_unittest_configuration
|
define gb_CppunitTest_use_common_configuration
|
||||||
$(call gb_CppunitTest_get_target,$(1)) : $(call gb_Package_get_target,test_unittest)
|
$(call gb_CppunitTest_get_target,$(1)) : $(call gb_Package_get_target,test_unittest)
|
||||||
$(call gb_CppunitTest__use_configuration,$(1),xcsxcu,$(WORKDIR)/unittest/registry)
|
$(call gb_CppunitTest__use_configuration,$(1),xcsxcu,$(WORKDIR)/unittest/registry-common)
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Use standard configuration: instdir config + unittest config (in this order!)
|
# Use configuration in $(WORKDIR)/unittest/registry-user-ui
|
||||||
|
define gb_CppunitTest_use_user_ui_configuration
|
||||||
|
$(call gb_CppunitTest_get_target,$(1)) : $(call gb_Package_get_target,test_unittest)
|
||||||
|
$(call gb_CppunitTest__use_configuration,$(1),xcsxcu,$(WORKDIR)/unittest/registry-user-ui)
|
||||||
|
|
||||||
|
endef
|
||||||
|
|
||||||
|
# Use standard configuration: instdir config + common + user-ui config (in this order!)
|
||||||
define gb_CppunitTest_use_configuration
|
define gb_CppunitTest_use_configuration
|
||||||
$(call gb_CppunitTest_use_instdir_configuration,$(1))
|
$(call gb_CppunitTest_use_instdir_configuration,$(1))
|
||||||
$(call gb_CppunitTest_use_unittest_configuration,$(1))
|
$(call gb_CppunitTest_use_common_configuration,$(1))
|
||||||
|
$(call gb_CppunitTest_use_user_ui_configuration,$(1))
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,8 @@ $(eval $(call gb_Package_Package,test_unittest,$(SRCDIR)/test/user-template))
|
||||||
|
|
||||||
$(eval $(call gb_Package_set_outdir,test_unittest,$(WORKDIR)))
|
$(eval $(call gb_Package_set_outdir,test_unittest,$(WORKDIR)))
|
||||||
|
|
||||||
$(eval $(call gb_Package_add_file,test_unittest,unittest/registry/modifications.xcd,registry/modifications.xcd))
|
$(eval $(call gb_Package_add_file,test_unittest,unittest/registry-common/modifications.xcd,registry-common/modifications.xcd))
|
||||||
|
$(eval $(call gb_Package_add_file,test_unittest,unittest/registry-user-ui/user-ui.xcd,registry-user-ui/user-ui.xcd))
|
||||||
$(eval $(call gb_Package_add_file,test_unittest,unittest/user/wordbook/sl.dic,user/wordbook/sl.dic))
|
$(eval $(call gb_Package_add_file,test_unittest,unittest/user/wordbook/sl.dic,user/wordbook/sl.dic))
|
||||||
$(eval $(call gb_Package_add_file,test_unittest,unittest/user/wordbook/en-US.dic,user/wordbook/en-US.dic))
|
$(eval $(call gb_Package_add_file,test_unittest,unittest/user/wordbook/en-US.dic,user/wordbook/en-US.dic))
|
||||||
$(eval $(call gb_Package_add_file,test_unittest,unittest/user/database/biblio.odb,user/database/biblio.odb))
|
$(eval $(call gb_Package_add_file,test_unittest,unittest/user/database/biblio.odb,user/database/biblio.odb))
|
||||||
|
|
|
@ -106,15 +106,6 @@
|
||||||
</node>
|
</node>
|
||||||
</node>
|
</node>
|
||||||
</oor:component-data>
|
</oor:component-data>
|
||||||
<oor:component-data oor:name="Paths" oor:package="org.openoffice.Office">
|
|
||||||
<node oor:name="Paths">
|
|
||||||
<node oor:name="UIConfig" oor:op="replace">
|
|
||||||
<node oor:name="InternalPaths">
|
|
||||||
<node oor:name="$(userurl)/config" oor:op="fuse"/>
|
|
||||||
</node>
|
|
||||||
</node>
|
|
||||||
</node>
|
|
||||||
</oor:component-data>
|
|
||||||
<oor:component-data oor:name="Setup" oor:package="org.openoffice">
|
<oor:component-data oor:name="Setup" oor:package="org.openoffice">
|
||||||
<node oor:name="L10N">
|
<node oor:name="L10N">
|
||||||
<prop oor:name="ooLocale">
|
<prop oor:name="ooLocale">
|
20
test/user-template/registry-user-ui/user-ui.xcd
Normal file
20
test/user-template/registry-user-ui/user-ui.xcd
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
* This file is part of the LibreOffice project.
|
||||||
|
*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*
|
||||||
|
-->
|
||||||
|
<oor:data xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:oor="http://openoffice.org/2001/registry">
|
||||||
|
<oor:component-data oor:name="Paths" oor:package="org.openoffice.Office">
|
||||||
|
<node oor:name="Paths">
|
||||||
|
<node oor:name="UIConfig" oor:op="replace">
|
||||||
|
<node oor:name="InternalPaths">
|
||||||
|
<node oor:name="$(userurl)/config" oor:op="fuse"/>
|
||||||
|
</node>
|
||||||
|
</node>
|
||||||
|
</node>
|
||||||
|
</oor:component-data>
|
||||||
|
</oor:data>
|
Loading…
Reference in a new issue