Package: xmltooling / 1.6.0-4+deb9u2

Refactor-test-source-generation.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@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