[cpp-xmltooling] 12/22: Refactor test source generation

Scott Cantor cantor.2 at osu.edu
Thu Jun 21 14:57:28 EDT 2018


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

scantor pushed a commit to branch master
in repository cpp-xmltooling.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-xmltooling.git;a=commit;h=1f5177a45fd21106e08650684a99835080cc413a

commit 1f5177a45fd21106e08650684a99835080cc413a
Author: Ferenc Wágner <wferi at niif.hu>
AuthorDate: Wed Jul 6 18:46:59 2016 +0200

    Refactor test source generation
---
 xmltoolingtest/Makefile.am | 62 +++++++++++++++++++++-------------------------
 1 file changed, 28 insertions(+), 34 deletions(-)

diff --git a/xmltoolingtest/Makefile.am b/xmltoolingtest/Makefile.am
index ed9aa9c..1378eb5 100644
--- a/xmltoolingtest/Makefile.am
+++ b/xmltoolingtest/Makefile.am
@@ -15,49 +15,43 @@ xmltoolingtest_LDADD += $(xerces_LIBS)
 
 if BUILD_XMLSEC
 xmlsec_sources = \
-	DataSealerTest.h \
-	EncryptionTest.h \
-	FilesystemCredentialResolverTest.h \
-	ExplicitKeyTrustEngineTest.h \
-	InlineKeyResolverTest.h \
-	MemoryStorageServiceTest.h \
-	PKIXEngineTest.h \
-	SecurityHelperTest.h \
-	SignatureTest.h
-else
-xmlsec_sources =
+	DataSealerTest.cpp \
+	EncryptionTest.cpp \
+	FilesystemCredentialResolverTest.cpp \
+	ExplicitKeyTrustEngineTest.cpp \
+	InlineKeyResolverTest.cpp \
+	MemoryStorageServiceTest.cpp \
+	PKIXEngineTest.cpp \
+	SecurityHelperTest.cpp \
+	SignatureTest.cpp
 endif
 
-xmltoolingtest_h = \
-	ComplexXMLObjectTest.h \
-	DateTimeTest.h \
-	DirectoryWalkerTest.h \
-	ExceptionTest.h \
-	KeyInfoTest.h \
-	MarshallingTest.h \
-	NonVisibleNamespaceTest.h \
-	SOAPTest.h \
-	UnmarshallingTest.h \
-	TemplateEngineTest.h \
-	xmltoolingtest.h \
+xmltoolingtest_sources = \
+	ComplexXMLObjectTest.cpp \
+	DateTimeTest.cpp \
+	DirectoryWalkerTest.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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list