sc/CppunitTest_sc_cond_format_merge.mk | 2 - sc/CppunitTest_sc_new_cond_format_api.mk | 2 - solenv/gbuild/CppunitTest.mk | 18 ++++++++++++----- test/Package_unittest.mk | 3 +- test/user-template/registry-common/modifications.xcd | 9 -------- test/user-template/registry-user-ui/user-ui.xcd | 20 +++++++++++++++++++ 6 files changed, 35 insertions(+), 19 deletions(-)
New commits: commit 2dde21ea74223ca68865ee87558baad0d3eb4e46 Author: Colomban Wendling <cwendl...@hypra.fr> AuthorDate: Tue Jul 12 12:14:35 2022 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Tue Jul 12 16:27:18 2022 +0200 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 <sberg...@redhat.com> diff --git a/sc/CppunitTest_sc_cond_format_merge.mk b/sc/CppunitTest_sc_cond_format_merge.mk index 2752b392b0d0..c588e44580ff 100644 --- a/sc/CppunitTest_sc_cond_format_merge.mk +++ b/sc/CppunitTest_sc_cond_format_merge.mk @@ -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_unittest_configuration,sc_cond_format_merge)) - # vim: set noet sw=4 ts=4: diff --git a/sc/CppunitTest_sc_new_cond_format_api.mk b/sc/CppunitTest_sc_new_cond_format_api.mk index b158ffc23495..365c5fc81e66 100644 --- a/sc/CppunitTest_sc_new_cond_format_api.mk +++ b/sc/CppunitTest_sc_new_cond_format_api.mk @@ -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_unittest_configuration,sc_new_cond_format_api)) - # vim: set noet sw=4 ts=4: diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk index 9545f0c52f1d..7900c8f05ac5 100644 --- a/solenv/gbuild/CppunitTest.mk +++ b/solenv/gbuild/CppunitTest.mk @@ -354,17 +354,25 @@ $(call gb_CppunitTest__use_configuration,$(1),xcsxcu,$(INSTROOT)/$(LIBO_SHARE_FO endef -# Use configuration in $(WORKDIR)/unittest/registry. -define gb_CppunitTest_use_unittest_configuration +# Use configuration in $(WORKDIR)/unittest/registry-common. +define gb_CppunitTest_use_common_configuration $(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 -# 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 $(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 diff --git a/test/Package_unittest.mk b/test/Package_unittest.mk index 2aabc9272eb4..a187fcf8b1ef 100644 --- a/test/Package_unittest.mk +++ b/test/Package_unittest.mk @@ -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_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/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)) diff --git a/test/user-template/registry/modifications.xcd b/test/user-template/registry-common/modifications.xcd similarity index 92% rename from test/user-template/registry/modifications.xcd rename to test/user-template/registry-common/modifications.xcd index 61a1a85b4fa8..b5e3ad6f9fd1 100644 --- a/test/user-template/registry/modifications.xcd +++ b/test/user-template/registry-common/modifications.xcd @@ -106,15 +106,6 @@ </node> </node> </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"> <node oor:name="L10N"> <prop oor:name="ooLocale"> diff --git a/test/user-template/registry-user-ui/user-ui.xcd b/test/user-template/registry-user-ui/user-ui.xcd new file mode 100644 index 000000000000..e1ada600c5de --- /dev/null +++ b/test/user-template/registry-user-ui/user-ui.xcd @@ -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>