From e3cf2b45f700fc5f4d19790b4b29175b33d38048 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Sun, 8 Apr 2012 13:40:35 +0200 Subject: [PATCH] simplify use of configuration from unit tests --- dbaccess/CppunitTest_dbaccess_macros_test.mk | 9 ++++-- .../CppunitTest_extensions_test_update.mk | 4 +-- filter/CppunitTest_filter_tga_test.mk | 4 +-- filter/CppunitTest_filter_tiff_test.mk | 4 +-- .../CppunitTest_hwpfilter_test_hwpfilter.mk | 4 +-- ...unitTest_lotuswordpro_test_lotuswordpro.mk | 4 +-- sc/CppunitTest_sc_cellrangeobj.mk | 9 ++++-- sc/CppunitTest_sc_chart_regression_test.mk | 9 ++++-- sc/CppunitTest_sc_databaserangeobj.mk | 9 ++++-- sc/CppunitTest_sc_datapilotfieldobj.mk | 9 ++++-- sc/CppunitTest_sc_datapilottableobj.mk | 9 ++++-- sc/CppunitTest_sc_filters_test.mk | 7 ++--- sc/CppunitTest_sc_macros_test.mk | 9 ++++-- sc/CppunitTest_sc_namedrangeobj.mk | 9 ++++-- sc/CppunitTest_sc_namedrangesobj.mk | 9 ++++-- sc/CppunitTest_sc_subsequent_filters_test.mk | 7 ++--- sc/CppunitTest_sc_tableautoformatfield.mk | 9 ++++-- sc/CppunitTest_sc_tablesheetobj.mk | 9 ++++-- sc/CppunitTest_sc_tablesheetsobj.mk | 9 ++++-- sc/CppunitTest_sc_ucalc.mk | 4 +-- sd/CppunitTest_sd_filters_test.mk | 7 ++--- sd/CppunitTest_sd_regression_test.mk | 10 ++++-- sd/CppunitTest_sd_uimpress.mk | 4 +-- sdext/CppunitTest_pdfimport.mk | 4 +-- solenv/gbuild/CppunitTest.mk | 31 +++++++++++++++++++ svtools/CppunitTest_svtools_filters_test.mk | 4 +-- sw/CppunitTest_sw_filters_test.mk | 4 +-- sw/CppunitTest_sw_layout_test.mk | 9 ++++-- sw/CppunitTest_sw_macros_test.mk | 9 ++++-- sw/CppunitTest_sw_regression_test.mk | 9 ++++-- sw/CppunitTest_sw_subsequent_ooxmltok.mk | 8 +++-- sw/CppunitTest_sw_subsequent_rtftok.mk | 8 +++-- sw/CppunitTest_sw_swdoc_test.mk | 4 +-- .../CppunitTest_writerfilter_rtftok.mk | 4 +-- 34 files changed, 162 insertions(+), 99 deletions(-) diff --git a/dbaccess/CppunitTest_dbaccess_macros_test.mk b/dbaccess/CppunitTest_dbaccess_macros_test.mk index 60cc0e1164c64..395075f4a434c 100644 --- a/dbaccess/CppunitTest_dbaccess_macros_test.mk +++ b/dbaccess/CppunitTest_dbaccess_macros_test.mk @@ -116,10 +116,13 @@ $(eval $(call gb_CppunitTest_use_components,dbaccess_macros_test,\ unoxml/source/service/unoxml \ )) -$(eval $(call gb_CppunitTest_set_args,dbaccess_macros_test,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool) xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/unittest/registry)" \ +$(eval $(call gb_CppunitTest_use_configuration,dbaccess_macros_test)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,dbaccess_macros_test)) + +$(eval $(call gb_CppunitTest_use_extra_configuration,dbaccess_macros_test,\ + $(OUTDIR)/unittest/registry \ )) - # .../spool is required for the (somewhat strange) filter configuration # we need to # a) explicitly depend on library msword because it is not implied by a link diff --git a/extensions/CppunitTest_extensions_test_update.mk b/extensions/CppunitTest_extensions_test_update.mk index 6ce04b82cd47c..b7bf79567ea87 100644 --- a/extensions/CppunitTest_extensions_test_update.mk +++ b/extensions/CppunitTest_extensions_test_update.mk @@ -69,8 +69,6 @@ $(eval $(call gb_CppunitTest_use_components,extensions_test_update,\ unoxml/source/service/unoxml \ )) -$(eval $(call gb_CppunitTest_set_args,extensions_test_update,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry)" \ -)) +$(eval $(call gb_CppunitTest_use_configuration,extensions_test_update)) # vim:set shiftwidth=4 softtabstop=4 noexpandtab: diff --git a/filter/CppunitTest_filter_tga_test.mk b/filter/CppunitTest_filter_tga_test.mk index 2a8ddd021a64c..51edf537bf980 100644 --- a/filter/CppunitTest_filter_tga_test.mk +++ b/filter/CppunitTest_filter_tga_test.mk @@ -54,8 +54,6 @@ $(eval $(call gb_CppunitTest_use_components,filter_tga_test,\ configmgr/source/configmgr \ )) -$(eval $(call gb_CppunitTest_set_args,filter_tga_test,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry)" \ -)) +$(eval $(call gb_CppunitTest_use_configuration,filter_tga_test)) # vim: set noet sw=4 ts=4: diff --git a/filter/CppunitTest_filter_tiff_test.mk b/filter/CppunitTest_filter_tiff_test.mk index 1c07f80259b1c..a647a32b434d5 100644 --- a/filter/CppunitTest_filter_tiff_test.mk +++ b/filter/CppunitTest_filter_tiff_test.mk @@ -54,8 +54,6 @@ $(eval $(call gb_CppunitTest_use_components,filter_tiff_test,\ configmgr/source/configmgr \ )) -$(eval $(call gb_CppunitTest_set_args,filter_tiff_test,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry)" \ -)) +$(eval $(call gb_CppunitTest_use_configuration,filter_tiff_test)) # vim: set noet sw=4 ts=4: diff --git a/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk b/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk index c5ea37a96727f..a0b01705f1cca 100644 --- a/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk +++ b/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk @@ -61,9 +61,7 @@ $(eval $(call gb_CppunitTest_use_components,hwpfilter_test_hwpfilter,\ ucb/source/ucp/file/ucpfile1 \ )) -$(eval $(call gb_CppunitTest_set_args,hwpfilter_test_hwpfilter,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry)" \ -)) +$(eval $(call gb_CppunitTest_use_configuration,hwpfilter_test_hwpfilter)) # we need to explicitly depend on library hwp because it is not implied # by a link relation diff --git a/lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk b/lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk index 945a96f22bca7..a9b1bcd681ccb 100644 --- a/lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk +++ b/lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk @@ -61,9 +61,7 @@ $(eval $(call gb_CppunitTest_use_components,lotuswordpro_test_lotuswordpro,\ ucb/source/ucp/file/ucpfile1 \ )) -$(eval $(call gb_CppunitTest_set_args,lotuswordpro_test_lotuswordpro,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry)" \ -)) +$(eval $(call gb_CppunitTest_use_configuration,lotuswordpro_test_lotuswordpro)) # we need to explicitly depend on library lwpft because it is not implied # by a link relation diff --git a/sc/CppunitTest_sc_cellrangeobj.mk b/sc/CppunitTest_sc_cellrangeobj.mk index eb95f867536f7..a4ee45a10ff96 100644 --- a/sc/CppunitTest_sc_cellrangeobj.mk +++ b/sc/CppunitTest_sc_cellrangeobj.mk @@ -118,10 +118,13 @@ $(eval $(call gb_CppunitTest_use_components,sc_cellrangesbase,\ unoxml/source/service/unoxml \ )) -$(eval $(call gb_CppunitTest_set_args,sc_cellrangesbase,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool) xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/unittest/registry)" \ +$(eval $(call gb_CppunitTest_use_configuration,sc_cellrangesbase)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,sc_cellrangesbase)) + +$(eval $(call gb_CppunitTest_use_extra_configuration,sc_cellrangesbase,\ + $(OUTDIR)/unittest/registry \ )) - # .../spool is required for the (somewhat strange) filter configuration # we need to # a) explicitly depend on library msword because it is not implied by a link diff --git a/sc/CppunitTest_sc_chart_regression_test.mk b/sc/CppunitTest_sc_chart_regression_test.mk index 37c5915ea8908..4d4da30e004b4 100644 --- a/sc/CppunitTest_sc_chart_regression_test.mk +++ b/sc/CppunitTest_sc_chart_regression_test.mk @@ -124,10 +124,13 @@ $(eval $(call gb_CppunitTest_use_components,sc_chart_regression_test,\ xmloff/util/xo \ )) -$(eval $(call gb_CppunitTest_set_args,sc_chart_regression_test,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool) xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/unittest/registry)" \ +$(eval $(call gb_CppunitTest_use_configuration,sc_chart_regression_test)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,sc_chart_regression_test)) + +$(eval $(call gb_CppunitTest_use_extra_configuration,sc_chart_regression_test,\ + $(OUTDIR)/unittest/registry \ )) - # .../spool is required for the (somewhat strange) filter configuration # we need to # a) explicitly depend on library msword because it is not implied by a link diff --git a/sc/CppunitTest_sc_databaserangeobj.mk b/sc/CppunitTest_sc_databaserangeobj.mk index a8292a341d67a..ff2f4e8cc3eec 100644 --- a/sc/CppunitTest_sc_databaserangeobj.mk +++ b/sc/CppunitTest_sc_databaserangeobj.mk @@ -116,10 +116,13 @@ $(eval $(call gb_CppunitTest_use_components,sc_databaserangeobj,\ unoxml/source/service/unoxml \ )) -$(eval $(call gb_CppunitTest_set_args,sc_databaserangeobj,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool) xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/unittest/registry)" \ +$(eval $(call gb_CppunitTest_use_configuration,sc_databaserangeobj)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,sc_databaserangeobj)) + +$(eval $(call gb_CppunitTest_use_extra_configuration,sc_databaserangeobj,\ + $(OUTDIR)/unittest/registry \ )) - # .../spool is required for the (somewhat strange) filter configuration # we need to # a) explicitly depend on library msword because it is not implied by a link diff --git a/sc/CppunitTest_sc_datapilotfieldobj.mk b/sc/CppunitTest_sc_datapilotfieldobj.mk index 5eb0350b1e317..096b37f4bc02f 100644 --- a/sc/CppunitTest_sc_datapilotfieldobj.mk +++ b/sc/CppunitTest_sc_datapilotfieldobj.mk @@ -116,10 +116,13 @@ $(eval $(call gb_CppunitTest_use_components,sc_datapilotfieldobj,\ unoxml/source/service/unoxml \ )) -$(eval $(call gb_CppunitTest_set_args,sc_datapilotfieldobj,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool) xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/unittest/registry)" \ +$(eval $(call gb_CppunitTest_use_configuration,sc_datapilotfieldobj)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,sc_datapilotfieldobj)) + +$(eval $(call gb_CppunitTest_use_extra_configuration,sc_datapilotfieldobj,\ + $(OUTDIR)/unittest/registry \ )) - # .../spool is required for the (somewhat strange) filter configuration # we need to # a) explicitly depend on library msword because it is not implied by a link diff --git a/sc/CppunitTest_sc_datapilottableobj.mk b/sc/CppunitTest_sc_datapilottableobj.mk index 29ec3b930c0c2..921b576864ef1 100644 --- a/sc/CppunitTest_sc_datapilottableobj.mk +++ b/sc/CppunitTest_sc_datapilottableobj.mk @@ -116,10 +116,13 @@ $(eval $(call gb_CppunitTest_use_components,sc_datapilottableobj,\ unoxml/source/service/unoxml \ )) -$(eval $(call gb_CppunitTest_set_args,sc_datapilottableobj,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool) xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/unittest/registry)" \ +$(eval $(call gb_CppunitTest_use_configuration,sc_datapilottableobj)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,sc_datapilottableobj)) + +$(eval $(call gb_CppunitTest_use_extra_configuration,sc_datapilottableobj,\ + $(OUTDIR)/unittest/registry \ )) - # .../spool is required for the (somewhat strange) filter configuration # we need to # a) explicitly depend on library msword because it is not implied by a link diff --git a/sc/CppunitTest_sc_filters_test.mk b/sc/CppunitTest_sc_filters_test.mk index b1466477460a4..a200570abe5c7 100644 --- a/sc/CppunitTest_sc_filters_test.mk +++ b/sc/CppunitTest_sc_filters_test.mk @@ -116,10 +116,9 @@ $(eval $(call gb_CppunitTest_use_components,sc_filters_test,\ unoxml/source/service/unoxml \ )) -$(eval $(call gb_CppunitTest_set_args,sc_filters_test,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool)" \ -)) - # .../spool is required for the (somewhat strange) filter configuration +$(eval $(call gb_CppunitTest_use_configuration,sc_filters_test)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,sc_filters_test)) # we need to # a) explicitly depend on library msword because it is not implied by a link diff --git a/sc/CppunitTest_sc_macros_test.mk b/sc/CppunitTest_sc_macros_test.mk index 4a87930aa9136..bdfd820a350bb 100644 --- a/sc/CppunitTest_sc_macros_test.mk +++ b/sc/CppunitTest_sc_macros_test.mk @@ -113,10 +113,13 @@ $(eval $(call gb_CppunitTest_use_components,sc_macros_test,\ unoxml/source/service/unoxml \ )) -$(eval $(call gb_CppunitTest_set_args,sc_macros_test,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool) xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/unittest/registry)" \ +$(eval $(call gb_CppunitTest_use_configuration,sc_macros_test)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,sc_macros_test)) + +$(eval $(call gb_CppunitTest_use_extra_configuration,sc_macros_test,\ + $(OUTDIR)/unittest/registry \ )) - # .../spool is required for the (somewhat strange) filter configuration # we need to # a) explicitly depend on library msword because it is not implied by a link diff --git a/sc/CppunitTest_sc_namedrangeobj.mk b/sc/CppunitTest_sc_namedrangeobj.mk index 34689a54a07d9..33cd57d050fac 100644 --- a/sc/CppunitTest_sc_namedrangeobj.mk +++ b/sc/CppunitTest_sc_namedrangeobj.mk @@ -116,10 +116,13 @@ $(eval $(call gb_CppunitTest_use_components,sc_namedrangeobj,\ unoxml/source/service/unoxml \ )) -$(eval $(call gb_CppunitTest_set_args,sc_namedrangeobj,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool) xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/unittest/registry)" \ +$(eval $(call gb_CppunitTest_use_configuration,sc_namedrangeobj)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,sc_namedrangeobj)) + +$(eval $(call gb_CppunitTest_use_extra_configuration,sc_namedrangeobj,\ + $(OUTDIR)/unittest/registry \ )) - # .../spool is required for the (somewhat strange) filter configuration # we need to # a) explicitly depend on library msword because it is not implied by a link diff --git a/sc/CppunitTest_sc_namedrangesobj.mk b/sc/CppunitTest_sc_namedrangesobj.mk index 03addcfb74817..1e60240905219 100644 --- a/sc/CppunitTest_sc_namedrangesobj.mk +++ b/sc/CppunitTest_sc_namedrangesobj.mk @@ -116,10 +116,13 @@ $(eval $(call gb_CppunitTest_use_components,sc_namedrangesobj,\ unoxml/source/service/unoxml \ )) -$(eval $(call gb_CppunitTest_set_args,sc_namedrangesobj,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool) xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/unittest/registry)" \ +$(eval $(call gb_CppunitTest_use_configuration,sc_namedrangesobj)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,sc_namedrangesobj)) + +$(eval $(call gb_CppunitTest_use_extra_configuration,sc_namedrangesobj,\ + $(OUTDIR)/unittest/registry \ )) - # .../spool is required for the (somewhat strange) filter configuration # we need to # a) explicitly depend on library msword because it is not implied by a link diff --git a/sc/CppunitTest_sc_subsequent_filters_test.mk b/sc/CppunitTest_sc_subsequent_filters_test.mk index fb0436fe7b1aa..d814ddab6d7e1 100644 --- a/sc/CppunitTest_sc_subsequent_filters_test.mk +++ b/sc/CppunitTest_sc_subsequent_filters_test.mk @@ -129,10 +129,9 @@ $(eval $(call gb_CppunitTest_use_components,sc_subsequent_filters_test,\ endif endif -$(eval $(call gb_CppunitTest_set_args,sc_subsequent_filters_test,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool)" \ -)) - # .../spool is required for the (somewhat strange) filter configuration +$(eval $(call gb_CppunitTest_use_configuration,sc_subsequent_filters_test)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,sc_subsequent_filters_test)) # we need to # a) explicitly depend on library msword because it is not implied by a link diff --git a/sc/CppunitTest_sc_tableautoformatfield.mk b/sc/CppunitTest_sc_tableautoformatfield.mk index daadfb1b172ea..2e5a2c706b192 100644 --- a/sc/CppunitTest_sc_tableautoformatfield.mk +++ b/sc/CppunitTest_sc_tableautoformatfield.mk @@ -116,10 +116,13 @@ $(eval $(call gb_CppunitTest_use_components,sc_tableautoformatfield,\ unoxml/source/service/unoxml \ )) -$(eval $(call gb_CppunitTest_set_args,sc_tableautoformatfield,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool) xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/unittest/registry)" \ +$(eval $(call gb_CppunitTest_use_configuration,sc_tableautoformatfield)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,sc_tableautoformatfield)) + +$(eval $(call gb_CppunitTest_use_extra_configuration,sc_tableautoformatfield,\ + $(OUTDIR)/unittest/registry \ )) - # .../spool is required for the (somewhat strange) filter configuration # we need to # a) explicitly depend on library msword because it is not implied by a link diff --git a/sc/CppunitTest_sc_tablesheetobj.mk b/sc/CppunitTest_sc_tablesheetobj.mk index f2f72e1849c0f..b35754869e982 100644 --- a/sc/CppunitTest_sc_tablesheetobj.mk +++ b/sc/CppunitTest_sc_tablesheetobj.mk @@ -118,10 +118,13 @@ $(eval $(call gb_CppunitTest_use_components,sc_spreadsheetobj,\ unoxml/source/service/unoxml \ )) -$(eval $(call gb_CppunitTest_set_args,sc_spreadsheetobj,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool) xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/unittest/registry)" \ +$(eval $(call gb_CppunitTest_use_configuration,sc_spreadsheetobj)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,sc_spreadsheetobj)) + +$(eval $(call gb_CppunitTest_use_extra_configuration,sc_spreadsheetobj,\ + $(OUTDIR)/unittest/registry \ )) - # .../spool is required for the (somewhat strange) filter configuration # we need to # a) explicitly depend on library msword because it is not implied by a link diff --git a/sc/CppunitTest_sc_tablesheetsobj.mk b/sc/CppunitTest_sc_tablesheetsobj.mk index a58afd30a81f0..57947934bc1df 100644 --- a/sc/CppunitTest_sc_tablesheetsobj.mk +++ b/sc/CppunitTest_sc_tablesheetsobj.mk @@ -116,10 +116,13 @@ $(eval $(call gb_CppunitTest_use_components,sc_spreadsheetsobj,\ unoxml/source/service/unoxml \ )) -$(eval $(call gb_CppunitTest_set_args,sc_spreadsheetsobj,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool) xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/unittest/registry)" \ +$(eval $(call gb_CppunitTest_use_configuration,sc_spreadsheetsobj)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,sc_spreadsheetsobj)) + +$(eval $(call gb_CppunitTest_use_extra_configuration,sc_spreadsheetsobj,\ + $(OUTDIR)/unittest/registry \ )) - # .../spool is required for the (somewhat strange) filter configuration # we need to # a) explicitly depend on library msword because it is not implied by a link diff --git a/sc/CppunitTest_sc_ucalc.mk b/sc/CppunitTest_sc_ucalc.mk index b0d2e6ad87e7d..2185f8232bf80 100644 --- a/sc/CppunitTest_sc_ucalc.mk +++ b/sc/CppunitTest_sc_ucalc.mk @@ -97,8 +97,6 @@ $(eval $(call gb_CppunitTest_use_components,sc_ucalc,\ unoxml/source/service/unoxml \ )) -$(eval $(call gb_CppunitTest_set_args,sc_ucalc,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry)" \ -)) +$(eval $(call gb_CppunitTest_use_configuration,sc_ucalc)) # vim: set noet sw=4 ts=4: diff --git a/sd/CppunitTest_sd_filters_test.mk b/sd/CppunitTest_sd_filters_test.mk index 46ad622a74648..9af86e0a10796 100644 --- a/sd/CppunitTest_sd_filters_test.mk +++ b/sd/CppunitTest_sd_filters_test.mk @@ -106,10 +106,9 @@ $(eval $(call gb_CppunitTest_use_components,sd_filters_test,\ unoxml/source/service/unoxml \ )) -$(eval $(call gb_CppunitTest_set_args,sd_filters_test,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool)" \ -)) - # .../spool is required for the (somewhat strange) filter configuration +$(eval $(call gb_CppunitTest_use_configuration,sd_filters_test)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,sd_filters_test)) # we need to explicitly depend on library sdfilt because it is not implied # by a link relation diff --git a/sd/CppunitTest_sd_regression_test.mk b/sd/CppunitTest_sd_regression_test.mk index 2716c50e9f7a6..4b24b2550c80b 100644 --- a/sd/CppunitTest_sd_regression_test.mk +++ b/sd/CppunitTest_sd_regression_test.mk @@ -116,11 +116,17 @@ $(eval $(call gb_CppunitTest_use_components,sd_regression_test,\ xmlsecurity/util/xmlsecurity \ )) +$(eval $(call gb_CppunitTest_use_configuration,sd_regression_test)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,sd_regression_test)) + +$(eval $(call gb_CppunitTest_use_extra_configuration,sd_regression_test,\ + $(OUTDIR)/unittest/registry \ +)) + $(eval $(call gb_CppunitTest_set_args,sd_regression_test,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool) xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/unittest/registry)" \ "-env:SVG_DISABLE_FONT_EMBEDDING=YEAH" \ )) - # .../spool is required for the (somewhat strange) filter configuration # we need to explicitly depend on library sdfilt because it is not implied # by a link relation diff --git a/sd/CppunitTest_sd_uimpress.mk b/sd/CppunitTest_sd_uimpress.mk index 658a240292aa1..86ba05e6f90c2 100644 --- a/sd/CppunitTest_sd_uimpress.mk +++ b/sd/CppunitTest_sd_uimpress.mk @@ -82,8 +82,6 @@ $(eval $(call gb_CppunitTest_use_components,sd_uimpress,\ i18npool/util/i18npool \ )) -$(eval $(call gb_CppunitTest_set_args,sd_uimpress,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry)" \ -)) +$(eval $(call gb_CppunitTest_use_configuration,sd_uimpress)) # vim: set noet sw=4 ts=4: diff --git a/sdext/CppunitTest_pdfimport.mk b/sdext/CppunitTest_pdfimport.mk index 872c56ea89b4b..e503ad707878f 100644 --- a/sdext/CppunitTest_pdfimport.mk +++ b/sdext/CppunitTest_pdfimport.mk @@ -73,8 +73,6 @@ $(eval $(call gb_CppunitTest_use_components,sdext_pdfimport,\ ucb/source/ucp/file/ucpfile1 \ )) -$(eval $(call gb_CppunitTest_set_args,sdext_pdfimport,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry)" \ -)) +$(eval $(call gb_CppunitTest_use_configuration,sdext_pdfimport)) # vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk index 51cde99e218b2..a6672536c5d2f 100644 --- a/solenv/gbuild/CppunitTest.mk +++ b/solenv/gbuild/CppunitTest.mk @@ -63,6 +63,8 @@ gb_CppunitTarget__make_url = file://$(if $(filter WNT,$(OS_FOR_BUILD)),/)$(strip define gb_CppunitTest__make_args $(ARGS) \ --headless \ +$(if $(strip $(CONFIGURATION_LAYERS)),\ + "-env:CONFIGURATION_LAYERS=$(strip $(CONFIGURATION_LAYERS))") \ $(if $(strip $(UNO_TYPES)),\ "-env:UNO_TYPES=$(foreach item,$(UNO_TYPES),$(call gb_CppunitTarget__make_url,$(item)))") \ $(if $(strip $(UNO_SERVICES)),\ @@ -117,6 +119,7 @@ $(call gb_CppunitTest_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2)) $(call gb_CppunitTest_get_clean_target,$(1)) : $(call gb_LinkTarget_get_clean_target,$(2)) $(call gb_CppunitTest_CppunitTest_platform,$(1),$(2),$(gb_CppunitTest_DLLDIR)/$(call gb_CppunitTest_get_libfilename,$(1))) $(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)) : UNO_SERVICES := $(call gb_CppunitTest_get_target,$(1)) : UNO_TYPES := @@ -266,6 +269,34 @@ endef gb_ComponentTarget__get_old_component_target = $(OUTDIR)/xml/$(1).component +define gb_CppunitTest__use_configuration +$(call gb_CppunitTest_get_target,$(1)) : CONFIGURATION_LAYERS += $(2):$(call gb_CppunitTarget__make_url,$(3)) + +endef + +# Use standard configuration. +define gb_CppunitTest_use_configuration +$(call gb_CppunitTest_get_target,$(1)) : $(call gb_Configuration_get_target,officecfg) +$(call gb_CppunitTest__use_configuration,$(1),xcsxcu,$(gb_Configuration_registry)) + +endef + +# Use configuration for filters. +# +# Okay, this is not exactly true, because there may be configuration +# for more things than just filters in spool, but it is good enough. +define gb_CppunitTest_use_filter_configuration +$(call gb_CppunitTest_get_target,$(1)) : $(call gb_Configuration_get_target,fcfg_langpack) +$(call gb_CppunitTest__use_configuration,$(1),module,$(gb_Configuration_registry)/spool) + +endef + +# Use extra configuration dir(s). +define gb_CppunitTest_use_extra_configuration +$(foreach extra,$(2),$(call gb_CppunitTest__use_configuration,$(1),xcsxcu,$(extra))) + +endef + define gb_CppunitTest__forward_to_Linktarget gb_CppunitTest_$(1) = $$(call gb_LinkTarget_$(1),$$(call gb_CppunitTest__get_linktargetname,$$(1)),$$(2),$$(3)) diff --git a/svtools/CppunitTest_svtools_filters_test.mk b/svtools/CppunitTest_svtools_filters_test.mk index ff764a13996a6..7d4353fbde137 100644 --- a/svtools/CppunitTest_svtools_filters_test.mk +++ b/svtools/CppunitTest_svtools_filters_test.mk @@ -57,8 +57,6 @@ $(eval $(call gb_CppunitTest_use_components,svtools_filters_test,\ configmgr/source/configmgr \ )) -$(eval $(call gb_CppunitTest_set_args,svtools_filters_test,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry)" \ -)) +$(eval $(call gb_CppunitTest_use_configuration,svtools_filters_test)) # vim: set noet sw=4 ts=4: diff --git a/sw/CppunitTest_sw_filters_test.mk b/sw/CppunitTest_sw_filters_test.mk index 5400cdefda03c..bf616828e4586 100644 --- a/sw/CppunitTest_sw_filters_test.mk +++ b/sw/CppunitTest_sw_filters_test.mk @@ -90,9 +90,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_filters_test,\ xmlhelp/util/ucpchelp1 \ )) -$(eval $(call gb_CppunitTest_set_args,sw_filters_test,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry)" \ -)) +$(eval $(call gb_CppunitTest_use_configuration,sw_filters_test)) # we need to explicitly depend on library msword because it is not implied # by a link relation diff --git a/sw/CppunitTest_sw_layout_test.mk b/sw/CppunitTest_sw_layout_test.mk index 44728dfb01450..c3540adf9ca9e 100644 --- a/sw/CppunitTest_sw_layout_test.mk +++ b/sw/CppunitTest_sw_layout_test.mk @@ -113,10 +113,13 @@ $(eval $(call gb_CppunitTest_use_components,sw_layout_test,\ unoxml/source/service/unoxml \ )) -$(eval $(call gb_CppunitTest_set_args,sw_layout_test,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool) xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/unittest/registry)" \ +$(eval $(call gb_CppunitTest_use_configuration,sw_layout_test)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,sw_layout_test)) + +$(eval $(call gb_CppunitTest_use_extra_configuration,sw_layout_test,\ + $(OUTDIR)/unittest/registry \ )) - # .../spool is required for the (somewhat strange) filter configuration # we need to # a) explicitly depend on library msword because it is not implied by a link diff --git a/sw/CppunitTest_sw_macros_test.mk b/sw/CppunitTest_sw_macros_test.mk index 9be7339802a2b..f7a053b8e9e19 100644 --- a/sw/CppunitTest_sw_macros_test.mk +++ b/sw/CppunitTest_sw_macros_test.mk @@ -115,10 +115,13 @@ $(eval $(call gb_CppunitTest_use_components,sw_macros_test,\ unoxml/source/service/unoxml \ )) -$(eval $(call gb_CppunitTest_set_args,sw_macros_test,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool) xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/unittest/registry)" \ +$(eval $(call gb_CppunitTest_use_configuration,sw_macros_test)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,sw_macros_test)) + +$(eval $(call gb_CppunitTest_use_extra_configuration,sw_macros_test,\ + $(OUTDIR)/unittest/registry \ )) - # .../spool is required for the (somewhat strange) filter configuration # we need to # a) explicitly depend on library msword because it is not implied by a link diff --git a/sw/CppunitTest_sw_regression_test.mk b/sw/CppunitTest_sw_regression_test.mk index 9d37f66b83464..e1d35d8999a13 100644 --- a/sw/CppunitTest_sw_regression_test.mk +++ b/sw/CppunitTest_sw_regression_test.mk @@ -115,10 +115,13 @@ $(eval $(call gb_CppunitTest_use_components,sw_regression_test,\ unoxml/source/service/unoxml \ )) -$(eval $(call gb_CppunitTest_set_args,sw_regression_test,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool) xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/unittest/registry)" \ +$(eval $(call gb_CppunitTest_use_configuration,sw_regression_test)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,sw_regression_test)) + +$(eval $(call gb_CppunitTest_use_extra_configuration,sw_regression_test,\ + $(OUTDIR)/unittest/registry \ )) - # .../spool is required for the (somewhat strange) filter configuration # we need to # a) explicitly depend on library msword because it is not implied by a link diff --git a/sw/CppunitTest_sw_subsequent_ooxmltok.mk b/sw/CppunitTest_sw_subsequent_ooxmltok.mk index 21cfbff4bac63..db72f14b79189 100644 --- a/sw/CppunitTest_sw_subsequent_ooxmltok.mk +++ b/sw/CppunitTest_sw_subsequent_ooxmltok.mk @@ -74,8 +74,12 @@ $(eval $(call gb_CppunitTest_use_components,sw_subsequent_ooxmltok,\ writerfilter/util/writerfilter \ )) -$(eval $(call gb_CppunitTest_set_args,sw_subsequent_ooxmltok,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool) xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/unittest/registry)" \ +$(eval $(call gb_CppunitTest_use_configuration,sw_subsequent_ooxmltok)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,sw_subsequent_ooxmltok)) + +$(eval $(call gb_CppunitTest_use_extra_configuration,sw_subsequent_ooxmltok,\ + $(OUTDIR)/unittest/registry \ )) # vim: set noet sw=4 ts=4: diff --git a/sw/CppunitTest_sw_subsequent_rtftok.mk b/sw/CppunitTest_sw_subsequent_rtftok.mk index 9689d049cc5ed..a3e0f86f7a87c 100644 --- a/sw/CppunitTest_sw_subsequent_rtftok.mk +++ b/sw/CppunitTest_sw_subsequent_rtftok.mk @@ -68,8 +68,12 @@ $(eval $(call gb_CppunitTest_use_components,sw_subsequent_rtftok,\ writerfilter/util/writerfilter \ )) -$(eval $(call gb_CppunitTest_set_args,sw_subsequent_rtftok,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool) xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/unittest/registry)" \ +$(eval $(call gb_CppunitTest_use_configuration,sw_subsequent_rtftok)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,sw_subsequent_rtftok)) + +$(eval $(call gb_CppunitTest_use_extra_configuration,sw_subsequent_rtftok,\ + $(OUTDIR)/unittest/registry \ )) # vim: set noet sw=4 ts=4: diff --git a/sw/CppunitTest_sw_swdoc_test.mk b/sw/CppunitTest_sw_swdoc_test.mk index cb22c627a08b8..7629d1afd66e6 100644 --- a/sw/CppunitTest_sw_swdoc_test.mk +++ b/sw/CppunitTest_sw_swdoc_test.mk @@ -97,9 +97,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_swdoc_test,\ unoxml/source/service/unoxml \ )) -$(eval $(call gb_CppunitTest_set_args,sw_swdoc_test,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry)" \ -)) +$(eval $(call gb_CppunitTest_use_configuration,sw_swdoc_test)) # we need to explicitly depend on the sw resource files needed at unit-test # runtime diff --git a/writerfilter/CppunitTest_writerfilter_rtftok.mk b/writerfilter/CppunitTest_writerfilter_rtftok.mk index a1d4de4cdb70e..ecc5d6693da1f 100644 --- a/writerfilter/CppunitTest_writerfilter_rtftok.mk +++ b/writerfilter/CppunitTest_writerfilter_rtftok.mk @@ -59,9 +59,7 @@ $(eval $(call gb_CppunitTest_use_components,writerfilter_rtftok,\ writerfilter/util/writerfilter \ )) -$(eval $(call gb_CppunitTest_set_args,writerfilter_rtftok,\ - "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry)" \ -)) +$(eval $(call gb_CppunitTest_use_configuration,writerfilter_rtftok)) # we need to explicitly depend on library rtftok and writerfilter because it is not implied # by a link relation