summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-07-27 13:18:32 +0200
committerDavid Tardon <dtardon@redhat.com>2014-07-29 22:12:02 +0200
commit2a87b3b5aed8296a7506374fd5324c5659a88cb5 (patch)
tree19599f1a2dc3b4050fb2ecb09ab7dc9a8b42ae70
parent01d8524a6a21b5f0039bff07eee3f040a3ba50ba (diff)
gbuild: allow a unit test to depend on a jar file
Change-Id: I68edf70e41023d3056859d49005c684b7c4e24d6
-rw-r--r--dbaccess/CppunitTest_dbaccess_hsqldb_test.mk4
-rw-r--r--solenv/gbuild/CppunitTest.mk20
2 files changed, 24 insertions, 0 deletions
diff --git a/dbaccess/CppunitTest_dbaccess_hsqldb_test.mk b/dbaccess/CppunitTest_dbaccess_hsqldb_test.mk
index 69571b46fed0..0dd08cb9e82e 100644
--- a/dbaccess/CppunitTest_dbaccess_hsqldb_test.mk
+++ b/dbaccess/CppunitTest_dbaccess_hsqldb_test.mk
@@ -71,6 +71,10 @@ $(eval $(call gb_CppunitTest_use_components,dbaccess_hsqldb_test,\
xmloff/util/xo \
))
+$(eval $(call gb_CppunitTest_use_jars,dbaccess_hsqldb_test,\
+ sdbc_hsqldb \
+))
+
$(eval $(call gb_CppunitTest_use_configuration,dbaccess_hsqldb_test))
$(eval $(call gb_CppunitTest_use_filter_configuration,dbaccess_hsqldb_test))
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index df5c61b7e859..137adca42a1d 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -261,6 +261,26 @@ $(call gb_CppunitTest_get_target,$(1)) : $(call gb_Executable_get_target,$(2))
endef
+define gb_CppunitTest__use_java_ure
+$(call gb_CppunitTest_get_target,$(1)) : \
+ $(foreach jar,java_uno juh jurt unoil unoloader,$(call gb_Jar_get_target,$(jar))) \
+ $(call gb_Library_get_target,affine_uno_uno) \
+ $(call gb_Package_get_target,jvmfwk_javavendors) \
+ $(call gb_Package_get_target,jvmfwk_jreproperties)
+
+endef
+
+define gb_CppunitTest_use_jar
+$(call gb_CppunitTest__use_java_ure,$(1))
+$(call gb_CppunitTest_get_target,$(1)) : $(call gb_Jar_get_target,$(2))
+
+endef
+
+define gb_CppunitTest_use_jars
+$(foreach jar,$(2),$(call gb_CppunitTest_use_jar,$(1),$(jar)))
+
+endef
+
define gb_CppunitTest__forward_to_Linktarget
gb_CppunitTest_$(1) = $$(call gb_LinkTarget_$(1),$$(call gb_CppunitTest_get_linktarget,$$(1)),$$(2),$$(3),CppunitTest_$$(1))