summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/CppunitTest_sd_regression_test.mk2
-rw-r--r--smoketest/CppunitTest_smoketest.mk4
-rw-r--r--solenv/gbuild/CppunitTest.mk14
3 files changed, 13 insertions, 7 deletions
diff --git a/sd/CppunitTest_sd_regression_test.mk b/sd/CppunitTest_sd_regression_test.mk
index 4b24b2550c80..b8d157ab43db 100644
--- a/sd/CppunitTest_sd_regression_test.mk
+++ b/sd/CppunitTest_sd_regression_test.mk
@@ -124,7 +124,7 @@ $(eval $(call gb_CppunitTest_use_extra_configuration,sd_regression_test,\
$(OUTDIR)/unittest/registry \
))
-$(eval $(call gb_CppunitTest_set_args,sd_regression_test,\
+$(eval $(call gb_CppunitTest_add_arguments,sd_regression_test,\
"-env:SVG_DISABLE_FONT_EMBEDDING=YEAH" \
))
diff --git a/smoketest/CppunitTest_smoketest.mk b/smoketest/CppunitTest_smoketest.mk
index c51df89535bd..16a6ea374569 100644
--- a/smoketest/CppunitTest_smoketest.mk
+++ b/smoketest/CppunitTest_smoketest.mk
@@ -48,9 +48,7 @@ else
my_soffice:=path:$(OUTDIR)/installation/opt/program/soffice
endif
-$(eval $(call gb_CppunitTest_set_args,smoketest,\
- -env:UNO_SERVICES=$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/ure/services.rdb) \
- -env:UNO_TYPES=$(call gb_CppunitTarget__make_url,$(OUTDIR)/bin/types.rdb) \
+$(eval $(call gb_CppunitTest_add_arguments,smoketest,\
-env:arg-soffice=$(my_soffice) \
-env:arg-user=$(WORKDIR)/CustomTarget/smoketest \
-env:arg-env=$(gb_Helper_LIBRARY_PATH_VAR)"$$$${$(gb_Helper_LIBRARY_PATH_VAR)+=$$$$$(gb_Helper_LIBRARY_PATH_VAR)}" \
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index a6672536c5d2..77aae55560da 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -61,7 +61,6 @@ gb_CppunitTest__get_linktargetname = CppunitTest/$(call gb_CppunitTest_get_filen
gb_CppunitTarget__make_url = file://$(if $(filter WNT,$(OS_FOR_BUILD)),/)$(strip $(1))
define gb_CppunitTest__make_args
-$(ARGS) \
--headless \
$(if $(strip $(CONFIGURATION_LAYERS)),\
"-env:CONFIGURATION_LAYERS=$(strip $(CONFIGURATION_LAYERS))") \
@@ -72,7 +71,8 @@ $(if $(strip $(UNO_SERVICES)),\
$(if $(URE),\
$(foreach dir,URE_INTERNAL_LIB_DIR LO_LIB_DIR,\
-env:$(dir)=$(call gb_CppunitTarget__make_url,$(gb_CppunitTest_LIBDIR))) \
- --protector unoexceptionprotector$(gb_Library_DLLEXT) unoexceptionprotector)
+ --protector unoexceptionprotector$(gb_Library_DLLEXT) unoexceptionprotector) \
+$(ARGS)
endef
.PHONY : $(call gb_CppunitTest_get_clean_target,%)
@@ -136,7 +136,15 @@ $(call gb_CppunitTest_get_target,$(1)) : SAL_DIAGNOSE_ABORT := TRUE
endef
define gb_CppunitTest_set_args
-$(call gb_CppunitTest_get_target,$(1)) : ARGS := $(2)
+$$(call gb_Output_error,gb_CppunitTest_set_args: use gb_CppunitTest_add_arguments instead.))
+endef
+
+# Add additional command line arguments for the test.
+#
+# You should practically never need to use this, as there are special
+# functions for adding many commonly used arguments.
+define gb_CppunitTest_add_arguments
+$(call gb_CppunitTest_get_target,$(1)) : ARGS += $(2)
endef