diff options
-rw-r--r-- | RepositoryExternal.mk | 6 | ||||
-rw-r--r-- | connectivity/JunitTest_complex.mk | 7 | ||||
-rw-r--r-- | solenv/gbuild/Jar.mk | 2 | ||||
-rw-r--r-- | solenv/gbuild/JunitTest.mk | 28 |
4 files changed, 36 insertions, 7 deletions
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 121c3434a468..8383d9aecf4a 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -1973,6 +1973,9 @@ ifeq ($(SYSTEM_HSQLDB),YES) define gb_Jar__use_hsqldb $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR)) endef +define gb_JunitTest__use_hsqldb +$(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR)) +endef else # !SYSTEM_HSQLDB @@ -1983,6 +1986,9 @@ $(eval $(call gb_Helper_register_jars,OOO,\ define gb_Jar__use_hsqldb $(call gb_Jar_use_jar,$(1),hsqldb) endef +define gb_JunitTest__use_hsqldb +$(call gb_JunitTest_use_jar,$(1),hsqldb) +endef endif # SYSTEM_HSQLDB diff --git a/connectivity/JunitTest_complex.mk b/connectivity/JunitTest_complex.mk index 59fcdc6ef5e5..609f5ea410cc 100644 --- a/connectivity/JunitTest_complex.mk +++ b/connectivity/JunitTest_complex.mk @@ -32,7 +32,6 @@ $(eval $(call gb_JunitTest_set_defs,connectivity_complex,\ -Dorg.openoffice.test.arg.sce=$(SRCDIR)/connectivity/qa/scenearios.sce \ )) -# TODO: add use_externals to JunitTest $(eval $(call gb_JunitTest_use_jars,connectivity_complex,\ jurt \ OOoRunner \ @@ -41,13 +40,9 @@ $(eval $(call gb_JunitTest_use_jars,connectivity_complex,\ unoil \ )) -ifeq ($(SYSTEM_HSQLDB),YES) -$(eval $(call gb_JavaClassSet_use_system_jar,$(call gb_JunitTest_get_classsetname,connectivity_complex),$(HSQLDB_JAR))) -else -$(eval $(call gb_JunitTest_use_jars,connectivity_complex,\ +$(eval $(call gb_JunitTest_use_externals,connectivity_complex,\ hsqldb \ )) -endif $(eval $(call gb_JunitTest_add_classes,connectivity_complex,\ org.openoffice.test.UnoApiTest \ diff --git a/solenv/gbuild/Jar.mk b/solenv/gbuild/Jar.mk index ea98eaf70491..9e57be290047 100644 --- a/solenv/gbuild/Jar.mk +++ b/solenv/gbuild/Jar.mk @@ -229,7 +229,7 @@ $$(call gb_Output_error,\ endef define gb_Jar_use_system_jars -$(call gb_JavaClassSet_use_system_jars,$(call gb_Jar_get_classsetname,$(1)),$(2)) +$(foreach jar,$(2),$(call gb_Jar_use_system_jar,$(1),$(jar))) endef diff --git a/solenv/gbuild/JunitTest.mk b/solenv/gbuild/JunitTest.mk index 590f8480581b..8a5ff4564321 100644 --- a/solenv/gbuild/JunitTest.mk +++ b/solenv/gbuild/JunitTest.mk @@ -137,6 +137,30 @@ $(call gb_JunitTest_get_target,$(1)) : T_CP := $$(T_CP)$$(gb_CLASSPATHSEP)$(call endef +define gb_JunitTest_use_system_jar +$(call gb_JavaClassSet_use_system_jar,$(call gb_JunitTest_get_classsetname,$(1)),$(2)) + +endef + +define gb_JunitTest_use_system_jars +$(foreach jar,$(2),$(call gb_JunitTest_use_system_jar,$(1),$(jar))) + +endef + +# this forwards to functions that must be defined in RepositoryExternal.mk. +# $(eval $(call gb_JunitTest_use_external,jar,external)) +define gb_JunitTest_use_external +$(if $(value gb_JunitTest__use_$(2)),\ + $(call gb_JunitTest__use_$(2),$(1)),\ + $(error gb_JunitTest_use_external: unknown external: $(2))) + +endef + +define gb_JunitTest_use_externals +$(foreach external,$(2),$(call gb_JunitTest_use_external,$(1),$(external))) + +endef + define gb_JunitTest_add_customtarget_dependency $$(call gb_Output_error,\ gb_JunitTest_add_customtarget_dependency: use gb_Jar_use_customtarget instead.) @@ -177,6 +201,10 @@ gb_JunitTest_add_sourcefiles := gb_JunitTest_use_jar := gb_JunitTest_use_jars := gb_JunitTest_use_jar_classset := +gb_JunitTest_use_system_jar := +gb_JunitTest_use_system_jars := +gb_JunitTest_use_external := +gb_JunitTest_use_externals := gb_JunitTest_use_customtarget := gb_JunitTest_use_customtargets := |