summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-06-07 16:42:37 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-06-07 19:50:47 +0200
commit6004f17ae68cc6c15ef9cc96cc502dd4a09d6cf1 (patch)
tree4753fd14c2e0ccb430b9a4ec7845dce18d886316 /sd
parent3893b54e3656c07e182947a4fd5ef1b0be82bd2e (diff)
sd: Use template for export test modules
Change-Id: Ib604d0ad64dc16dbf9c0115a0fb30a8e3c6da337 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116787 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/CppunitTest_sd_export_ooxml1.mk81
-rw-r--r--sd/CppunitTest_sd_export_ooxml2.mk81
-rw-r--r--sd/CppunitTest_sd_export_tests-ooxml1.mk14
-rw-r--r--sd/CppunitTest_sd_export_tests-ooxml2.mk14
-rw-r--r--sd/CppunitTest_sd_export_tests.mk70
-rw-r--r--sd/Module_sd.mk6
-rw-r--r--sd/export_setup.mk86
7 files changed, 120 insertions, 232 deletions
diff --git a/sd/CppunitTest_sd_export_ooxml1.mk b/sd/CppunitTest_sd_export_ooxml1.mk
deleted file mode 100644
index ed3fd32dd10c..000000000000
--- a/sd/CppunitTest_sd_export_ooxml1.mk
+++ /dev/null
@@ -1,81 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#*************************************************************************
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-#*************************************************************************
-
-$(eval $(call gb_CppunitTest_CppunitTest,sd_export_ooxml1))
-
-$(eval $(call gb_CppunitTest_use_externals,sd_export_ooxml1,\
- boost_headers \
- libxml2 \
-))
-
-$(eval $(call gb_CppunitTest_use_common_precompiled_header,sd_export_ooxml1))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,sd_export_ooxml1, \
- sd/qa/unit/export-tests-ooxml1 \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,sd_export_ooxml1, \
- $(call gb_Helper_optional,AVMEDIA,avmedia) \
- basegfx \
- comphelper \
- cppu \
- cppuhelper \
- drawinglayer \
- editeng \
- for \
- forui \
- i18nlangtag \
- msfilter \
- oox \
- sal \
- salhelper \
- sax \
- sd \
- sfx \
- sot \
- svl \
- svt \
- svx \
- svxcore \
- test \
- tl \
- tk \
- ucbhelper \
- unotest \
- utl \
- vcl \
- xo \
-))
-
-$(eval $(call gb_CppunitTest_set_include,sd_export_ooxml1,\
- -I$(SRCDIR)/sd/source/ui/inc \
- -I$(SRCDIR)/sd/inc \
- $$(INCLUDE) \
-))
-
-$(eval $(call gb_CppunitTest_use_sdk_api,sd_export_ooxml1))
-
-$(eval $(call gb_CppunitTest_use_ure,sd_export_ooxml1))
-$(eval $(call gb_CppunitTest_use_vcl,sd_export_ooxml1))
-
-$(eval $(call gb_CppunitTest_use_rdb,sd_export_ooxml1,services))
-
-$(eval $(call gb_CppunitTest_use_custom_headers,sd_export_ooxml1,\
- officecfg/registry \
-))
-
-$(eval $(call gb_CppunitTest_use_configuration,sd_export_ooxml1))
-
-$(eval $(call gb_CppunitTest_add_arguments,sd_export_ooxml1,\
- -env:SVG_DISABLE_FONT_EMBEDDING= \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/sd/CppunitTest_sd_export_ooxml2.mk b/sd/CppunitTest_sd_export_ooxml2.mk
deleted file mode 100644
index 947e4c39d917..000000000000
--- a/sd/CppunitTest_sd_export_ooxml2.mk
+++ /dev/null
@@ -1,81 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#*************************************************************************
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-#*************************************************************************
-
-$(eval $(call gb_CppunitTest_CppunitTest,sd_export_ooxml2))
-
-$(eval $(call gb_CppunitTest_use_externals,sd_export_ooxml2,\
- boost_headers \
- libxml2 \
-))
-
-$(eval $(call gb_CppunitTest_use_common_precompiled_header,sd_export_ooxml2))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,sd_export_ooxml2, \
- sd/qa/unit/export-tests-ooxml2 \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,sd_export_ooxml2, \
- $(call gb_Helper_optional,AVMEDIA,avmedia) \
- basegfx \
- comphelper \
- cppu \
- cppuhelper \
- drawinglayer \
- editeng \
- for \
- forui \
- i18nlangtag \
- msfilter \
- oox \
- sal \
- salhelper \
- sax \
- sd \
- sfx \
- sot \
- svl \
- svt \
- svx \
- svxcore \
- test \
- tl \
- tk \
- ucbhelper \
- unotest \
- utl \
- vcl \
- xo \
-))
-
-$(eval $(call gb_CppunitTest_set_include,sd_export_ooxml2,\
- -I$(SRCDIR)/sd/source/ui/inc \
- -I$(SRCDIR)/sd/inc \
- $$(INCLUDE) \
-))
-
-$(eval $(call gb_CppunitTest_use_sdk_api,sd_export_ooxml2))
-
-$(eval $(call gb_CppunitTest_use_ure,sd_export_ooxml2))
-$(eval $(call gb_CppunitTest_use_vcl,sd_export_ooxml2))
-
-$(eval $(call gb_CppunitTest_use_rdb,sd_export_ooxml2,services))
-
-$(eval $(call gb_CppunitTest_use_custom_headers,sd_export_ooxml2,\
- officecfg/registry \
-))
-
-$(eval $(call gb_CppunitTest_use_configuration,sd_export_ooxml2))
-
-$(eval $(call gb_CppunitTest_add_arguments,sd_export_ooxml2,\
- -env:SVG_DISABLE_FONT_EMBEDDING= \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/sd/CppunitTest_sd_export_tests-ooxml1.mk b/sd/CppunitTest_sd_export_tests-ooxml1.mk
new file mode 100644
index 000000000000..914ff8ec592e
--- /dev/null
+++ b/sd/CppunitTest_sd_export_tests-ooxml1.mk
@@ -0,0 +1,14 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*************************************************************************
+
+$(eval $(call sd_export_test,-ooxml1))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sd/CppunitTest_sd_export_tests-ooxml2.mk b/sd/CppunitTest_sd_export_tests-ooxml2.mk
new file mode 100644
index 000000000000..44664f69aa4f
--- /dev/null
+++ b/sd/CppunitTest_sd_export_tests-ooxml2.mk
@@ -0,0 +1,14 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*************************************************************************
+
+$(eval $(call sd_export_test,-ooxml2))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sd/CppunitTest_sd_export_tests.mk b/sd/CppunitTest_sd_export_tests.mk
index c2c7c8f3552d..20aea4da12bf 100644
--- a/sd/CppunitTest_sd_export_tests.mk
+++ b/sd/CppunitTest_sd_export_tests.mk
@@ -9,73 +9,7 @@
#
#*************************************************************************
-$(eval $(call gb_CppunitTest_CppunitTest,sd_export_tests))
-
-$(eval $(call gb_CppunitTest_use_externals,sd_export_tests,\
- boost_headers \
- libxml2 \
-))
-
-$(eval $(call gb_CppunitTest_use_common_precompiled_header,sd_export_tests))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,sd_export_tests, \
- sd/qa/unit/export-tests \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,sd_export_tests, \
- $(call gb_Helper_optional,AVMEDIA,avmedia) \
- basegfx \
- comphelper \
- cppu \
- cppuhelper \
- drawinglayer \
- editeng \
- for \
- forui \
- i18nlangtag \
- msfilter \
- oox \
- sal \
- salhelper \
- sax \
- sd \
- sfx \
- sot \
- svl \
- svt \
- svx \
- svxcore \
- test \
- tl \
- tk \
- ucbhelper \
- unotest \
- utl \
- vcl \
- xo \
-))
-
-$(eval $(call gb_CppunitTest_set_include,sd_export_tests,\
- -I$(SRCDIR)/sd/source/ui/inc \
- -I$(SRCDIR)/sd/inc \
- $$(INCLUDE) \
-))
-
-$(eval $(call gb_CppunitTest_use_sdk_api,sd_export_tests))
-
-$(eval $(call gb_CppunitTest_use_ure,sd_export_tests))
-$(eval $(call gb_CppunitTest_use_vcl,sd_export_tests))
-
-$(eval $(call gb_CppunitTest_use_rdb,sd_export_tests,services))
-
-$(eval $(call gb_CppunitTest_use_custom_headers,sd_export_tests,\
- officecfg/registry \
-))
-
-$(eval $(call gb_CppunitTest_use_configuration,sd_export_tests))
-
-$(eval $(call gb_CppunitTest_add_arguments,sd_export_tests,\
- -env:SVG_DISABLE_FONT_EMBEDDING= \
-))
+# empty second argument (i.e. no 1)
+$(eval $(call sd_export_test,))
# vim: set noet sw=4 ts=4:
diff --git a/sd/Module_sd.mk b/sd/Module_sd.mk
index 2aa512f0fa29..1e0a9e8f2816 100644
--- a/sd/Module_sd.mk
+++ b/sd/Module_sd.mk
@@ -7,6 +7,8 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
+include $(SRCDIR)/sd/export_setup.mk
+
$(eval $(call gb_Module_Module,sd))
$(eval $(call gb_Module_add_targets,sd,\
@@ -31,8 +33,8 @@ $(eval $(call gb_Module_add_slowcheck_targets,sd,\
CppunitTest_sd_uimpress) \
CppunitTest_sd_import_tests \
CppunitTest_sd_import_tests_smartart \
- CppunitTest_sd_export_ooxml1 \
- CppunitTest_sd_export_ooxml2 \
+ CppunitTest_sd_export_tests-ooxml1 \
+ CppunitTest_sd_export_tests-ooxml2 \
CppunitTest_sd_export_tests \
CppunitTest_sd_filters_test \
CppunitTest_sd_layout_tests \
diff --git a/sd/export_setup.mk b/sd/export_setup.mk
new file mode 100644
index 000000000000..3e69a1b8713a
--- /dev/null
+++ b/sd/export_setup.mk
@@ -0,0 +1,86 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*************************************************************************
+
+# template for export tests
+define sd_export_test
+
+$(eval $(call gb_CppunitTest_CppunitTest,sd_export_tests$(1)))
+
+$(eval $(call gb_CppunitTest_use_externals,sd_export_tests$(1),\
+ boost_headers \
+ libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_use_common_precompiled_header,sd_export_tests$(1)))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sd_export_tests$(1), \
+ sd/qa/unit/export-tests$(1) \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sd_export_tests$(1), \
+ $(call gb_Helper_optional,AVMEDIA,avmedia) \
+ basegfx \
+ comphelper \
+ cppu \
+ cppuhelper \
+ drawinglayer \
+ editeng \
+ for \
+ forui \
+ i18nlangtag \
+ msfilter \
+ oox \
+ sal \
+ salhelper \
+ sax \
+ sd \
+ sfx \
+ sot \
+ svl \
+ svt \
+ svx \
+ svxcore \
+ test \
+ tl \
+ tk \
+ ucbhelper \
+ unotest \
+ utl \
+ vcl \
+ xo \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sd_export_tests$(1),\
+ -I$(SRCDIR)/sd/source/ui/inc \
+ -I$(SRCDIR)/sd/inc \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,sd_export_tests$(1)))
+
+$(eval $(call gb_CppunitTest_use_ure,sd_export_tests$(1)))
+$(eval $(call gb_CppunitTest_use_vcl,sd_export_tests$(1)))
+
+$(eval $(call gb_CppunitTest_use_rdb,sd_export_tests$(1),services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,sd_export_tests$(1),\
+ officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sd_export_tests$(1)))
+
+$(eval $(call gb_CppunitTest_add_arguments,sd_export_tests$(1),\
+ -env:SVG_DISABLE_FONT_EMBEDDING= \
+))
+
+endef
+
+# vim: set noet sw=4 ts=4: