diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-11-08 00:48:14 +0100 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-11-09 07:37:00 +0100 |
commit | 84286ac443ea8978743d281efeaa7ddb46199558 (patch) | |
tree | 916a3175c92da40e4ac521586f74b01dcb71e07f | |
parent | 5063e7fc09b38b77a3ff4c200b68cf2c8947462d (diff) |
Simplify and fix Java UNO API test makefiles
Originally I just wanted to add the juh.jar to the list of jars
of the UNO API tests, but this became tedious work, so after the
first few files I decided to replace the similiar makefiles with
a common define for the *_unoapi* tests.
This patch adds two new make defines to be used used by Java UNO
and UNO API tests:
- gb_JunitTest_set_unoapi_test_defaults
- gb_JunitTest_set_unoapi_test_class_and_jars
The first one will deduce most defaults from the test name, but
still allows to optionally override most settings.
If a test doesn't match the default at all, the 2nd define still
shares the common jar files and the main Java UNO class, so the
second define adds these to your makefile.
The real fix is to add juh.jar to gb_JunitTest_use_jars.
Change-Id: I4342fdac5e31f85ea18fb4268e13c287a7adc2b7
Reviewed-on: https://gerrit.libreoffice.org/63118
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
34 files changed, 73 insertions, 588 deletions
diff --git a/chart2/JunitTest_chart2_unoapi.mk b/chart2/JunitTest_chart2_unoapi.mk index d91c6fae3bba..7607c4648200 100644 --- a/chart2/JunitTest_chart2_unoapi.mk +++ b/chart2/JunitTest_chart2_unoapi.mk @@ -9,23 +9,6 @@ $(eval $(call gb_JunitTest_JunitTest,chart2_unoapi)) -$(eval $(call gb_JunitTest_set_defs,chart2_unoapi,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/chart2/qa/unoapi/sch.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/chart2/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/chart2/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,chart2_unoapi,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,chart2_unoapi,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,chart2_unoapi,,sch.sce)) # vim: set noet sw=4 ts=4: diff --git a/configmgr/JunitTest_configmgr_unoapi.mk b/configmgr/JunitTest_configmgr_unoapi.mk index b3b6e49e90ae..51dcc8a07eb5 100644 --- a/configmgr/JunitTest_configmgr_unoapi.mk +++ b/configmgr/JunitTest_configmgr_unoapi.mk @@ -9,23 +9,6 @@ $(eval $(call gb_JunitTest_JunitTest,configmgr_unoapi)) -$(eval $(call gb_JunitTest_set_defs,configmgr_unoapi,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/configmgr/qa/unoapi/module.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/configmgr/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/configmgr/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,configmgr_unoapi,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,configmgr_unoapi,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,configmgr_unoapi,,module.sce)) # vim: set noet sw=4 ts=4: diff --git a/connectivity/JunitTest_complex.mk b/connectivity/JunitTest_complex.mk index 78947bfc2076..40c2882f3c54 100644 --- a/connectivity/JunitTest_complex.mk +++ b/connectivity/JunitTest_complex.mk @@ -9,27 +9,17 @@ $(eval $(call gb_JunitTest_JunitTest,connectivity_complex)) +$(eval $(call gb_JunitTest_set_unoapi_test_class_and_jars,connectivity_complex)) + $(eval $(call gb_JunitTest_set_defs,connectivity_complex,\ $$(DEFS) \ -Dorg.openoffice.test.arg.sce=$(SRCDIR)/connectivity/qa/scenarios.sce \ )) -$(eval $(call gb_JunitTest_use_jars,connectivity_complex,\ - jurt \ - OOoRunner \ - ridl \ - test \ - unoil \ -)) - $(eval $(call gb_JunitTest_use_externals,connectivity_complex,\ hsqldb \ )) -$(eval $(call gb_JunitTest_add_classes,connectivity_complex,\ - org.openoffice.test.UnoApiTest \ -)) - $(eval $(call gb_JunitTest_add_sourcefiles,connectivity_complex,\ connectivity/qa/complex/connectivity/DBaseDriverTest \ connectivity/qa/complex/connectivity/FlatFileAccess \ diff --git a/dbaccess/JunitTest_dbaccess_unoapi.mk b/dbaccess/JunitTest_dbaccess_unoapi.mk index 64af95693bb7..814cbbcdcb37 100644 --- a/dbaccess/JunitTest_dbaccess_unoapi.mk +++ b/dbaccess/JunitTest_dbaccess_unoapi.mk @@ -9,23 +9,6 @@ $(eval $(call gb_JunitTest_JunitTest,dbaccess_unoapi)) -$(eval $(call gb_JunitTest_set_defs,dbaccess_unoapi,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/dbaccess/qa/unoapi/dbaccess.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/dbaccess/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/dbaccess/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,dbaccess_unoapi,\ - OOoRunner \ - jurt \ - ridl \ - test \ - unoil \ -)) - -$(eval $(call gb_JunitTest_add_classes,dbaccess_unoapi,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,dbaccess_unoapi)) # vim: set noet sw=4 ts=4: diff --git a/extensions/JunitTest_extensions_unoapi.mk b/extensions/JunitTest_extensions_unoapi.mk index 0d98b1eab0b7..1320bf56d992 100644 --- a/extensions/JunitTest_extensions_unoapi.mk +++ b/extensions/JunitTest_extensions_unoapi.mk @@ -9,23 +9,6 @@ $(eval $(call gb_JunitTest_JunitTest,extensions_unoapi)) -$(eval $(call gb_JunitTest_set_defs,extensions_unoapi,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/extensions/qa/unoapi/extensions.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/extensions/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/extensions/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,extensions_unoapi,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,extensions_unoapi,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,extensions_unoapi)) # vim: set noet sw=4 ts=4: diff --git a/forms/JunitTest_forms_unoapi_1.mk b/forms/JunitTest_forms_unoapi_1.mk index 766496355b63..bf900dc78fcb 100644 --- a/forms/JunitTest_forms_unoapi_1.mk +++ b/forms/JunitTest_forms_unoapi_1.mk @@ -9,23 +9,6 @@ $(eval $(call gb_JunitTest_JunitTest,forms_unoapi_1)) -$(eval $(call gb_JunitTest_set_defs,forms_unoapi_1,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/forms/qa/unoapi/forms_1.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/forms/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/forms/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,forms_unoapi_1,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,forms_unoapi_1,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,forms_unoapi_1)) # vim: set noet sw=4 ts=4: diff --git a/forms/JunitTest_forms_unoapi_2.mk b/forms/JunitTest_forms_unoapi_2.mk index c309cc75ebce..21121bb542b5 100644 --- a/forms/JunitTest_forms_unoapi_2.mk +++ b/forms/JunitTest_forms_unoapi_2.mk @@ -9,23 +9,6 @@ $(eval $(call gb_JunitTest_JunitTest,forms_unoapi_2)) -$(eval $(call gb_JunitTest_set_defs,forms_unoapi_2,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/forms/qa/unoapi/forms_2.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/forms/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/forms/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,forms_unoapi_2,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,forms_unoapi_2,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,forms_unoapi_2)) # vim: set noet sw=4 ts=4: diff --git a/forms/JunitTest_forms_unoapi_3.mk b/forms/JunitTest_forms_unoapi_3.mk index 4ba8829fddfa..7ed5010ce48f 100644 --- a/forms/JunitTest_forms_unoapi_3.mk +++ b/forms/JunitTest_forms_unoapi_3.mk @@ -9,23 +9,6 @@ $(eval $(call gb_JunitTest_JunitTest,forms_unoapi_3)) -$(eval $(call gb_JunitTest_set_defs,forms_unoapi_3,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/forms/qa/unoapi/forms_3.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/forms/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/forms/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,forms_unoapi_3,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,forms_unoapi_3,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,forms_unoapi_3)) # vim: set noet sw=4 ts=4: diff --git a/forms/JunitTest_forms_unoapi_4.mk b/forms/JunitTest_forms_unoapi_4.mk index e63cc3ff069c..a07ca857f6ec 100644 --- a/forms/JunitTest_forms_unoapi_4.mk +++ b/forms/JunitTest_forms_unoapi_4.mk @@ -9,23 +9,6 @@ $(eval $(call gb_JunitTest_JunitTest,forms_unoapi_4)) -$(eval $(call gb_JunitTest_set_defs,forms_unoapi_4,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/forms/qa/unoapi/forms_4.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/forms/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/forms/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,forms_unoapi_4,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,forms_unoapi_4,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,forms_unoapi_4)) # vim: set noet sw=4 ts=4: diff --git a/framework/JunitTest_framework_unoapi.mk b/framework/JunitTest_framework_unoapi.mk index 35e919235241..025051899f30 100644 --- a/framework/JunitTest_framework_unoapi.mk +++ b/framework/JunitTest_framework_unoapi.mk @@ -19,23 +19,6 @@ $(eval $(call gb_JunitTest_JunitTest,framework_unoapi)) -$(eval $(call gb_JunitTest_set_defs,framework_unoapi,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/framework/qa/unoapi/framework.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/framework/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/framework/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,framework_unoapi,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,framework_unoapi,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,framework_unoapi)) # vim: set noet sw=4 ts=4: diff --git a/linguistic/JunitTest_linguistic_unoapi.mk b/linguistic/JunitTest_linguistic_unoapi.mk index 6047d75cb607..e67521535d73 100644 --- a/linguistic/JunitTest_linguistic_unoapi.mk +++ b/linguistic/JunitTest_linguistic_unoapi.mk @@ -19,23 +19,6 @@ $(eval $(call gb_JunitTest_JunitTest,linguistic_unoapi)) -$(eval $(call gb_JunitTest_set_defs,linguistic_unoapi,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/linguistic/qa/unoapi/lng.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/linguistic/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/linguistic/qa/unoapi \ -)) - -$(eval $(call gb_JunitTest_use_jars,linguistic_unoapi,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,linguistic_unoapi,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,linguistic_unoapi,,lng.sce,,.)) # vim: set noet sw=4 ts=4: diff --git a/sc/JunitTest_sc_unoapi_1.mk b/sc/JunitTest_sc_unoapi_1.mk index 0fa058385b9a..4e59c2939354 100644 --- a/sc/JunitTest_sc_unoapi_1.mk +++ b/sc/JunitTest_sc_unoapi_1.mk @@ -9,23 +9,6 @@ $(eval $(call gb_JunitTest_JunitTest,sc_unoapi_1)) -$(eval $(call gb_JunitTest_add_classes,sc_unoapi_1, \ - org.openoffice.test.UnoApiTest \ -)) - -$(eval $(call gb_JunitTest_use_jars,sc_unoapi_1, \ - OOoRunner \ - jurt \ - ridl \ - test \ - unoil \ -)) - -$(eval $(call gb_JunitTest_set_defs,sc_unoapi_1,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/sc/qa/unoapi/sc_1.sce \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/sc/qa/unoapi/testdocuments \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/sc/qa/unoapi/knownissues.xcl \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,sc_unoapi_1)) # vim: set noet sw=4 ts=4: diff --git a/sc/JunitTest_sc_unoapi_2.mk b/sc/JunitTest_sc_unoapi_2.mk index aeee2b3663d2..47c7eb587115 100644 --- a/sc/JunitTest_sc_unoapi_2.mk +++ b/sc/JunitTest_sc_unoapi_2.mk @@ -9,23 +9,6 @@ $(eval $(call gb_JunitTest_JunitTest,sc_unoapi_2)) -$(eval $(call gb_JunitTest_add_classes,sc_unoapi_2, \ - org.openoffice.test.UnoApiTest \ -)) - -$(eval $(call gb_JunitTest_use_jars,sc_unoapi_2, \ - OOoRunner \ - jurt \ - ridl \ - test \ - unoil \ -)) - -$(eval $(call gb_JunitTest_set_defs,sc_unoapi_2,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/sc/qa/unoapi/sc_2.sce \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/sc/qa/unoapi/testdocuments \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/sc/qa/unoapi/knownissues.xcl \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,sc_unoapi_2)) # vim: set noet sw=4 ts=4: diff --git a/sc/JunitTest_sc_unoapi_3.mk b/sc/JunitTest_sc_unoapi_3.mk index 18112778fd40..870f2a592e22 100644 --- a/sc/JunitTest_sc_unoapi_3.mk +++ b/sc/JunitTest_sc_unoapi_3.mk @@ -9,23 +9,6 @@ $(eval $(call gb_JunitTest_JunitTest,sc_unoapi_3)) -$(eval $(call gb_JunitTest_add_classes,sc_unoapi_3, \ - org.openoffice.test.UnoApiTest \ -)) - -$(eval $(call gb_JunitTest_use_jars,sc_unoapi_3, \ - OOoRunner \ - jurt \ - ridl \ - test \ - unoil \ -)) - -$(eval $(call gb_JunitTest_set_defs,sc_unoapi_3,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/sc/qa/unoapi/sc_3.sce \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/sc/qa/unoapi/testdocuments \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/sc/qa/unoapi/knownissues.xcl \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,sc_unoapi_3)) # vim: set noet sw=4 ts=4: diff --git a/sc/JunitTest_sc_unoapi_4.mk b/sc/JunitTest_sc_unoapi_4.mk index 7cc0629df35b..4586208ebe90 100644 --- a/sc/JunitTest_sc_unoapi_4.mk +++ b/sc/JunitTest_sc_unoapi_4.mk @@ -9,23 +9,6 @@ $(eval $(call gb_JunitTest_JunitTest,sc_unoapi_4)) -$(eval $(call gb_JunitTest_add_classes,sc_unoapi_4, \ - org.openoffice.test.UnoApiTest \ -)) - -$(eval $(call gb_JunitTest_use_jars,sc_unoapi_4, \ - OOoRunner \ - jurt \ - ridl \ - test \ - unoil \ -)) - -$(eval $(call gb_JunitTest_set_defs,sc_unoapi_4,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/sc/qa/unoapi/sc_4.sce \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/sc/qa/unoapi/testdocuments \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/sc/qa/unoapi/knownissues.xcl \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,sc_unoapi_4)) # vim: set noet sw=4 ts=4: diff --git a/sc/JunitTest_sc_unoapi_5.mk b/sc/JunitTest_sc_unoapi_5.mk index b9811e5cd6f3..be22bd887f7d 100644 --- a/sc/JunitTest_sc_unoapi_5.mk +++ b/sc/JunitTest_sc_unoapi_5.mk @@ -9,23 +9,6 @@ $(eval $(call gb_JunitTest_JunitTest,sc_unoapi_5)) -$(eval $(call gb_JunitTest_add_classes,sc_unoapi_5, \ - org.openoffice.test.UnoApiTest \ -)) - -$(eval $(call gb_JunitTest_use_jars,sc_unoapi_5, \ - OOoRunner \ - jurt \ - ridl \ - test \ - unoil \ -)) - -$(eval $(call gb_JunitTest_set_defs,sc_unoapi_5,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/sc/qa/unoapi/sc_5.sce \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/sc/qa/unoapi/testdocuments \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/sc/qa/unoapi/knownissues.xcl \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,sc_unoapi_5)) # vim: set noet sw=4 ts=4: diff --git a/sc/JunitTest_sc_unoapi_6.mk b/sc/JunitTest_sc_unoapi_6.mk index 7e877560cb65..3285b7a41da9 100644 --- a/sc/JunitTest_sc_unoapi_6.mk +++ b/sc/JunitTest_sc_unoapi_6.mk @@ -9,23 +9,6 @@ $(eval $(call gb_JunitTest_JunitTest,sc_unoapi_6)) -$(eval $(call gb_JunitTest_add_classes,sc_unoapi_6, \ - org.openoffice.test.UnoApiTest \ -)) - -$(eval $(call gb_JunitTest_use_jars,sc_unoapi_6, \ - OOoRunner \ - jurt \ - ridl \ - test \ - unoil \ -)) - -$(eval $(call gb_JunitTest_set_defs,sc_unoapi_6,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/sc/qa/unoapi/sc_6.sce \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/sc/qa/unoapi/testdocuments \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/sc/qa/unoapi/knownissues.xcl \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,sc_unoapi_6)) # vim: set noet sw=4 ts=4: diff --git a/sc/JunitTest_sc_unoapi_7.mk b/sc/JunitTest_sc_unoapi_7.mk index 58c2ced0f4b7..a8371988b23d 100644 --- a/sc/JunitTest_sc_unoapi_7.mk +++ b/sc/JunitTest_sc_unoapi_7.mk @@ -9,23 +9,6 @@ $(eval $(call gb_JunitTest_JunitTest,sc_unoapi_7)) -$(eval $(call gb_JunitTest_add_classes,sc_unoapi_7, \ - org.openoffice.test.UnoApiTest \ -)) - -$(eval $(call gb_JunitTest_use_jars,sc_unoapi_7, \ - OOoRunner \ - jurt \ - ridl \ - test \ - unoil \ -)) - -$(eval $(call gb_JunitTest_set_defs,sc_unoapi_7,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/sc/qa/unoapi/sc_7.sce \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/sc/qa/unoapi/testdocuments \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/sc/qa/unoapi/knownissues.xcl \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,sc_unoapi_7)) # vim: set noet sw=4 ts=4: diff --git a/sd/JunitTest_sd_unoapi.mk b/sd/JunitTest_sd_unoapi.mk index 62e0906f8df2..85f5f3d49c51 100644 --- a/sd/JunitTest_sd_unoapi.mk +++ b/sd/JunitTest_sd_unoapi.mk @@ -9,23 +9,6 @@ $(eval $(call gb_JunitTest_JunitTest,sd_unoapi)) -$(eval $(call gb_JunitTest_set_defs,sd_unoapi,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/sd/qa/unoapi/sd.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/sd/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/sd/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,sd_unoapi,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,sd_unoapi,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,sd_unoapi)) # vim: set noet sw=4 ts=4: diff --git a/sfx2/JunitTest_sfx2_unoapi.mk b/sfx2/JunitTest_sfx2_unoapi.mk index 14da689380e0..d812f5e0baa7 100644 --- a/sfx2/JunitTest_sfx2_unoapi.mk +++ b/sfx2/JunitTest_sfx2_unoapi.mk @@ -19,23 +19,6 @@ $(eval $(call gb_JunitTest_JunitTest,sfx2_unoapi)) -$(eval $(call gb_JunitTest_set_defs,sfx2_unoapi,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/sfx2/qa/unoapi/sfx.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/sfx2/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/sfx2/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,sfx2_unoapi,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,sfx2_unoapi,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,sfx2_unoapi,,sfx.sce)) # vim: set noet sw=4 ts=4: diff --git a/solenv/gbuild/JunitTest.mk b/solenv/gbuild/JunitTest.mk index 36f29b50ef28..1b06a1c5f78d 100644 --- a/solenv/gbuild/JunitTest.mk +++ b/solenv/gbuild/JunitTest.mk @@ -152,6 +152,45 @@ $(foreach dependency,$(2),$(call gb_JunitTest_use_customtarget,$(1),$(dependency endef +define gb_JunitTest_set_unoapi_test_class_and_jars +$(eval $(call gb_JunitTest_use_jars,$(1),\ + OOoRunner \ + juh \ + jurt \ + ridl \ + test \ + unoil \ +)) + +$(eval $(call gb_JunitTest_add_classes,$(1),\ + org.openoffice.test.UnoApiTest \ +)) + +endef + +# To be used by gb_JunitTest_set_unoapi_test_defaults +# <module>_unoapi_1 => <module>_1 => <module> => <module>/qa/unoapi +gb_JunitTest__unoapi_iter = $(subst _unoapi,,$(1)) +gb_JunitTest__unoapi_module = $(firstword $(subst _, ,$(gb_JunitTest__unoapi_iter))) +gb_JunitTest__unoapi_dir = $(if $(2),$(2),$(gb_JunitTest__unoapi_module)/qa/unoapi) + +# $(1) = test name (prefer <module>_unoapi for defaults, example <module>_unoapi_1) +# $(2) = test directory base (def: <module>_unoapi_1 => <module>_1/qa/unoapi) +# $(3) = SCE file (def: <module>_1.sce) +# $(4) = XCL file (def: knownissues.xcl) +# $(5) = test document directory (def: testdocuments; use . for base) +define gb_JunitTest_set_unoapi_test_defaults +$(eval $(call gb_JunitTest_set_defs,$(1),\ + $$(DEFS) \ + -Dorg.openoffice.test.arg.sce=$(SRCDIR)/$(gb_JunitTest__unoapi_dir)/$(if $(3),$(3),$(gb_JunitTest__unoapi_iter).sce) \ + -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/$(gb_JunitTest__unoapi_dir)/$(if $(4),$(4),knownissues.xcl) \ + -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/$(gb_JunitTest__unoapi_dir)/$(if $(5),$(5),testdocuments) \ +)) + +$(eval $(call gb_JunitTest_set_unoapi_test_class_and_jars,$(1))) + +endef + else # OOO_JUNIT_JAR .PHONY : $(call gb_JunitTest_get_target,$(1)) diff --git a/starmath/JunitTest_starmath_unoapi.mk b/starmath/JunitTest_starmath_unoapi.mk index d53b20d0c17b..d4440ffb9ced 100644 --- a/starmath/JunitTest_starmath_unoapi.mk +++ b/starmath/JunitTest_starmath_unoapi.mk @@ -9,23 +9,6 @@ $(eval $(call gb_JunitTest_JunitTest,starmath_unoapi)) -$(eval $(call gb_JunitTest_set_defs,starmath_unoapi,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/starmath/qa/unoapi/sm.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/starmath/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/starmath/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,starmath_unoapi,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,starmath_unoapi,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,starmath_unoapi,,sm.sce)) # vim: set noet sw=4 ts=4: diff --git a/svtools/JunitTest_svtools_unoapi.mk b/svtools/JunitTest_svtools_unoapi.mk index 575add5363ff..7ba0c75e9cdf 100644 --- a/svtools/JunitTest_svtools_unoapi.mk +++ b/svtools/JunitTest_svtools_unoapi.mk @@ -19,23 +19,6 @@ $(eval $(call gb_JunitTest_JunitTest,svtools_unoapi)) -$(eval $(call gb_JunitTest_set_defs,svtools_unoapi,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/svtools/qa/unoapi/svtools.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/svtools/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/svtools/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,svtools_unoapi,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,svtools_unoapi,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,svtools_unoapi)) # vim: set noet sw=4 ts=4: diff --git a/svx/JunitTest_svx_unoapi.mk b/svx/JunitTest_svx_unoapi.mk index 3ecb86cde46f..f095a9b09fec 100644 --- a/svx/JunitTest_svx_unoapi.mk +++ b/svx/JunitTest_svx_unoapi.mk @@ -19,23 +19,6 @@ $(eval $(call gb_JunitTest_JunitTest,svx_unoapi)) -$(eval $(call gb_JunitTest_set_defs,svx_unoapi,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/svx/qa/unoapi/svx.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/svx/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/svx/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,svx_unoapi,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,svx_unoapi,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,svx_unoapi)) # vim: set noet sw=4 ts=4: diff --git a/sw/JunitTest_sw_unoapi_1.mk b/sw/JunitTest_sw_unoapi_1.mk index 8861a5ea2810..0495acd103bc 100644 --- a/sw/JunitTest_sw_unoapi_1.mk +++ b/sw/JunitTest_sw_unoapi_1.mk @@ -19,23 +19,6 @@ $(eval $(call gb_JunitTest_JunitTest,sw_unoapi_1)) -$(eval $(call gb_JunitTest_set_defs,sw_unoapi_1,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/sw/qa/unoapi/sw_1.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/sw/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/sw/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,sw_unoapi_1,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,sw_unoapi_1,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,sw_unoapi_1)) # vim: set noet sw=4 ts=4: diff --git a/sw/JunitTest_sw_unoapi_2.mk b/sw/JunitTest_sw_unoapi_2.mk index 502c2e841ff7..eba54af43814 100644 --- a/sw/JunitTest_sw_unoapi_2.mk +++ b/sw/JunitTest_sw_unoapi_2.mk @@ -19,23 +19,6 @@ $(eval $(call gb_JunitTest_JunitTest,sw_unoapi_2)) -$(eval $(call gb_JunitTest_set_defs,sw_unoapi_2,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/sw/qa/unoapi/sw_2.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/sw/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/sw/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,sw_unoapi_2,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,sw_unoapi_2,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,sw_unoapi_2)) # vim: set noet sw=4 ts=4: diff --git a/sw/JunitTest_sw_unoapi_3.mk b/sw/JunitTest_sw_unoapi_3.mk index f7bb8ba07089..6c344f0b1daa 100644 --- a/sw/JunitTest_sw_unoapi_3.mk +++ b/sw/JunitTest_sw_unoapi_3.mk @@ -19,23 +19,6 @@ $(eval $(call gb_JunitTest_JunitTest,sw_unoapi_3)) -$(eval $(call gb_JunitTest_set_defs,sw_unoapi_3,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/sw/qa/unoapi/sw_3.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/sw/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/sw/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,sw_unoapi_3,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,sw_unoapi_3,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,sw_unoapi_3)) # vim: set noet sw=4 ts=4: diff --git a/sw/JunitTest_sw_unoapi_4.mk b/sw/JunitTest_sw_unoapi_4.mk index 91a3f12aa9ed..b6d2ba3114ef 100644 --- a/sw/JunitTest_sw_unoapi_4.mk +++ b/sw/JunitTest_sw_unoapi_4.mk @@ -19,23 +19,6 @@ $(eval $(call gb_JunitTest_JunitTest,sw_unoapi_4)) -$(eval $(call gb_JunitTest_set_defs,sw_unoapi_4,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/sw/qa/unoapi/sw_4.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/sw/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/sw/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,sw_unoapi_4,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,sw_unoapi_4,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,sw_unoapi_4)) # vim: set noet sw=4 ts=4: diff --git a/toolkit/JunitTest_toolkit_unoapi_1.mk b/toolkit/JunitTest_toolkit_unoapi_1.mk index 5feec1b8f6ca..ddd916107f14 100644 --- a/toolkit/JunitTest_toolkit_unoapi_1.mk +++ b/toolkit/JunitTest_toolkit_unoapi_1.mk @@ -19,23 +19,6 @@ $(eval $(call gb_JunitTest_JunitTest,toolkit_unoapi_1)) -$(eval $(call gb_JunitTest_set_defs,toolkit_unoapi_1,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/toolkit/qa/unoapi/toolkit_1.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/toolkit/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/toolkit/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,toolkit_unoapi_1,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,toolkit_unoapi_1,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,toolkit_unoapi_1)) # vim: set noet sw=4 ts=4: diff --git a/toolkit/JunitTest_toolkit_unoapi_2.mk b/toolkit/JunitTest_toolkit_unoapi_2.mk index 4838cb656055..642829a23ac5 100644 --- a/toolkit/JunitTest_toolkit_unoapi_2.mk +++ b/toolkit/JunitTest_toolkit_unoapi_2.mk @@ -19,23 +19,6 @@ $(eval $(call gb_JunitTest_JunitTest,toolkit_unoapi_2)) -$(eval $(call gb_JunitTest_set_defs,toolkit_unoapi_2,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/toolkit/qa/unoapi/toolkit_2.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/toolkit/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/toolkit/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,toolkit_unoapi_2,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,toolkit_unoapi_2,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,toolkit_unoapi_2)) # vim: set noet sw=4 ts=4: diff --git a/toolkit/JunitTest_toolkit_unoapi_3.mk b/toolkit/JunitTest_toolkit_unoapi_3.mk index 0489f6f6931e..71c69d0a2e86 100644 --- a/toolkit/JunitTest_toolkit_unoapi_3.mk +++ b/toolkit/JunitTest_toolkit_unoapi_3.mk @@ -19,23 +19,6 @@ $(eval $(call gb_JunitTest_JunitTest,toolkit_unoapi_3)) -$(eval $(call gb_JunitTest_set_defs,toolkit_unoapi_3,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/toolkit/qa/unoapi/toolkit_3.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/toolkit/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/toolkit/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,toolkit_unoapi_3,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,toolkit_unoapi_3,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,toolkit_unoapi_3)) # vim: set noet sw=4 ts=4: diff --git a/toolkit/JunitTest_toolkit_unoapi_4.mk b/toolkit/JunitTest_toolkit_unoapi_4.mk index 35af1fb5de17..e6157163336a 100644 --- a/toolkit/JunitTest_toolkit_unoapi_4.mk +++ b/toolkit/JunitTest_toolkit_unoapi_4.mk @@ -19,23 +19,6 @@ $(eval $(call gb_JunitTest_JunitTest,toolkit_unoapi_4)) -$(eval $(call gb_JunitTest_set_defs,toolkit_unoapi_4,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/toolkit/qa/unoapi/toolkit_4.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/toolkit/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/toolkit/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,toolkit_unoapi_4,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,toolkit_unoapi_4,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,toolkit_unoapi_4)) # vim: set noet sw=4 ts=4: diff --git a/ucb/JunitTest_ucb_unoapi.mk b/ucb/JunitTest_ucb_unoapi.mk index cae2dc53c594..fe2106d0636f 100644 --- a/ucb/JunitTest_ucb_unoapi.mk +++ b/ucb/JunitTest_ucb_unoapi.mk @@ -9,23 +9,6 @@ $(eval $(call gb_JunitTest_JunitTest,ucb_unoapi)) -$(eval $(call gb_JunitTest_set_defs,ucb_unoapi,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/ucb/qa/unoapi/ucb.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/ucb/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/ucb/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,ucb_unoapi,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,ucb_unoapi,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,ucb_unoapi)) # vim: set noet sw=4 ts=4: diff --git a/xmloff/JunitTest_xmloff_unoapi.mk b/xmloff/JunitTest_xmloff_unoapi.mk index 650d86b7277a..320ebcaa027f 100644 --- a/xmloff/JunitTest_xmloff_unoapi.mk +++ b/xmloff/JunitTest_xmloff_unoapi.mk @@ -19,23 +19,6 @@ $(eval $(call gb_JunitTest_JunitTest,xmloff_unoapi)) -$(eval $(call gb_JunitTest_set_defs,xmloff_unoapi,\ - $$(DEFS) \ - -Dorg.openoffice.test.arg.sce=$(SRCDIR)/xmloff/qa/unoapi/xmloff.sce \ - -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/xmloff/qa/unoapi/knownissues.xcl \ - -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/xmloff/qa/unoapi/testdocuments \ -)) - -$(eval $(call gb_JunitTest_use_jars,xmloff_unoapi,\ - OOoRunner \ - ridl \ - test \ - unoil \ - jurt \ -)) - -$(eval $(call gb_JunitTest_add_classes,xmloff_unoapi,\ - org.openoffice.test.UnoApiTest \ -)) +$(eval $(call gb_JunitTest_set_unoapi_test_defaults,xmloff_unoapi)) # vim: set noet sw=4 ts=4: |