[xmltooling] 12/17: Add 4 patches refactoring xmltoolingtest

Ferenc Wágner wferi-guest at moszumanska.debian.org
Thu Jul 21 18:17:56 UTC 2016


This is an automated email from the git hooks/post-receive script.

wferi-guest pushed a commit to branch debian/experimental
in repository xmltooling.

commit a1db54e22a81c1f155acec4dd9aa2ea82565cdb9
Author: Ferenc Wágner <wferi at niif.hu>
Date:   Wed Jul 6 18:53:27 2016 +0200

    Add 4 patches refactoring xmltoolingtest
---
 .../Factor-out-the-Xerces-library-dependence.patch | 26 +++++++
 .../patches/Refactor-test-source-generation.patch  | 84 ++++++++++++++++++++++
 ...-BUILD_UNITTEST-in-the-main-Makefile-only.patch | 58 +++++++++++++++
 ...pendencies-are-well-known-no-need-to-decl.patch | 20 ++++++
 debian/patches/series                              |  4 ++
 5 files changed, 192 insertions(+)

diff --git a/debian/patches/Factor-out-the-Xerces-library-dependence.patch b/debian/patches/Factor-out-the-Xerces-library-dependence.patch
new file mode 100644
index 0000000..57981bc
--- /dev/null
+++ b/debian/patches/Factor-out-the-Xerces-library-dependence.patch
@@ -0,0 +1,26 @@
+From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi at niif.hu>
+Date: Thu, 7 Jul 2016 13:31:24 +0200
+Subject: Factor out the Xerces library dependence
+
+---
+ xmltoolingtest/Makefile.am | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/xmltoolingtest/Makefile.am b/xmltoolingtest/Makefile.am
+index 480294b..37325a7 100644
+--- a/xmltoolingtest/Makefile.am
++++ b/xmltoolingtest/Makefile.am
+@@ -8,10 +8,11 @@ xmltoolingtest_CXXFLAGS = $(CXXTESTFLAGS)
+ xmltoolingtest_CPPFLAGS = $(xerces_CFLAGS)
+ if BUILD_XMLSEC
+ xmltoolingtest_CPPFLAGS += $(XMLSEC_CFLAGS)
+-xmltoolingtest_LDADD = $(top_builddir)/xmltooling/libxmltooling.la $(XMLSEC_LIBS) $(xerces_LIBS)
++xmltoolingtest_LDADD = $(top_builddir)/xmltooling/libxmltooling.la $(XMLSEC_LIBS)
+ else
+-xmltoolingtest_LDADD = $(top_builddir)/xmltooling/libxmltooling-lite.la $(xerces_LIBS)
++xmltoolingtest_LDADD = $(top_builddir)/xmltooling/libxmltooling-lite.la
+ endif
++xmltoolingtest_LDADD += $(xerces_LIBS)
+ 
+ if BUILD_XMLSEC
+ xmlsec_sources = \
diff --git a/debian/patches/Refactor-test-source-generation.patch b/debian/patches/Refactor-test-source-generation.patch
new file mode 100644
index 0000000..e99dc79
--- /dev/null
+++ b/debian/patches/Refactor-test-source-generation.patch
@@ -0,0 +1,84 @@
+From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi at niif.hu>
+Date: Wed, 6 Jul 2016 18:46:59 +0200
+Subject: Refactor test source generation
+
+---
+ xmltoolingtest/Makefile.am | 56 +++++++++++++++++++++-------------------------
+ 1 file changed, 25 insertions(+), 31 deletions(-)
+
+diff --git a/xmltoolingtest/Makefile.am b/xmltoolingtest/Makefile.am
+index c7d3455..480294b 100644
+--- a/xmltoolingtest/Makefile.am
++++ b/xmltoolingtest/Makefile.am
+@@ -15,46 +15,40 @@ endif
+ 
+ if BUILD_XMLSEC
+ xmlsec_sources = \
+-    EncryptionTest.h \
+-    FilesystemCredentialResolverTest.h \
+-    InlineKeyResolverTest.h \
+-    MemoryStorageServiceTest.h \
+-    PKIXEngineTest.h \
+-    SecurityHelperTest.h \
+-    SignatureTest.h
+-else
+-xmlsec_sources =
++    EncryptionTest.cpp \
++    FilesystemCredentialResolverTest.cpp \
++    InlineKeyResolverTest.cpp \
++    MemoryStorageServiceTest.cpp \
++    PKIXEngineTest.cpp \
++    SecurityHelperTest.cpp \
++    SignatureTest.cpp
+ endif
+ 
+-xmltoolingtest_h = \
+-    ComplexXMLObjectTest.h \
+-    DateTimeTest.h \
+-    ExceptionTest.h \
+-    KeyInfoTest.h \
+-    MarshallingTest.h \
+-    NonVisibleNamespaceTest.h \
+-    SOAPTest.h \
+-    UnmarshallingTest.h \
+-    TemplateEngineTest.h \
+-    xmltoolingtest.h \
++xmltoolingtest_sources = \
++    ComplexXMLObjectTest.cpp \
++    DateTimeTest.cpp \
++    ExceptionTest.cpp \
++    KeyInfoTest.cpp \
++    MarshallingTest.cpp \
++    NonVisibleNamespaceTest.cpp \
++    SOAPTest.cpp \
++    UnmarshallingTest.cpp \
++    TemplateEngineTest.cpp \
+     ${xmlsec_sources}
+ 
+ noinst_HEADERS = \
+     XMLObjectBaseTestCase.h \
+-    $(xmltoolingtest_h)
++    xmltoolingtest.h \
++    $(xmltoolingtest_sources:.cpp=.h)
+ 
+-nodist_xmltoolingtest_SOURCES = $(xmltoolingtest_h:.h=.cpp)
++nodist_xmltoolingtest_SOURCES = xmltoolingtest.cpp $(xmltoolingtest_sources)
+ 
+-CLEANFILES = $(nodist_xmltoolingtest_SOURCES)
++xmltoolingtest.cpp: %.cpp: %.h
++	$(CXXTEST) --error-printer --have-eh --have-std --abort-on-fail -o $@ $<
+ 
+-do-cxxtestgen:
+-	if test "$(CPPFILE)" = "xmltoolingtest.cpp"; then \
+-		$(CXXTEST) --error-printer --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \
+-	else \
+-		$(CXXTEST) --part --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \
+-	fi;
++$(xmltoolingtest_sources): %.cpp: %.h
++	$(CXXTEST) --part --have-eh --have-std --abort-on-fail -o $@ $<
+ 
+-$(nodist_xmltoolingtest_SOURCES): %.cpp: %.h
+-	$(MAKE) do-cxxtestgen HFILE=$< CPPFILE=$@
++CLEANFILES = $(nodist_xmltoolingtest_SOURCES)
+ 
+ EXTRA_DIST = data
diff --git a/debian/patches/Test-BUILD_UNITTEST-in-the-main-Makefile-only.patch b/debian/patches/Test-BUILD_UNITTEST-in-the-main-Makefile-only.patch
new file mode 100644
index 0000000..1627955
--- /dev/null
+++ b/debian/patches/Test-BUILD_UNITTEST-in-the-main-Makefile-only.patch
@@ -0,0 +1,58 @@
+From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi at niif.hu>
+Date: Wed, 6 Jul 2016 17:26:12 +0200
+Subject: Test BUILD_UNITTEST in the main Makefile only
+
+---
+ Makefile.am                | 6 +++++-
+ xmltoolingtest/Makefile.am | 6 ------
+ 2 files changed, 5 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 6bcdb1b..be2f2bd 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -5,7 +5,11 @@ include doxygen.am
+ 
+ MOSTLYCLEANFILES = $(DX_CLEANFILES)
+ 
+-SUBDIRS = doc schemas @PACKAGE_NAME@ xmltoolingtest
++SUBDIRS = doc schemas @PACKAGE_NAME@
++
++if BUILD_UNITTEST
++SUBDIRS += xmltoolingtest
++endif
+ 
+ if DX_COND_doc
+ all-local: doxygen-doc
+diff --git a/xmltoolingtest/Makefile.am b/xmltoolingtest/Makefile.am
+index 7b58b5a..2927af1 100644
+--- a/xmltoolingtest/Makefile.am
++++ b/xmltoolingtest/Makefile.am
+@@ -1,7 +1,5 @@
+ AUTOMAKE_OPTIONS = foreign
+ 
+-if BUILD_UNITTEST
+-
+ TESTS = xmltoolingtest
+ 
+ check_PROGRAMS = xmltoolingtest
+@@ -15,8 +13,6 @@ else
+ xmltoolingtest_LDADD = $(top_builddir)/xmltooling/libxmltooling-lite.la $(xerces_LIBS)
+ endif
+ 
+-endif
+-
+ if BUILD_XMLSEC
+ xmlsec_sources = \
+     EncryptionTest.h \
+@@ -49,10 +45,8 @@ noinst_HEADERS = \
+ 
+ nodist_xmltoolingtest_SOURCES = $(xmltoolingtest_h:.h=.cpp)
+ 
+-if BUILD_UNITTEST
+ BUILT_SOURCES = $(nodist_xmltoolingtest_SOURCES)
+ CLEANFILES = $(nodist_xmltoolingtest_SOURCES)
+-endif
+ 
+ do-cxxtestgen:
+ 	if test "$(CPPFILE)" = "xmltoolingtest.cpp"; then \
diff --git a/debian/patches/The-.cpp-dependencies-are-well-known-no-need-to-decl.patch b/debian/patches/The-.cpp-dependencies-are-well-known-no-need-to-decl.patch
new file mode 100644
index 0000000..4b199c3
--- /dev/null
+++ b/debian/patches/The-.cpp-dependencies-are-well-known-no-need-to-decl.patch
@@ -0,0 +1,20 @@
+From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi at niif.hu>
+Date: Wed, 6 Jul 2016 17:28:50 +0200
+Subject: The .cpp dependencies are well known, no need to declare them
+
+---
+ xmltoolingtest/Makefile.am | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/xmltoolingtest/Makefile.am b/xmltoolingtest/Makefile.am
+index 2927af1..c7d3455 100644
+--- a/xmltoolingtest/Makefile.am
++++ b/xmltoolingtest/Makefile.am
+@@ -45,7 +45,6 @@ noinst_HEADERS = \
+ 
+ nodist_xmltoolingtest_SOURCES = $(xmltoolingtest_h:.h=.cpp)
+ 
+-BUILT_SOURCES = $(nodist_xmltoolingtest_SOURCES)
+ CLEANFILES = $(nodist_xmltoolingtest_SOURCES)
+ 
+ do-cxxtestgen:
diff --git a/debian/patches/series b/debian/patches/series
index 140d7e1..73693f3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,7 @@ Finish-separating-flags-use-_LIBADD.patch
 Add-more-forgotten-test-result-prints.patch
 Remove-.pl-extension-of-cxxtestgen.patch
 Don-t-install-the-test-program-but-link-correctly-an.patch
+Test-BUILD_UNITTEST-in-the-main-Makefile-only.patch
+The-.cpp-dependencies-are-well-known-no-need-to-decl.patch
+Refactor-test-source-generation.patch
+Factor-out-the-Xerces-library-dependence.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/xmltooling.git



More information about the Pkg-shibboleth-devel mailing list