blob: 70720f3db3d6f081a4f7fbe7c80002f7ce73f682 [file] [log] [blame]
Daniel Veillard01791d51998-07-24 19:24:09 +00001## Process this file with automake to produce Makefile.in
Daniel Veillard77044732001-06-29 21:31:07 +00002
Daniel Veillard3157e512010-03-09 11:32:46 +01003ACLOCAL_AMFLAGS = -I m4
4
Daniel Richard G5706b6d2012-08-06 11:32:54 +08005SUBDIRS = include . doc example xstc $(PYTHON_SUBDIR)
Daniel Veillard19b858c1999-02-06 18:12:01 +00006
Daniel Veillardb1da40c2004-09-06 11:57:44 +00007DIST_SUBDIRS = include . doc example python xstc
Daniel Veillard72336152002-09-21 13:08:14 +00008
Daniel Richard Gec4fc522012-08-17 10:04:30 +08009AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/include
10
11AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS) $(LZMA_CFLAGS)
Daniel Veillard14fff061999-06-22 21:49:07 +000012
Daniel Veillard6eadf632003-01-23 18:29:16 +000013noinst_PROGRAMS=testSchemas testRelax testSAX testHTML testXPath testURI \
Daniel Veillard877a7bd2003-09-13 00:16:32 +000014 testThreads testC14N testAutomata testRegexp \
Daniel Veillard7e5c3f42008-07-29 16:12:31 +000015 testReader testapi testModule runtest runsuite testchar \
Daniel Veillard0de1f312012-07-18 17:43:34 +080016 testdict runxmlconf testrecurse testlimits
Daniel Veillard27fb0751998-10-17 06:47:46 +000017
Daniel Veillard344cee72001-08-20 00:08:40 +000018bin_PROGRAMS = xmllint xmlcatalog
Daniel Veillard01791d51998-07-24 19:24:09 +000019
Owen Taylor3473f882001-02-23 17:55:21 +000020bin_SCRIPTS=xml2-config
21
22lib_LTLIBRARIES = libxml2.la
Arfrever Frehtes Taifersar Arahesis1f01f492012-08-28 22:16:50 +080023libxml2_la_LIBADD = $(ICU_LIBS) $(THREAD_LIBS) $(Z_LIBS) $(LZMA_LIBS) $(ICONV_LIBS) $(M_LIBS) $(WIN32_EXTRA_LIBADD)
Owen Taylor3473f882001-02-23 17:55:21 +000024
Daniel Veillard8ed10722009-08-20 19:17:36 +020025if USE_VERSION_SCRIPT
26LIBXML2_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/libxml2.syms
27else
28LIBXML2_VERSION_SCRIPT =
29endif
30
Daniel Richard G5706b6d2012-08-06 11:32:54 +080031libxml2_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) \
32 $(LIBXML2_VERSION_SCRIPT) \
33 -version-info $(LIBXML_VERSION_INFO) \
34 $(MODULE_PLATFORM_LIBS)
Owen Taylor3473f882001-02-23 17:55:21 +000035
Akira TAGOH961b5352012-07-03 14:13:59 +090036if WITH_SAX1_SOURCES
37docb_sources = DOCBparser.c
Daniel Veillard7150a032001-05-02 16:41:11 +000038else
Akira TAGOH961b5352012-07-03 14:13:59 +090039docb_sources =
40endif
41
42if WITH_TRIO_SOURCES
43trio_sources = triostr.c trio.c
44else
45trio_sources =
46endif
47
Daniel Veillard7150a032001-05-02 16:41:11 +000048libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \
49 parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \
50 valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \
Akira TAGOH961b5352012-07-03 14:13:59 +090051 xpointer.c xinclude.c nanohttp.c nanoftp.c \
52 $(docb_sources) \
Daniel Veillardbca22f42012-07-11 16:48:47 +080053 catalog.c globals.c threads.c c14n.c xmlstring.c buf.c \
Daniel Veillarde1ca5032002-12-09 14:13:43 +000054 xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \
Akira TAGOH961b5352012-07-03 14:13:59 +090055 $(trio_sources) \
Daniel Veillard4432df22003-09-28 18:58:27 +000056 xmlreader.c relaxng.c dict.c SAX2.c \
Daniel Veillardce1648b2005-01-04 15:10:22 +000057 xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \
Daniel Veillardadf5ec92012-01-26 16:56:22 +080058 xmlmodule.c schematron.c xzlib.c
Owen Taylor3473f882001-02-23 17:55:21 +000059
60DEPS = $(top_builddir)/libxml2.la
Daniel Richard G5706b6d2012-08-06 11:32:54 +080061LDADDS = $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(LZMA_LIBS) $(ICONV_LIBS) $(M_LIBS) $(WIN32_EXTRA_LIBADD)
Daniel Veillard1638a472003-08-14 01:23:25 +000062
Owen Taylor3473f882001-02-23 17:55:21 +000063
Daniel Veillarde915b2d2002-03-06 18:42:40 +000064man_MANS = xml2-config.1 libxml.3
Owen Taylor3473f882001-02-23 17:55:21 +000065
66m4datadir = $(datadir)/aclocal
67m4data_DATA = libxml.m4
68
Daniel Veillard1b75c3b2005-06-26 21:49:08 +000069runtest_SOURCES=runtest.c
70runtest_LDFLAGS =
71runtest_DEPENDENCIES = $(DEPS)
Daniel Richard G5706b6d2012-08-06 11:32:54 +080072runtest_LDADD= $(BASE_THREAD_LIBS) $(RDL_LIBS) $(LDADDS)
Daniel Veillardf2e066a2005-06-30 13:04:44 +000073
Daniel Veillard0161e632008-08-28 15:36:32 +000074testrecurse_SOURCES=testrecurse.c
75testrecurse_LDFLAGS =
76testrecurse_DEPENDENCIES = $(DEPS)
Daniel Richard G5706b6d2012-08-06 11:32:54 +080077testrecurse_LDADD= $(BASE_THREAD_LIBS) $(RDL_LIBS) $(LDADDS)
Daniel Veillard0161e632008-08-28 15:36:32 +000078
Daniel Veillard0de1f312012-07-18 17:43:34 +080079testlimits_SOURCES=testlimits.c
80testlimits_LDFLAGS =
81testlimits_DEPENDENCIES = $(DEPS)
Daniel Richard G5706b6d2012-08-06 11:32:54 +080082testlimits_LDADD= $(BASE_THREAD_LIBS) $(RDL_LIBS) $(LDADDS)
Daniel Veillard0de1f312012-07-18 17:43:34 +080083
Daniel Veillard34e3f642008-07-29 09:02:27 +000084testchar_SOURCES=testchar.c
85testchar_LDFLAGS =
86testchar_DEPENDENCIES = $(DEPS)
Daniel Richard G5706b6d2012-08-06 11:32:54 +080087testchar_LDADD= $(RDL_LIBS) $(LDADDS)
Daniel Veillard34e3f642008-07-29 09:02:27 +000088
Daniel Veillardd330f182008-08-08 12:03:22 +000089testdict_SOURCES=testdict.c
90testdict_LDFLAGS =
91testdict_DEPENDENCIES = $(DEPS)
Daniel Richard G5706b6d2012-08-06 11:32:54 +080092testdict_LDADD= $(RDL_LIBS) $(LDADDS)
Daniel Veillardd330f182008-08-08 12:03:22 +000093
Daniel Veillardf2e066a2005-06-30 13:04:44 +000094runsuite_SOURCES=runsuite.c
95runsuite_LDFLAGS =
96runsuite_DEPENDENCIES = $(DEPS)
Daniel Richard G5706b6d2012-08-06 11:32:54 +080097runsuite_LDADD= $(RDL_LIBS) $(LDADDS)
Daniel Veillard1b75c3b2005-06-26 21:49:08 +000098
Owen Taylor3473f882001-02-23 17:55:21 +000099xmllint_SOURCES=xmllint.c
Daniel Veillard361d8452000-04-03 19:48:13 +0000100xmllint_LDFLAGS =
101xmllint_DEPENDENCIES = $(DEPS)
Daniel Richard G5706b6d2012-08-06 11:32:54 +0800102xmllint_LDADD= $(RDL_LIBS) $(LDADDS)
Daniel Veillard01791d51998-07-24 19:24:09 +0000103
Owen Taylor3473f882001-02-23 17:55:21 +0000104testSAX_SOURCES=testSAX.c
Daniel Veillard011b63c1999-06-02 17:44:04 +0000105testSAX_LDFLAGS =
106testSAX_DEPENDENCIES = $(DEPS)
Owen Taylor3473f882001-02-23 17:55:21 +0000107testSAX_LDADD= $(LDADDS)
Daniel Veillard011b63c1999-06-02 17:44:04 +0000108
Owen Taylor3473f882001-02-23 17:55:21 +0000109testHTML_SOURCES=testHTML.c
Daniel Veillardbe70ff71999-07-05 16:50:46 +0000110testHTML_LDFLAGS =
111testHTML_DEPENDENCIES = $(DEPS)
Owen Taylor3473f882001-02-23 17:55:21 +0000112testHTML_LDADD= $(LDADDS)
Daniel Veillardbe70ff71999-07-05 16:50:46 +0000113
Daniel Veillard344cee72001-08-20 00:08:40 +0000114xmlcatalog_SOURCES=xmlcatalog.c
115xmlcatalog_LDFLAGS =
116xmlcatalog_DEPENDENCIES = $(DEPS)
Daniel Richard G5706b6d2012-08-06 11:32:54 +0800117xmlcatalog_LDADD = $(RDL_LIBS) $(LDADDS)
Daniel Veillarda7374592001-05-10 14:17:55 +0000118
Owen Taylor3473f882001-02-23 17:55:21 +0000119testXPath_SOURCES=testXPath.c
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000120testXPath_LDFLAGS =
121testXPath_DEPENDENCIES = $(DEPS)
Owen Taylor3473f882001-02-23 17:55:21 +0000122testXPath_LDADD= $(LDADDS)
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000123
Daniel Veillard044fc6b2002-03-04 17:09:44 +0000124testC14N_SOURCES=testC14N.c
125testC14N_LDFLAGS =
126testC14N_DEPENDENCIES = $(DEPS)
127testC14N_LDADD= $(LDADDS)
128
Daniel Richard G5706b6d2012-08-06 11:32:54 +0800129if THREADS_W32
130testThreads_SOURCES = testThreadsWin32.c
131else
132testThreads_SOURCES = testThreads.c
133endif
Daniel Veillardab7488e2001-10-17 11:30:37 +0000134testThreads_LDFLAGS =
135testThreads_DEPENDENCIES = $(DEPS)
Daniel Richard G5706b6d2012-08-06 11:32:54 +0800136testThreads_LDADD= $(BASE_THREAD_LIBS) $(LDADDS)
Daniel Veillardab7488e2001-10-17 11:30:37 +0000137
Owen Taylor3473f882001-02-23 17:55:21 +0000138testURI_SOURCES=testURI.c
Daniel Veillard361d8452000-04-03 19:48:13 +0000139testURI_LDFLAGS =
140testURI_DEPENDENCIES = $(DEPS)
Owen Taylor3473f882001-02-23 17:55:21 +0000141testURI_LDADD= $(LDADDS)
Daniel Veillard361d8452000-04-03 19:48:13 +0000142
Daniel Veillard4255d502002-04-16 15:50:10 +0000143testRegexp_SOURCES=testRegexp.c
144testRegexp_LDFLAGS =
145testRegexp_DEPENDENCIES = $(DEPS)
146testRegexp_LDADD= $(LDADDS)
147
148testAutomata_SOURCES=testAutomata.c
149testAutomata_LDFLAGS =
150testAutomata_DEPENDENCIES = $(DEPS)
151testAutomata_LDADD= $(LDADDS)
152
153testSchemas_SOURCES=testSchemas.c
154testSchemas_LDFLAGS =
155testSchemas_DEPENDENCIES = $(DEPS)
156testSchemas_LDADD= $(LDADDS)
157
Daniel Veillard6eadf632003-01-23 18:29:16 +0000158testRelax_SOURCES=testRelax.c
159testRelax_LDFLAGS =
160testRelax_DEPENDENCIES = $(DEPS)
161testRelax_LDADD= $(LDADDS)
162
Daniel Veillarde1ca5032002-12-09 14:13:43 +0000163testReader_SOURCES=testReader.c
164testReader_LDFLAGS =
165testReader_DEPENDENCIES = $(DEPS)
166testReader_LDADD= $(LDADDS)
167
Daniel Veillardce1648b2005-01-04 15:10:22 +0000168testModule_SOURCES=testModule.c
169testModule_LDFLAGS =
170testModule_DEPENDENCIES = $(DEPS)
171testModule_LDADD= $(LDADDS)
172
173noinst_LTLIBRARIES = testdso.la
174testdso_la_SOURCES = testdso.c
Roumen Petrov120a2692010-03-10 10:07:49 +0100175testdso_la_LDFLAGS = -module -no-undefined -avoid-version -rpath $(libdir)
Daniel Veillardce1648b2005-01-04 15:10:22 +0000176
Daniel Veillard2ae13382005-01-25 23:45:06 +0000177# that one forces the rebuild when "make rebuild" is run on doc/
178rebuild_testapi:
179 -@(if [ "$(PYTHON)" != "" ] ; then \
180 $(PYTHON) $(srcdir)/gentest.py $(srcdir) ; fi )
181
182# that one is just to make sure it is rebuilt if missing
183# but adding the dependances generate mess
Daniel Veillardda3fee42008-09-01 13:08:57 +0000184testapi.c: $(srcdir)/gentest.py
William M. Brack106cad62004-12-23 15:56:12 +0000185 -@(if [ "$(PYTHON)" != "" ] ; then \
186 $(PYTHON) $(srcdir)/gentest.py $(srcdir) ; fi )
Daniel Veillard36e5cd52004-11-02 14:52:23 +0000187
Daniel Richard G5706b6d2012-08-06 11:32:54 +0800188BUILT_SOURCES = testapi.c
189
Daniel Veillard36e5cd52004-11-02 14:52:23 +0000190testapi_SOURCES=testapi.c
191testapi_LDFLAGS =
192testapi_DEPENDENCIES = $(DEPS)
193testapi_LDADD= $(LDADDS)
194
Daniel Veillard7e5c3f42008-07-29 16:12:31 +0000195runxmlconf_SOURCES=runxmlconf.c
196runxmlconf_LDFLAGS =
197runxmlconf_DEPENDENCIES = $(DEPS)
198runxmlconf_LDADD= $(LDADDS)
199
Daniel Veillardde0a0a52003-04-24 17:12:57 +0000200#testOOM_SOURCES=testOOM.c testOOMlib.h testOOMlib.c
201#testOOM_LDFLAGS =
202#testOOM_DEPENDENCIES = $(DEPS)
203#testOOM_LDADD= $(LDADDS)
Daniel Veillarda76fe5c2003-04-24 16:06:47 +0000204
Daniel Veillard051d52c2008-07-29 16:44:59 +0000205runtests:
Daniel Richard G5706b6d2012-08-06 11:32:54 +0800206 [ -d test ] || $(LN_S) $(srcdir)/test .
207 [ -d result ] || $(LN_S) $(srcdir)/result .
Daniel Veillard4cc67bb2008-08-29 19:58:23 +0000208 $(CHECKER) ./runtest$(EXEEXT) && $(CHECKER) ./testrecurse$(EXEEXT) &&$(CHECKER) ./testapi$(EXEEXT) && $(CHECKER) ./testchar$(EXEEXT)&& $(CHECKER) ./testdict$(EXEEXT) && $(CHECKER) ./runxmlconf$(EXEEXT)
Daniel Richard G5706b6d2012-08-06 11:32:54 +0800209 @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \
210 $(MAKE) tests ; fi)
Daniel Veillard051d52c2008-07-29 16:44:59 +0000211
Daniel Veillard37334572008-07-31 08:20:02 +0000212check: all runtests
Raja R Harinatha86c23e1999-03-05 22:14:01 +0000213
Daniel Veillard73f94c62012-08-24 16:38:54 +0800214check-valgrind valgrind: all
Daniel Veillard0765ae82008-08-08 12:14:37 +0000215 @echo '## Running the regression tests under Valgrind'
216 @echo '## Go get a cup of coffee it is gonna take a while ...'
Daniel Veillard73f94c62012-08-24 16:38:54 +0800217 $(MAKE) CHECKER='valgrind -q' runtests
Daniel Veillard0765ae82008-08-08 12:14:37 +0000218
Daniel Veillardf09e7e32000-10-01 15:53:30 +0000219testall : tests SVGtests SAXtests
Daniel Veillard011b63c1999-06-02 17:44:04 +0000220
Daniel Richard G5706b6d2012-08-06 11:32:54 +0800221tests: XMLtests XMLenttests NStests IDtests Errtests APItests $(READER_TEST) $(TEST_SAX) $(TEST_PUSH) $(TEST_HTML) $(TEST_PHTML) $(TEST_VALID) URItests $(TEST_PATTERN) $(TEST_XPATH) $(TEST_XPTR) $(TEST_XINCLUDE) $(TEST_C14N) $(TEST_DEBUG) $(TEST_CATALOG) $(TEST_REGEXPS) $(TEST_SCHEMAS) $(TEST_SCHEMATRON) $(TEST_THREADS) Timingtests $(TEST_VTIME) $(PYTHON_TESTS) $(TEST_MODULES)
222 @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \
223 $(MAKE) tests ; fi)
224 @(cd doc/examples ; $(MAKE) tests)
Daniel Veillardb05deb71999-08-10 19:04:08 +0000225
Daniel Veillardd0cf7f62004-11-09 16:17:02 +0000226APItests: testapi$(EXEEXT)
227 @echo "## Running the API regression tests this may take a little while"
228 -@($(CHECKER) $(top_builddir)/testapi -q)
229
Daniel Veillard07be19b2002-02-08 14:20:35 +0000230HTMLtests : testHTML$(EXEEXT)
Daniel Veillard357c9602001-05-03 10:49:20 +0000231 @(echo > .memdump)
Daniel Veillardb05deb71999-08-10 19:04:08 +0000232 @echo "## HTML regression tests"
Daniel Veillard36065812002-01-24 15:02:46 +0000233 -@(for i in $(srcdir)/test/HTML/* ; do \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000234 name=`basename $$i`; \
Daniel Veillard82150d81999-07-07 07:32:15 +0000235 if [ ! -d $$i ] ; then \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000236 if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
237 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000238 $(CHECKER) $(top_builddir)/testHTML $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \
Daniel Veillard82150d81999-07-07 07:32:15 +0000239 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000240 log=`$(CHECKER) $(top_builddir)/testHTML $$i > result.$$name 2> error.$$name ; \
Daniel Veillard87b95392000-08-12 21:12:04 +0000241 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillardb05deb71999-08-10 19:04:08 +0000242 diff $(srcdir)/result/HTML/$$name result.$$name ; \
Daniel Veillard87b95392000-08-12 21:12:04 +0000243 diff -b $(srcdir)/result/HTML/$$name.err error.$$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000244 $(CHECKER) $(top_builddir)/testHTML result.$$name > result2.$$name 2>error.$$name ; \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000245 diff result.$$name result2.$$name` ; \
246 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000247 rm result.$$name result2.$$name error.$$name ; \
Daniel Veillard82150d81999-07-07 07:32:15 +0000248 fi ; fi ; done)
Daniel Veillard73b013f2003-09-30 12:36:01 +0000249
250HTMLPushtests : testHTML$(EXEEXT)
Daniel Veillard87b95392000-08-12 21:12:04 +0000251 @echo "## Push HTML regression tests"
Daniel Veillard36065812002-01-24 15:02:46 +0000252 -@(for i in $(srcdir)/test/HTML/* ; do \
Daniel Veillard87b95392000-08-12 21:12:04 +0000253 name=`basename $$i`; \
254 if [ ! -d $$i ] ; then \
255 if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
256 echo New test file $$name ; \
William M. Brackf20fbf72004-06-25 05:49:08 +0000257 $(CHECKER) $(top_builddir)/testHTML --push $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \
Daniel Veillard87b95392000-08-12 21:12:04 +0000258 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000259 log=`$(CHECKER) $(top_builddir)/testHTML --push $$i > result.$$name 2> error.$$name ; \
Daniel Veillard87b95392000-08-12 21:12:04 +0000260 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
261 diff $(srcdir)/result/HTML/$$name result.$$name ; \
262 cut -b 1-15 $(srcdir)/result/HTML/$$name.err > errorcut.$$name; \
263 cut -b 1-15 error.$$name > errorcut2.$$name; \
264 diff -b errorcut.$$name errorcut2.$$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000265 $(CHECKER) $(top_builddir)/testHTML --push result.$$name > result2.$$name 2>error.$$name ; \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000266 diff result.$$name result2.$$name` ; \
267 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillard87b95392000-08-12 21:12:04 +0000268 rm result.$$name result2.$$name error.$$name errorcut.$$name errorcut2.$$name ; \
269 fi ; fi ; done)
Daniel Veillard87b95392000-08-12 21:12:04 +0000270 @echo "## HTML SAX regression tests"
Daniel Veillard36065812002-01-24 15:02:46 +0000271 -@(for i in $(srcdir)/test/HTML/* ; do \
Daniel Veillard87b95392000-08-12 21:12:04 +0000272 name=`basename $$i`; \
273 if [ ! -d $$i ] ; then \
274 if [ ! -f $(srcdir)/result/HTML/$$name.sax ] ; then \
275 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000276 $(CHECKER) $(top_builddir)/testHTML --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \
Daniel Veillard87b95392000-08-12 21:12:04 +0000277 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000278 log=`$(CHECKER) $(top_builddir)/testHTML --sax $$i > result.$$name.sax ; \
Daniel Veillard87b95392000-08-12 21:12:04 +0000279 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000280 diff $(srcdir)/result/HTML/$$name.sax result.$$name.sax` ; \
281 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillard87b95392000-08-12 21:12:04 +0000282 rm result.$$name.sax ; \
283 fi ; fi ; done)
Daniel Veillard87b95392000-08-12 21:12:04 +0000284 @echo "## Push HTML SAX regression tests"
Daniel Veillard36065812002-01-24 15:02:46 +0000285 -@(for i in $(srcdir)/test/HTML/* ; do \
Daniel Veillard87b95392000-08-12 21:12:04 +0000286 name=`basename $$i`; \
287 if [ ! -d $$i ] ; then \
288 if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
289 echo New test file $$name ; \
William M. Brackf20fbf72004-06-25 05:49:08 +0000290 $(CHECKER) $(top_builddir)/testHTML --push --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \
Daniel Veillard87b95392000-08-12 21:12:04 +0000291 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000292 log=`$(CHECKER) $(top_builddir)/testHTML --push --sax $$i 2>&1 > result.$$name.sax ; \
Daniel Veillard87b95392000-08-12 21:12:04 +0000293 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000294 diff $(srcdir)/result/HTML/$$name.sax result.$$name.sax` ; \
295 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillard87b95392000-08-12 21:12:04 +0000296 rm result.$$name.sax ; \
297 fi ; fi ; done)
298
Daniel Veillard07be19b2002-02-08 14:20:35 +0000299XMLtests : xmllint$(EXEEXT)
Daniel Veillard357c9602001-05-03 10:49:20 +0000300 @(echo > .memdump)
Daniel Veillardb05deb71999-08-10 19:04:08 +0000301 @echo "## XML regression tests"
Daniel Veillard36065812002-01-24 15:02:46 +0000302 -@(for i in $(srcdir)/test/* ; do \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000303 name=`basename $$i`; \
Daniel Veillard01791d51998-07-24 19:24:09 +0000304 if [ ! -d $$i ] ; then \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000305 if [ ! -f $(srcdir)/result/$$name ] ; then \
306 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000307 $(CHECKER) $(top_builddir)/xmllint $$i > $(srcdir)/result/$$name ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000308 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard01791d51998-07-24 19:24:09 +0000309 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000310 log=`$(CHECKER) $(top_builddir)/xmllint $$i 2>&1 > result.$$name ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000311 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000312 diff $(srcdir)/result/$$name result.$$name ; \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000313 $(CHECKER) $(top_builddir)/xmllint result.$$name 2>&1 > result2.$$name | grep -v 'failed to load external entity' ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000314 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000315 diff result.$$name result2.$$name` ;\
316 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000317 rm result.$$name result2.$$name ; \
Daniel Veillard01791d51998-07-24 19:24:09 +0000318 fi ; fi ; done)
Daniel Veillard73b013f2003-09-30 12:36:01 +0000319 @echo "## XML regression tests on memory"
Daniel Veillard73b013f2003-09-30 12:36:01 +0000320 -@(for i in $(srcdir)/test/* ; do \
321 name=`basename $$i`; \
322 if [ ! -d $$i ] ; then \
323 if [ ! -f $(srcdir)/result/$$name ] ; then \
324 echo New test file $$name ; \
325 $(CHECKER) $(top_builddir)/xmllint --memory $$i > $(srcdir)/result/$$name ; \
326 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
327 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000328 log=`$(CHECKER) $(top_builddir)/xmllint --memory $$i 2>&1 > result.$$name ; \
Daniel Veillard73b013f2003-09-30 12:36:01 +0000329 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
330 diff $(srcdir)/result/$$name result.$$name ; \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000331 $(CHECKER) $(top_builddir)/xmllint --memory result.$$name 2>&1 > result2.$$name | grep -v 'failed to load external entity' ; \
332 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"`; \
333 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillard73b013f2003-09-30 12:36:01 +0000334 diff result.$$name result2.$$name ; \
335 rm result.$$name result2.$$name ; \
336 fi ; fi ; done)
337
338XMLPushtests: xmllint$(EXEEXT)
Daniel Veillard3e5bb8e2001-06-27 16:34:34 +0000339 @(echo > .memdump)
Daniel Veillard3e5bb8e2001-06-27 16:34:34 +0000340 @echo "## XML push regression tests"
Daniel Veillard36065812002-01-24 15:02:46 +0000341 -@(for i in $(srcdir)/test/* ; do \
Daniel Veillard3e5bb8e2001-06-27 16:34:34 +0000342 name=`basename $$i`; \
343 if [ ! -d $$i ] ; then \
344 if [ ! -f $(srcdir)/result/$$name ] ; then \
345 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000346 $(CHECKER) $(top_builddir)/xmllint --push $$i > $(srcdir)/result/$$name ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000347 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard3e5bb8e2001-06-27 16:34:34 +0000348 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000349 log=`$(CHECKER) $(top_builddir)/xmllint --push $$i 2>&1 > result.$$name ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000350 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard3e5bb8e2001-06-27 16:34:34 +0000351 diff $(srcdir)/result/$$name result.$$name ; \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000352 $(CHECKER) $(top_builddir)/xmllint --push result.$$name 2>&1 > result2.$$name | grep -v 'failed to load external entity' ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000353 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000354 diff result.$$name result2.$$name` ; \
355 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillard3e5bb8e2001-06-27 16:34:34 +0000356 rm result.$$name result2.$$name ; \
357 fi ; fi ; done)
Daniel Veillard01791d51998-07-24 19:24:09 +0000358
Daniel Veillard3b7840c2003-09-11 23:42:01 +0000359NStests : xmllint$(EXEEXT)
360 @(echo > .memdump)
Daniel Veillard3b7840c2003-09-11 23:42:01 +0000361 @echo "## XML Namespaces regression tests"
Daniel Veillard3b7840c2003-09-11 23:42:01 +0000362 -@(for i in $(srcdir)/test/namespaces/* ; do \
363 name=`basename $$i`; \
364 if [ ! -d $$i ] ; then \
365 if [ ! -f $(srcdir)/result/namespaces/$$name ] ; then \
366 echo New test file $$name ; \
367 $(CHECKER) $(top_builddir)/xmllint $$i \
368 2> $(srcdir)/result/namespaces/$$name.err \
369 > $(srcdir)/result/namespaces/$$name ; \
370 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
371 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000372 log=`$(CHECKER) $(top_builddir)/xmllint $$i 2> error.$$name > result.$$name ; \
Daniel Veillard3b7840c2003-09-11 23:42:01 +0000373 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
374 diff $(srcdir)/result/namespaces/$$name result.$$name ; \
Daniel Veillard03a53c32004-10-26 16:06:51 +0000375 diff $(srcdir)/result/namespaces/$$name.err error.$$name`; \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000376 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillard3b7840c2003-09-11 23:42:01 +0000377 rm result.$$name error.$$name ; \
378 fi ; fi ; done)
379
Daniel Veillard67f8b1c2004-04-09 21:51:49 +0000380IDtests : xmllint$(EXEEXT) testXPath$(EXEEXT)
381 @(echo > .memdump)
382 @echo "## xml:id regression tests"
383 -@(for i in $(srcdir)/test/xmlid/id_*.xml ; do \
384 name=`basename $$i`; \
385 if [ ! -d $$i ] ; then \
386 if [ ! -f $(srcdir)/result/xmlid/$$name ] ; then \
387 echo New test file $$name ; \
388 $(CHECKER) $(top_builddir)/testXPath -i $$i "id('bar')" \
389 2> $(srcdir)/result/xmlid/$$name.err \
390 > $(srcdir)/result/xmlid/$$name ; \
391 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
392 else \
393 log=`$(CHECKER) $(top_builddir)/testXPath -i $$i "id('bar')" 2> error.$$name > result.$$name ; \
394 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
395 diff $(srcdir)/result/xmlid/$$name result.$$name ; \
396 diff $(srcdir)/result/xmlid/$$name.err error.$$name` ; \
397 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
398 rm result.$$name error.$$name ; \
399 fi ; fi ; done)
400
Daniel Veillard522bc602004-02-21 11:53:09 +0000401Errtests : xmllint$(EXEEXT)
402 @(echo > .memdump)
403 @echo "## Error cases regression tests"
404 -@(for i in $(srcdir)/test/errors/*.xml ; do \
405 name=`basename $$i`; \
406 if [ ! -d $$i ] ; then \
407 if [ ! -f $(srcdir)/result/errors/$$name ] ; then \
408 echo New test file $$name ; \
409 $(CHECKER) $(top_builddir)/xmllint $$i \
410 2> $(srcdir)/result/errors/$$name.err \
411 > $(srcdir)/result/errors/$$name ; \
412 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
413 else \
414 log=`$(CHECKER) $(top_builddir)/xmllint $$i 2> error.$$name > result.$$name ; \
415 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
416 diff $(srcdir)/result/errors/$$name result.$$name ; \
417 diff $(srcdir)/result/errors/$$name.err error.$$name` ; \
418 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
419 rm result.$$name error.$$name ; \
420 fi ; fi ; done)
421 @echo "## Error cases stream regression tests"
422 -@(for i in $(srcdir)/test/errors/*.xml ; do \
423 name=`basename $$i`; \
424 if [ ! -d $$i ] ; then \
425 if [ ! -f $(srcdir)/result/errors/$$name.str ] ; then \
426 echo New test file $$name ; \
Daniel Veillard4a14fb82004-06-14 19:58:20 +0000427 $(CHECKER) $(top_builddir)/xmllint --stream $$i \
Daniel Veillard522bc602004-02-21 11:53:09 +0000428 2> $(srcdir)/result/errors/$$name.str \
Daniel Veillardb8590d42005-01-21 15:10:23 +0000429 > /dev/null ; \
Daniel Veillard522bc602004-02-21 11:53:09 +0000430 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
431 else \
Daniel Veillardb8590d42005-01-21 15:10:23 +0000432 log=`$(CHECKER) $(top_builddir)/xmllint --stream $$i 2> error.$$name > /dev/null ; \
Daniel Veillard522bc602004-02-21 11:53:09 +0000433 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard522bc602004-02-21 11:53:09 +0000434 diff $(srcdir)/result/errors/$$name.str error.$$name` ; \
435 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillardb8590d42005-01-21 15:10:23 +0000436 rm error.$$name ; \
Daniel Veillard522bc602004-02-21 11:53:09 +0000437 fi ; fi ; done)
438
Daniel Veillard07be19b2002-02-08 14:20:35 +0000439Docbtests : xmllint$(EXEEXT)
Daniel Veillard89cad532001-10-22 09:46:13 +0000440
Daniel Veillard07be19b2002-02-08 14:20:35 +0000441XMLenttests : xmllint$(EXEEXT)
Daniel Veillard357c9602001-05-03 10:49:20 +0000442 @(echo > .memdump)
Daniel Veillardb05deb71999-08-10 19:04:08 +0000443 @echo "## XML entity subst regression tests"
Daniel Veillard36065812002-01-24 15:02:46 +0000444 -@(for i in $(srcdir)/test/* ; do \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000445 name=`basename $$i`; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000446 if [ ! -d $$i ] ; then \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000447 if [ ! -f $(srcdir)/result/noent/$$name ] ; then \
448 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000449 $(CHECKER) $(top_builddir)/xmllint --noent $$i > $(srcdir)/result/noent/$$name ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000450 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000451 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000452 log=`$(CHECKER) $(top_builddir)/xmllint --noent $$i 2>&1 > result.$$name ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000453 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000454 diff $(srcdir)/result/noent/$$name result.$$name ; \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000455 $(CHECKER) $(top_builddir)/xmllint --noent result.$$name 2>&1 > result2.$$name ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000456 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000457 diff result.$$name result2.$$name` ; \
458 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000459 rm result.$$name result2.$$name ; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000460 fi ; fi ; done)
461
Daniel Veillard07be19b2002-02-08 14:20:35 +0000462URItests : testURI$(EXEEXT)
Daniel Veillard357c9602001-05-03 10:49:20 +0000463 @(echo > .memdump)
Daniel Veillard98a79162000-09-04 11:15:39 +0000464 @echo "## URI module regression tests"
Daniel Veillard36065812002-01-24 15:02:46 +0000465 -@(for i in $(srcdir)/test/URI/*.data ; do \
Daniel Veillard98a79162000-09-04 11:15:39 +0000466 name=`basename $$i`; \
467 if [ ! -d $$i ] ; then \
468 if [ ! -f $(srcdir)/result/URI/$$name ] ; then \
469 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000470 $(CHECKER) $(top_builddir)/testURI -base 'http://foo.com/path/to/index.html?orig#help' < $$i > $(srcdir)/result/URI/$$name ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000471 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard98a79162000-09-04 11:15:39 +0000472 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000473 log=`$(CHECKER) $(top_builddir)/testURI -base 'http://foo.com/path/to/index.html?orig#help' < $$i 2>&1 > result.$$name ; \
Daniel Veillard98a79162000-09-04 11:15:39 +0000474 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000475 diff $(srcdir)/result/URI/$$name result.$$name` ; \
476 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillard98a79162000-09-04 11:15:39 +0000477 rm result.$$name ; \
478 fi ; fi ; done)
Daniel Veillard36065812002-01-24 15:02:46 +0000479 -@(for i in $(srcdir)/test/URI/*.uri ; do \
Daniel Veillardb6e7fdb2001-02-02 17:07:32 +0000480 name=`basename $$i`; \
481 if [ ! -d $$i ] ; then \
482 if [ ! -f $(srcdir)/result/URI/$$name ] ; then \
483 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000484 $(CHECKER) $(top_builddir)/testURI < $$i > $(srcdir)/result/URI/$$name ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000485 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillardb6e7fdb2001-02-02 17:07:32 +0000486 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000487 log=`$(CHECKER) $(top_builddir)/testURI < $$i 2>&1 > result.$$name ; \
Daniel Veillardb6e7fdb2001-02-02 17:07:32 +0000488 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000489 diff $(srcdir)/result/URI/$$name result.$$name` ; \
490 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillardb6e7fdb2001-02-02 17:07:32 +0000491 rm result.$$name ; \
492 fi ; fi ; done)
Daniel Veillard98a79162000-09-04 11:15:39 +0000493
Daniel Veillard07be19b2002-02-08 14:20:35 +0000494XPathtests : testXPath$(EXEEXT)
Daniel Veillard357c9602001-05-03 10:49:20 +0000495 @(echo > .memdump)
Daniel Veillardb05deb71999-08-10 19:04:08 +0000496 @echo "## XPath regression tests"
Daniel Veillard36065812002-01-24 15:02:46 +0000497 -@(if [ "`$(top_builddir)/testXPath | grep 'support not compiled in'`" != "" ] ; \
Daniel Veillard017b1082001-06-21 11:20:21 +0000498 then echo Skipping debug not compiled in ; exit 0 ; fi ; \
499 for i in $(srcdir)/test/XPath/expr/* ; do \
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000500 name=`basename $$i`; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000501 if [ ! -d $$i ] ; then \
502 if [ ! -f $(srcdir)/result/XPath/expr/$$name ] ; then \
503 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000504 $(CHECKER) $(top_builddir)/testXPath -f --expr $$i > $(srcdir)/result/XPath/expr/$$name ; \
Daniel Veillard9e7160d2001-03-18 23:17:47 +0000505 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000506 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000507 log=`$(CHECKER) $(top_builddir)/testXPath -f --expr $$i 2>&1 > result.$$name ; \
Daniel Veillard9e7160d2001-03-18 23:17:47 +0000508 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000509 diff $(srcdir)/result/XPath/expr/$$name result.$$name` ; \
510 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000511 rm result.$$name ; \
Daniel Veillard017b1082001-06-21 11:20:21 +0000512 fi ; fi ; done ; \
513 for i in $(srcdir)/test/XPath/docs/* ; do \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000514 if [ ! -d $$i ] ; then \
515 doc=`basename $$i`; \
516 for j in $(srcdir)/test/XPath/tests/$$doc* ; do \
Daniel Veillardc8df0aa2000-10-10 23:50:30 +0000517 if [ ! -f $$j ] ; then continue ; fi ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000518 name=`basename $$j`; \
519 if [ ! -d $$j ] ; then \
520 if [ ! -f $(srcdir)/result/XPath/tests/$$name ] ; then \
521 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000522 $(CHECKER) $(top_builddir)/testXPath -f -i $$i $$j > $(srcdir)/result/XPath/tests/$$name ; \
Daniel Veillard9e7160d2001-03-18 23:17:47 +0000523 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillardb05deb71999-08-10 19:04:08 +0000524 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000525 log=`$(CHECKER) $(top_builddir)/testXPath -f -i $$i $$j 2>&1 > result.$$name ; \
Daniel Veillard9e7160d2001-03-18 23:17:47 +0000526 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000527 diff $(srcdir)/result/XPath/tests/$$name result.$$name` ; \
528 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000529 rm result.$$name ; \
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000530 fi ; fi ; done ; fi ; done)
531
Daniel Veillard07be19b2002-02-08 14:20:35 +0000532XPtrtests : testXPath$(EXEEXT)
Daniel Veillard357c9602001-05-03 10:49:20 +0000533 @(echo > .memdump)
Daniel Veillardc8df0aa2000-10-10 23:50:30 +0000534 @echo "## XPointer regression tests"
Daniel Veillard36065812002-01-24 15:02:46 +0000535 -@(if [ "`$(top_builddir)/testXPath | grep 'support not compiled in'`" != "" ] ; \
Daniel Veillard017b1082001-06-21 11:20:21 +0000536 then echo Skipping debug not compiled in ; exit 0 ; fi ; \
537 for i in $(srcdir)/test/XPath/docs/* ; do \
Daniel Veillardc8df0aa2000-10-10 23:50:30 +0000538 if [ ! -d $$i ] ; then \
539 doc=`basename $$i`; \
540 for j in $(srcdir)/test/XPath/xptr/$$doc* ; do \
541 if [ ! -f $$j ] ; then continue ; fi ; \
542 name=`basename $$j`; \
543 if [ ! -d $$j ] ; then \
544 if [ ! -f $(srcdir)/result/XPath/xptr/$$name ] ; then \
545 echo New test file $$name ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000546 $(CHECKER) $(top_builddir)/testXPath -xptr -f -i $$i $$j > $(srcdir)/result/XPath/xptr/$$name ; \
547 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillardc8df0aa2000-10-10 23:50:30 +0000548 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000549 log=`$(CHECKER) $(top_builddir)/testXPath -xptr -f -i $$i $$j 2>&1 > result.$$name ; \
Daniel Veillardc8df0aa2000-10-10 23:50:30 +0000550 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000551 diff $(srcdir)/result/XPath/xptr/$$name result.$$name` ; \
552 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillardc8df0aa2000-10-10 23:50:30 +0000553 rm result.$$name ; \
554 fi ; fi ; done ; fi ; done)
555
Daniel Veillard07be19b2002-02-08 14:20:35 +0000556XIncludetests : xmllint$(EXEEXT)
Daniel Veillard357c9602001-05-03 10:49:20 +0000557 @(echo > .memdump)
Daniel Veillardbf432752000-11-12 15:56:56 +0000558 @echo "## XInclude regression tests"
Daniel Veillard36065812002-01-24 15:02:46 +0000559 -@(for i in $(srcdir)/test/XInclude/docs/* ; do \
Daniel Veillardbf432752000-11-12 15:56:56 +0000560 name=`basename $$i`; \
561 if [ ! -d $$i ] ; then \
562 if [ ! -f $(srcdir)/result/XInclude/$$name ] ; then \
563 echo New test file $$name ; \
Daniel Veillarde74d2e12003-12-09 11:35:37 +0000564 $(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude $$i > $(srcdir)/result/XInclude/$$name 2> $(srcdir)/result/XInclude/$$name.err ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000565 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillardbf432752000-11-12 15:56:56 +0000566 else \
Daniel Veillard1f8658a2004-08-14 21:46:31 +0000567 log=`$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude $$i > result.$$name 2>error.$$name ; \
Daniel Veillardbf432752000-11-12 15:56:56 +0000568 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillarde74d2e12003-12-09 11:35:37 +0000569 diff $(srcdir)/result/XInclude/$$name result.$$name ; \
570 diff $(srcdir)/result/XInclude/$$name.err error.$$name` ; \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000571 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillarde74d2e12003-12-09 11:35:37 +0000572 rm result.$$name error.$$name ; \
Daniel Veillardbf432752000-11-12 15:56:56 +0000573 fi ; fi ; done)
Daniel Veillardc14c3892004-08-16 12:34:50 +0000574 -@(for i in $(srcdir)/test/XInclude/docs/* ; do \
575 name=`basename $$i`; \
576 if [ ! -d $$i ] ; then \
577 if [ ! -f $(srcdir)/result/XInclude/$$name ] ; then \
578 echo New test file $$name ; \
579 $(CHECKER) $(top_builddir)/xmllint --nowarning --noxincludenode $$i > $(srcdir)/result/XInclude/$$name 2> $(srcdir)/result/XInclude/$$name.err ; \
580 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
581 else \
582 log=`$(CHECKER) $(top_builddir)/xmllint --nowarning --noxincludenode $$i > result.$$name 2>error.$$name ; \
583 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
584 diff $(srcdir)/result/XInclude/$$name result.$$name ; \
585 diff $(srcdir)/result/XInclude/$$name.err error.$$name` ; \
586 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
587 rm result.$$name error.$$name ; \
588 fi ; fi ; done)
Daniel Veillard7899c5c2003-11-03 12:31:38 +0000589 @(echo > .memdump)
590 @echo "## XInclude xmlReader regression tests"
591 -@(for i in $(srcdir)/test/XInclude/docs/* ; do \
592 name=`basename $$i`; \
593 if [ ! -d $$i ] ; then \
594 if [ ! -f $(srcdir)/result/XInclude/$$name.rdr ] ; then \
595 echo New test file $$name ; \
William M. Brackf20fbf72004-06-25 05:49:08 +0000596 $(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --stream --debug $$i > $(srcdir)/result/XInclude/$$name.rdr ; \
Daniel Veillard7899c5c2003-11-03 12:31:38 +0000597 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
598 else \
Daniel Veillard1f8658a2004-08-14 21:46:31 +0000599 log=`$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --stream --debug $$i > result.$$name 2>error.$$name ; \
Daniel Veillard7899c5c2003-11-03 12:31:38 +0000600 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillarde74d2e12003-12-09 11:35:37 +0000601 diff $(srcdir)/result/XInclude/$$name.err error.$$name ; \
Daniel Veillard7899c5c2003-11-03 12:31:38 +0000602 diff $(srcdir)/result/XInclude/$$name.rdr result.$$name` ; \
603 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillarde74d2e12003-12-09 11:35:37 +0000604 rm result.$$name error.$$name ; \
Daniel Veillard7899c5c2003-11-03 12:31:38 +0000605 fi ; fi ; done)
Daniel Veillardc14c3892004-08-16 12:34:50 +0000606 -@(for i in $(srcdir)/test/XInclude/docs/* ; do \
607 name=`basename $$i`; \
608 if [ ! -d $$i ] ; then \
609 if [ ! -f $(srcdir)/result/XInclude/$$name.rdr ] ; then \
610 echo New test file $$name ; \
611 $(CHECKER) $(top_builddir)/xmllint --nowarning --noxincludenode --stream --debug $$i > $(srcdir)/result/XInclude/$$name.rdr ; \
612 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
613 else \
614 log=`$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --stream --debug $$i > result.$$name 2>error.$$name ; \
615 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
616 diff $(srcdir)/result/XInclude/$$name.err error.$$name ; \
617 diff $(srcdir)/result/XInclude/$$name.rdr result.$$name` ; \
618 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
619 rm result.$$name error.$$name ; \
620 fi ; fi ; done)
Daniel Veillardbf432752000-11-12 15:56:56 +0000621
Daniel Veillard07be19b2002-02-08 14:20:35 +0000622Scripttests : xmllint$(EXEEXT)
Daniel Veillardb8c9be92001-07-09 16:01:19 +0000623 @(echo > .memdump)
Daniel Veillardb8c9be92001-07-09 16:01:19 +0000624 @echo "## Scripts regression tests"
625 @echo "## Some of the base computations may be different if srcdir != ."
Daniel Veillard36065812002-01-24 15:02:46 +0000626 -@(for i in $(srcdir)/test/scripts/*.script ; do \
Daniel Veillardb8c9be92001-07-09 16:01:19 +0000627 name=`basename $$i .script`; \
628 xml=$(srcdir)/test/scripts/`basename $$i .script`.xml; \
629 if [ -f $$xml ] ; then \
630 if [ ! -f $(srcdir)/result/scripts/$$name ] ; then \
631 echo New test file $$name ; \
Daniel Veillard29b17482004-08-16 00:39:03 +0000632 $(CHECKER) $(top_builddir)/xmllint --shell $$xml < $$i > $(srcdir)/result/scripts/$$name 2> $(srcdir)/result/scripts/$$name.err ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000633 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillardb8c9be92001-07-09 16:01:19 +0000634 else \
Daniel Veillard29b17482004-08-16 00:39:03 +0000635 log=`$(CHECKER) $(top_builddir)/xmllint --shell $$xml < $$i > result.$$name 2> result.$$name.err ; \
Daniel Veillardb8c9be92001-07-09 16:01:19 +0000636 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard29b17482004-08-16 00:39:03 +0000637 diff $(srcdir)/result/scripts/$$name result.$$name ; \
638 diff $(srcdir)/result/scripts/$$name.err result.$$name.err` ; \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000639 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillard29b17482004-08-16 00:39:03 +0000640 rm result.$$name result.$$name.err ; \
Daniel Veillardb8c9be92001-07-09 16:01:19 +0000641 fi ; fi ; done)
642
Daniel Veillard07be19b2002-02-08 14:20:35 +0000643Catatests : xmlcatalog$(EXEEXT)
Daniel Veillardcda96922001-08-21 10:56:31 +0000644 @(echo > .memdump)
Daniel Veillardcda96922001-08-21 10:56:31 +0000645 @echo "## Catalog regression tests"
Daniel Veillard36065812002-01-24 15:02:46 +0000646 -@(for i in $(srcdir)/test/catalogs/*.script ; do \
Daniel Veillardcda96922001-08-21 10:56:31 +0000647 name=`basename $$i .script`; \
648 xml=$(srcdir)/test/catalogs/`basename $$i .script`.xml; \
649 if [ -f $$xml ] ; then \
650 if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \
651 echo New test file $$name ; \
William M. Brackf20fbf72004-06-25 05:49:08 +0000652 $(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > $(srcdir)/result/catalogs/$$name ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000653 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillardcda96922001-08-21 10:56:31 +0000654 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000655 log=`$(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > result.$$name ; \
Daniel Veillardcda96922001-08-21 10:56:31 +0000656 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000657 diff $(srcdir)/result/catalogs/$$name result.$$name` ; \
658 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillardcda96922001-08-21 10:56:31 +0000659 rm result.$$name ; \
660 fi ; fi ; done)
Daniel Veillard36065812002-01-24 15:02:46 +0000661 -@(for i in $(srcdir)/test/catalogs/*.script ; do \
Daniel Veillardc853b322001-11-06 15:24:37 +0000662 name=`basename $$i .script`; \
663 sgml=$(srcdir)/test/catalogs/`basename $$i .script`.sgml; \
664 if [ -f $$sgml ] ; then \
665 if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \
666 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000667 $(CHECKER) $(top_builddir)/xmlcatalog --shell $$sgml < $$i > $(srcdir)/result/catalogs/$$name ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000668 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillardc853b322001-11-06 15:24:37 +0000669 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000670 log=`$(CHECKER) $(top_builddir)/xmlcatalog --shell $$sgml < $$i > result.$$name ; \
Daniel Veillardc853b322001-11-06 15:24:37 +0000671 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000672 diff $(srcdir)/result/catalogs/$$name result.$$name` ; \
673 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillardc853b322001-11-06 15:24:37 +0000674 rm result.$$name ; \
675 fi ; fi ; done)
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000676 @echo "## Add and del operations on XML Catalogs"
Daniel Veillard66651aa2002-11-15 11:21:43 +0000677 -@($(CHECKER) $(top_builddir)/xmlcatalog --create --noout $(srcdir)/result/catalogs/mycatalog; \
Daniel Veillardc853b322001-11-06 15:24:37 +0000678 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard66651aa2002-11-15 11:21:43 +0000679 $(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid sysid $(srcdir)/result/catalogs/mycatalog; \
Daniel Veillardc853b322001-11-06 15:24:37 +0000680 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard66651aa2002-11-15 11:21:43 +0000681 $(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid2 sysid2 $(srcdir)/result/catalogs/mycatalog; \
Daniel Veillardc853b322001-11-06 15:24:37 +0000682 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard66651aa2002-11-15 11:21:43 +0000683 $(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid3 sysid3 $(srcdir)/result/catalogs/mycatalog; \
Daniel Veillardc853b322001-11-06 15:24:37 +0000684 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard66651aa2002-11-15 11:21:43 +0000685 diff result/catalogs/mycatalog.full $(srcdir)/result/catalogs/mycatalog; \
Daniel Veillardc853b322001-11-06 15:24:37 +0000686 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard66651aa2002-11-15 11:21:43 +0000687 $(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid $(srcdir)/result/catalogs/mycatalog; \
Daniel Veillardc853b322001-11-06 15:24:37 +0000688 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard66651aa2002-11-15 11:21:43 +0000689 $(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid3 $(srcdir)/result/catalogs/mycatalog; \
Daniel Veillardc853b322001-11-06 15:24:37 +0000690 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard66651aa2002-11-15 11:21:43 +0000691 $(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid2 $(srcdir)/result/catalogs/mycatalog; \
Daniel Veillardc853b322001-11-06 15:24:37 +0000692 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard66651aa2002-11-15 11:21:43 +0000693 diff result/catalogs/mycatalog.empty $(srcdir)/result/catalogs/mycatalog; \
Daniel Veillardc853b322001-11-06 15:24:37 +0000694 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard66651aa2002-11-15 11:21:43 +0000695 rm -f $(srcdir)/result/catalogs/mycatalog)
Daniel Veillardcda96922001-08-21 10:56:31 +0000696
Daniel Veillard07be19b2002-02-08 14:20:35 +0000697SVGtests : xmllint$(EXEEXT)
Daniel Veillardb05deb71999-08-10 19:04:08 +0000698 @echo "## SVG parsing regression tests"
Daniel Veillard36065812002-01-24 15:02:46 +0000699 -@(for i in $(srcdir)/test/SVG/* ; do \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000700 name=`basename $$i`; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000701 if [ ! -d $$i ] ; then \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000702 if [ ! -f $(srcdir)/result/SVG/$$name ] ; then \
703 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000704 $(CHECKER) $(top_builddir)/xmllint $$i > $(srcdir)/result/SVG/$$name ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000705 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard011b63c1999-06-02 17:44:04 +0000706 else \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000707 echo Testing $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000708 $(CHECKER) $(top_builddir)/xmllint $$i > result.$$name ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000709 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillardb05deb71999-08-10 19:04:08 +0000710 diff $(srcdir)/result/SVG/$$name result.$$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000711 $(CHECKER) $(top_builddir)/xmllint result.$$name > result2.$$name ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000712 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillardb05deb71999-08-10 19:04:08 +0000713 diff result.$$name result2.$$name ; \
714 rm result.$$name result2.$$name ; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000715 fi ; fi ; done)
716
Daniel Veillard07be19b2002-02-08 14:20:35 +0000717Threadtests : testThreads$(EXEEXT)
Daniel Veillardab7488e2001-10-17 11:30:37 +0000718 @echo "## Threaded regression tests"
Daniel Veillardbb5abab2003-10-03 22:21:51 +0000719 -@($(CHECKER) $(top_builddir)/testThreads ; \
720 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
721 exit 0)
Daniel Veillardab7488e2001-10-17 11:30:37 +0000722
Daniel Veillard81514ba2003-09-16 23:17:26 +0000723Readertests : xmllint$(EXEEXT)
Daniel Veillard8a44e592003-09-15 14:50:06 +0000724 @(echo > .memdump)
Daniel Veillard8a44e592003-09-15 14:50:06 +0000725 @echo "## Reader regression tests"
Daniel Veillard8a44e592003-09-15 14:50:06 +0000726 -@(for i in $(srcdir)/test/* ; do \
727 name=`basename $$i`; \
728 if [ ! -d $$i ] ; then \
729 if [ ! -f $(srcdir)/result/$$name.rdr ] ; then \
730 echo New test file $$name ; \
731 $(CHECKER) $(top_builddir)/xmllint --nonet --debug --stream $$i > $(srcdir)/result/$$name.rdr 2>/dev/null ; \
732 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
733 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000734 log=`$(CHECKER) $(top_builddir)/xmllint --nonet --debug --stream $$i > result.$$name 2>/dev/null ; \
Daniel Veillard8a44e592003-09-15 14:50:06 +0000735 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000736 diff $(srcdir)/result/$$name.rdr result.$$name` ; \
737 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillard8a44e592003-09-15 14:50:06 +0000738 rm result.$$name ; \
739 fi ; fi ; done)
Daniel Veillard53350552003-09-18 13:35:51 +0000740 @echo "## Reader on memory regression tests"
Daniel Veillard53350552003-09-18 13:35:51 +0000741 -@(for i in $(srcdir)/test/* ; do \
742 name=`basename $$i`; \
743 if [ ! -d $$i ] ; then \
744 if [ ! -f $(srcdir)/result/$$name.rdr ] ; then \
745 echo New test file $$name ; \
746 $(CHECKER) $(top_builddir)/xmllint --memory --nonet --debug --stream $$i > $(srcdir)/result/$$name.rdr 2>/dev/null ; \
747 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
748 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000749 log=`$(CHECKER) $(top_builddir)/xmllint --memory --nonet --debug --stream $$i > result.$$name 2>/dev/null ; \
Daniel Veillard53350552003-09-18 13:35:51 +0000750 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000751 diff $(srcdir)/result/$$name.rdr result.$$name` ; \
752 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillard53350552003-09-18 13:35:51 +0000753 rm result.$$name ; \
754 fi ; fi ; done)
Daniel Veillard7899c5c2003-11-03 12:31:38 +0000755 @(echo > .memdump)
756 @echo "## Walker regression tests"
757 -@(for i in $(srcdir)/test/* ; do \
758 name=`basename $$i`; \
759 if [ ! -d $$i ] ; then \
760 if [ ! -f $(srcdir)/result/$$name.rdr ] ; then \
761 echo New test file $$name ; \
762 $(CHECKER) $(top_builddir)/xmllint --nonet --debug --walker $$i > $(srcdir)/result/$$name.rdr 2>/dev/null ; \
763 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
764 else \
765 log=`$(CHECKER) $(top_builddir)/xmllint --nonet --debug --walker $$i > result.$$name 2>/dev/null ; \
766 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
767 diff $(srcdir)/result/$$name.rdr result.$$name` ; \
768 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
769 rm result.$$name ; \
770 fi ; fi ; done)
Daniel Veillard0df3bc32004-06-08 12:03:41 +0000771 @echo "## Reader entities substitution regression tests"
772 -@(for i in $(srcdir)/test/* ; do \
773 name=`basename $$i`; \
774 if [ ! -d $$i ] ; then \
775 if [ ! -f $(srcdir)/result/$$name.rde ] ; then \
776 echo New test file $$name ; \
777 $(CHECKER) $(top_builddir)/xmllint --noent --nonet --debug --stream $$i > $(srcdir)/result/$$name.rde 2>/dev/null ; \
778 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
779 else \
780 log=`$(CHECKER) $(top_builddir)/xmllint --noent --nonet --debug --stream $$i > result.$$name 2>/dev/null ; \
781 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
782 diff $(srcdir)/result/$$name.rde result.$$name` ; \
783 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
784 rm result.$$name ; \
785 fi ; fi ; done)
786
Daniel Veillard07be19b2002-02-08 14:20:35 +0000787SAXtests : testSAX$(EXEEXT)
Daniel Veillard357c9602001-05-03 10:49:20 +0000788 @(echo > .memdump)
Daniel Veillard4a5a9642005-06-27 10:40:55 +0000789 @echo "## SAX1 callbacks regression tests"
Daniel Veillard36065812002-01-24 15:02:46 +0000790 -@(for i in $(srcdir)/test/* ; do \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000791 name=`basename $$i`; \
792 if [ ! -d $$i ] ; then \
Daniel Veillard4b1577f2003-09-03 13:10:37 +0000793 if [ ! -f $(srcdir)/result/$$name.sax ] ; then \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000794 echo New test file $$name ; \
Daniel Veillardf403d292003-10-05 13:51:35 +0000795 $(CHECKER) $(top_builddir)/testSAX $$i > $(srcdir)/result/$$name.sax 2> /dev/null ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000796 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillardb05deb71999-08-10 19:04:08 +0000797 else \
Daniel Veillardf403d292003-10-05 13:51:35 +0000798 log=`$(CHECKER) $(top_builddir)/testSAX $$i > result.$$name 2> /dev/null ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000799 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000800 diff $(srcdir)/result/$$name.sax result.$$name` ; \
801 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000802 rm result.$$name ; \
803 fi ; fi ; done)
Daniel Veillard4a5a9642005-06-27 10:40:55 +0000804 @echo "## SAX2 callbacks regression tests"
805 -@(for i in $(srcdir)/test/* ; do \
806 name=`basename $$i`; \
807 if [ ! -d $$i ] ; then \
808 if [ ! -f $(srcdir)/result/$$name.sax2 ] ; then \
809 echo New test file $$name ; \
810 $(CHECKER) $(top_builddir)/testSAX --sax2 $$i > $(srcdir)/result/$$name.sax2 2> /dev/null ; \
811 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
812 else \
813 log=`$(CHECKER) $(top_builddir)/testSAX --sax2 $$i > result.$$name 2> /dev/null ; \
814 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
815 diff $(srcdir)/result/$$name.sax2 result.$$name` ; \
816 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
817 rm result.$$name ; \
818 fi ; fi ; done)
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000819
Daniel Veillard07be19b2002-02-08 14:20:35 +0000820Validtests : xmllint$(EXEEXT)
Daniel Veillard357c9602001-05-03 10:49:20 +0000821 @(echo > .memdump)
Daniel Veillarddab4cb32001-04-20 13:03:48 +0000822 @echo "## Valid documents regression tests"
Daniel Veillard36065812002-01-24 15:02:46 +0000823 -@(for i in $(srcdir)/test/VCM/* ; do \
Daniel Veillarddab4cb32001-04-20 13:03:48 +0000824 name=`basename $$i`; \
825 if [ ! -d $$i ] ; then \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000826 log=`$(CHECKER) $(top_builddir)/xmllint --valid --noout --nowarning $$i ; \
827 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"`;\
828 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillarddab4cb32001-04-20 13:03:48 +0000829 fi ; done ; exit 0)
Daniel Veillardb05deb71999-08-10 19:04:08 +0000830 @echo "## Validity checking regression tests"
Daniel Veillard36065812002-01-24 15:02:46 +0000831 -@(for i in $(srcdir)/test/VC/* ; do \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000832 name=`basename $$i`; \
833 if [ ! -d $$i ] ; then \
834 if [ ! -f $(srcdir)/result/VC/$$name ] ; then \
835 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000836 $(CHECKER) $(top_builddir)/xmllint --noout --valid $$i 2> $(srcdir)/result/VC/$$name ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000837 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillardb05deb71999-08-10 19:04:08 +0000838 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000839 log=`$(CHECKER) $(top_builddir)/xmllint --noout --valid $$i 2> result.$$name ; \
Daniel Veillarddab4cb32001-04-20 13:03:48 +0000840 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000841 diff $(srcdir)/result/VC/$$name result.$$name` ; \
842 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000843 rm result.$$name ; \
844 fi ; fi ; done)
Daniel Veillarddab4cb32001-04-20 13:03:48 +0000845 @echo "## General documents valid regression tests"
Daniel Veillard36065812002-01-24 15:02:46 +0000846 -@(for i in $(srcdir)/test/valid/* ; do \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000847 name=`basename $$i`; \
848 if [ ! -d $$i ] ; then \
849 if [ ! -f $(srcdir)/result/valid/$$name ] ; then \
850 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000851 $(CHECKER) $(top_builddir)/xmllint --valid $$i > $(srcdir)/result/valid/$$name 2>$(srcdir)/result/valid/$$name.err ; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000852 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillardb05deb71999-08-10 19:04:08 +0000853 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000854 log=`$(CHECKER) $(top_builddir)/xmllint --valid $$i > result.$$name 2>error.$$name ; \
Daniel Veillarddab4cb32001-04-20 13:03:48 +0000855 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillardb05deb71999-08-10 19:04:08 +0000856 diff $(srcdir)/result/valid/$$name result.$$name ; \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000857 diff $(srcdir)/result/valid/$$name.err error.$$name` ; \
858 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillard35008381999-10-25 13:15:52 +0000859 rm result.$$name error.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000860 fi ; fi ; done)
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000861
Daniel Veillard4255d502002-04-16 15:50:10 +0000862Regexptests: testRegexp$(EXEEXT)
863 @(echo > .memdump)
Daniel Veillard4255d502002-04-16 15:50:10 +0000864 @echo "## Regexp regression tests"
Daniel Veillard4255d502002-04-16 15:50:10 +0000865 -@(for i in $(srcdir)/test/regexp/* ; do \
866 name=`basename $$i`; \
867 if [ ! -d $$i ] ; then \
868 if [ ! -f $(srcdir)/result/regexp/$$name ] ; then \
869 echo New test file $$name ; \
870 $(CHECKER) $(top_builddir)/testRegexp -i $$i > $(srcdir)/result/regexp/$$name; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000871 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard4255d502002-04-16 15:50:10 +0000872 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000873 log=`$(CHECKER) $(top_builddir)/testRegexp -i $$i 2>&1 > result.$$name ; \
Daniel Veillard4255d502002-04-16 15:50:10 +0000874 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000875 diff $(srcdir)/result/regexp/$$name result.$$name` ; \
876 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillard4255d502002-04-16 15:50:10 +0000877 rm result.$$name ; \
878 fi ; fi ; done)
Daniel Veillard355a0232005-08-22 12:58:05 +0000879 @echo "## Formal expresssions regression tests"
880 -@(for i in $(srcdir)/test/expr/* ; do \
881 name=`basename $$i`; \
882 if [ ! -d $$i ] ; then \
883 if [ ! -f $(srcdir)/result/expr/$$name ] ; then \
884 echo New test file $$name ; \
885 $(CHECKER) $(top_builddir)/testRegexp --expr -i $$i > $(srcdir)/result/expr/$$name; \
886 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
887 else \
888 log=`$(CHECKER) $(top_builddir)/testRegexp --expr -i $$i 2>&1 > result.$$name ; \
889 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
890 diff $(srcdir)/result/expr/$$name result.$$name` ; \
891 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
892 rm result.$$name ; \
893 fi ; fi ; done)
Daniel Veillard4255d502002-04-16 15:50:10 +0000894
895Automatatests: testAutomata$(EXEEXT)
896 @(echo > .memdump)
Daniel Veillard4255d502002-04-16 15:50:10 +0000897 @echo "## Automata regression tests"
Daniel Veillard4255d502002-04-16 15:50:10 +0000898 -@(for i in $(srcdir)/test/automata/* ; do \
899 name=`basename $$i`; \
900 if [ ! -d $$i ] ; then \
901 if [ ! -f $(srcdir)/result/automata/$$name ] ; then \
902 echo New test file $$name ; \
903 $(CHECKER) $(top_builddir)/testAutomata $$i > $(srcdir)/result/automata/$$name; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000904 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard4255d502002-04-16 15:50:10 +0000905 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000906 log=`$(CHECKER) $(top_builddir)/testAutomata $$i 2>&1 > result.$$name ; \
Daniel Veillard4255d502002-04-16 15:50:10 +0000907 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000908 diff $(srcdir)/result/automata/$$name result.$$name` ; \
909 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
Daniel Veillard4255d502002-04-16 15:50:10 +0000910 rm result.$$name ; \
911 fi ; fi ; done)
912
Daniel Veillard9ebb6322008-01-11 07:19:24 +0000913dba100000.xml: dbgenattr.pl
Daniel Veillardf6bc7c22003-09-17 22:33:22 +0000914 @echo "## generating dba100000.xml"
Daniel Veillard9ebb6322008-01-11 07:19:24 +0000915 @($(PERL) $(top_srcdir)/dbgenattr.pl 100000 > dba100000.xml)
Daniel Veillardf6bc7c22003-09-17 22:33:22 +0000916
Daniel Veillard9ebb6322008-01-11 07:19:24 +0000917Timingtests: xmllint$(EXEEXT) dba100000.xml
Daniel Veillardf6bc7c22003-09-17 22:33:22 +0000918 @echo "## Timing tests to try to detect performance"
919 @echo "## as well a memory usage breakage when streaming"
Daniel Veillarde96a2a42003-09-24 21:23:56 +0000920 @echo "## 1/ using the file interface"
921 @echo "## 2/ using the memory interface"
922 @echo "## 3/ repeated DOM parsing"
923 @echo "## 4/ repeated DOM validation"
Daniel Veillard9ebb6322008-01-11 07:19:24 +0000924 -@($(top_builddir)/xmllint --stream --timing dba100000.xml; \
Daniel Veillardd9e9c9d2003-09-18 22:03:46 +0000925 MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
926 if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
Daniel Veillardf6bc7c22003-09-17 22:33:22 +0000927 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
928 exit 0)
Daniel Veillard9ebb6322008-01-11 07:19:24 +0000929 -@($(top_builddir)/xmllint --stream --timing --memory dba100000.xml; \
Daniel Veillardd9e9c9d2003-09-18 22:03:46 +0000930 MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
931 if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
Daniel Veillardf6bc7c22003-09-17 22:33:22 +0000932 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
933 exit 0)
Daniel Veillardc74859e2004-02-26 09:57:32 +0000934 -@($(top_builddir)/xmllint --noout --timing --repeat $(srcdir)/test/valid/REC-xml-19980210.xml; \
Daniel Veillarde96a2a42003-09-24 21:23:56 +0000935 MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
936 if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
937 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
938 exit 0)
Daniel Veillard4432df22003-09-28 18:58:27 +0000939
940VTimingtests: xmllint$(EXEEXT)
Daniel Veillardc74859e2004-02-26 09:57:32 +0000941 -@($(top_builddir)/xmllint --noout --timing --valid --repeat $(srcdir)/test/valid/REC-xml-19980210.xml; \
Daniel Veillarde96a2a42003-09-24 21:23:56 +0000942 MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
943 if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
944 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
945 exit 0)
Daniel Veillardf6bc7c22003-09-17 22:33:22 +0000946
Aleksey Sanin508a1012002-05-31 06:32:32 +0000947C14Ntests : testC14N$(EXEEXT)
Aleksey Saninf8cb6dd2002-06-04 04:27:06 +0000948 @echo "## C14N and XPath regression tests"
Aleksey Sanin83868242009-07-09 10:26:22 +0200949 -@(for m in with-comments without-comments 1-1-without-comments exc-without-comments ; do \
Aleksey Sanin508a1012002-05-31 06:32:32 +0000950 for i in $(srcdir)/test/c14n/$$m/*.xml ; do \
951 if [ ! -d $$i ] ; then \
952 name=`basename $$i .xml`; \
Aleksey Saninf8cb6dd2002-06-04 04:27:06 +0000953 cmdline="$(CHECKER) $(top_builddir)/testC14N --$$m $$i"; \
Daniel Veillard63186732002-10-15 08:43:17 +0000954 if [ -f $(srcdir)/test/c14n/$$m/$$name.xpath ] ; then \
Aleksey Saninf8cb6dd2002-06-04 04:27:06 +0000955 cmdline="$$cmdline $(srcdir)/test/c14n/$$m/$$name.xpath"; \
Daniel Veillard63186732002-10-15 08:43:17 +0000956 if [ -f $(srcdir)/test/c14n/$$m/$$name.ns ] ; then \
Aleksey Saninf8cb6dd2002-06-04 04:27:06 +0000957 cmdline="$$cmdline '`cat $(srcdir)/test/c14n/$$m/$$name.ns`'"; \
958 fi; \
Aleksey Sanin508a1012002-05-31 06:32:32 +0000959 fi; \
Aleksey Saninf8cb6dd2002-06-04 04:27:06 +0000960 $$cmdline > $(srcdir)/test/c14n/test.tmp; \
Aleksey Sanin508a1012002-05-31 06:32:32 +0000961 if [ $$? -eq 0 ]; then \
Aleksey Saninc57f9c12002-05-31 19:14:57 +0000962 diff $(srcdir)/result/c14n/$$m/$$name $(srcdir)/test/c14n/test.tmp; \
Aleksey Sanin508a1012002-05-31 06:32:32 +0000963 if [ $$? -ne 0 ]; then \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000964 echo "Test $$m/$$name failed"; \
Aleksey Saninf8cb6dd2002-06-04 04:27:06 +0000965 cat $(srcdir)/test/c14n/test.tmp; \
Aleksey Sanin508a1012002-05-31 06:32:32 +0000966 fi; \
967 else \
968 echo "C14N failed"; \
969 fi; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000970 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Aleksey Sanin508a1012002-05-31 06:32:32 +0000971 fi; \
972 rm -f $(srcdir)/test/c14n/test.tmp; \
973 done; \
974 done)
Daniel Veillard4255d502002-04-16 15:50:10 +0000975
976Schemastests: testSchemas$(EXEEXT)
977 @(echo > .memdump)
Daniel Veillard4255d502002-04-16 15:50:10 +0000978 @echo "## Schemas regression tests"
Daniel Veillard8651f532002-04-17 09:06:27 +0000979 -@(for i in $(srcdir)/test/schemas/*_*.xsd ; do \
980 name=`basename $$i | sed 's+_.*++'`; \
981 sno=`basename $$i | sed 's+.*_\(.*\).xsd+\1+'`; \
982 for j in $(srcdir)/test/schemas/"$$name"_*.xml ; do \
Daniel Veillard5add8682003-03-10 13:13:58 +0000983 if [ -f $$j ] ; then \
Daniel Veillard8651f532002-04-17 09:06:27 +0000984 xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \
985 if [ ! -f $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno" ]; \
986 then \
Daniel Veillard6231e842002-04-18 11:54:04 +0000987 echo New test file "$$name"_"$$sno"_"$$xno" ; \
Daniel Veillard8651f532002-04-17 09:06:27 +0000988 $(CHECKER) $(top_builddir)/testSchemas $$i $$j \
989 > $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno" \
990 2> $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno".err; \
Daniel Veillard07cb8222003-09-10 10:51:05 +0000991 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard8651f532002-04-17 09:06:27 +0000992 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +0000993 log=`$(CHECKER) $(top_builddir)/testSchemas $$i $$j \
Daniel Veillard8651f532002-04-17 09:06:27 +0000994 > res.$$name 2> err.$$name;\
995 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
996 diff $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno" \
997 res.$$name;\
998 diff $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno".err \
999 err.$$name;\
Daniel Veillard2b8c4a12003-10-02 22:28:19 +00001000 grep Unimplemented err.$$name`; \
1001 if [ -n "$$log" ] ; then echo "$$name"_"$$sno"_"$$xno" result ; echo $$log ; fi ; \
Daniel Veillard8651f532002-04-17 09:06:27 +00001002 rm res.$$name err.$$name ; \
Daniel Veillard5add8682003-03-10 13:13:58 +00001003 fi ; fi ;\
Daniel Veillard8651f532002-04-17 09:06:27 +00001004 done; done)
Daniel Veillard4255d502002-04-16 15:50:10 +00001005
Daniel Veillard71531f32003-02-05 13:19:53 +00001006Relaxtests: xmllint$(EXEEXT)
Daniel Veillard6eadf632003-01-23 18:29:16 +00001007 @(echo > .memdump)
Daniel Veillard6eadf632003-01-23 18:29:16 +00001008 @echo "## Relax-NG regression tests"
Daniel Veillard6eadf632003-01-23 18:29:16 +00001009 -@(for i in $(srcdir)/test/relaxng/*.rng ; do \
1010 name=`basename $$i | sed 's+\.rng++'`; \
Daniel Veillard231d7912003-02-09 14:22:17 +00001011 if [ ! -f $(srcdir)/result/relaxng/"$$name"_valid ] ; then \
1012 echo New schemas $$name ; \
1013 $(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $(srcdir)/test/relaxng/tutorA.rng $$i \
1014 > $(srcdir)/result/relaxng/"$$name"_valid \
1015 2> $(srcdir)/result/relaxng/"$$name"_err; \
Daniel Veillard07cb8222003-09-10 10:51:05 +00001016 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard231d7912003-02-09 14:22:17 +00001017 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +00001018 log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $(srcdir)/test/relaxng/tutorA.rng $$i \
Daniel Veillard231d7912003-02-09 14:22:17 +00001019 > res.$$name 2> err.$$name;\
1020 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
1021 diff $(srcdir)/result/relaxng/"$$name"_valid \
1022 res.$$name;\
1023 diff $(srcdir)/result/relaxng/"$$name"_err \
1024 err.$$name | grep -v "error detected at";\
Daniel Veillard2b8c4a12003-10-02 22:28:19 +00001025 grep Unimplemented err.$$name`; \
1026 if [ -n "$$log" ] ; then echo schemas $$name result ; echo $$log ; fi ; \
Daniel Veillard231d7912003-02-09 14:22:17 +00001027 rm res.$$name err.$$name ; \
1028 fi; \
Daniel Veillard6eadf632003-01-23 18:29:16 +00001029 for j in $(srcdir)/test/relaxng/"$$name"_*.xml ; do \
1030 if [ -f $$j ] ; then \
1031 xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \
1032 if [ ! -f $(srcdir)/result/relaxng/"$$name"_"$$xno" ]; \
1033 then \
1034 echo New test file "$$name"_"$$xno" ; \
Daniel Veillard71531f32003-02-05 13:19:53 +00001035 $(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $$i $$j \
Daniel Veillard6eadf632003-01-23 18:29:16 +00001036 > $(srcdir)/result/relaxng/"$$name"_"$$xno" \
1037 2> $(srcdir)/result/relaxng/"$$name"_"$$xno".err; \
Daniel Veillard07cb8222003-09-10 10:51:05 +00001038 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard6eadf632003-01-23 18:29:16 +00001039 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +00001040 log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $$i $$j \
Daniel Veillard6eadf632003-01-23 18:29:16 +00001041 > res.$$name 2> err.$$name;\
1042 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
1043 diff $(srcdir)/result/relaxng/"$$name"_"$$xno" \
1044 res.$$name;\
1045 diff $(srcdir)/result/relaxng/"$$name"_"$$xno".err \
Daniel Veillardd41f4f42003-01-29 21:07:52 +00001046 err.$$name | grep -v "error detected at";\
Daniel Veillard2b8c4a12003-10-02 22:28:19 +00001047 grep Unimplemented err.$$name`; \
1048 if [ -n "$$log" ] ; then echo "$$name"_"$$xno" result ; echo $$log ; fi ; \
Daniel Veillard6eadf632003-01-23 18:29:16 +00001049 rm res.$$name err.$$name ; \
1050 fi ; fi ; \
1051 done; done)
Daniel Veillardf4e55762003-04-15 23:32:22 +00001052 @echo "## Relax-NG streaming regression tests"
Daniel Veillardf4e55762003-04-15 23:32:22 +00001053 -@(for i in $(srcdir)/test/relaxng/*.rng ; do \
1054 name=`basename $$i | sed 's+\.rng++'`; \
1055 for j in $(srcdir)/test/relaxng/"$$name"_*.xml ; do \
1056 if [ -f $$j ] ; then \
1057 xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \
1058 if [ ! -f $(srcdir)/result/relaxng/"$$name"_"$$xno" ]; \
1059 then \
1060 echo New test file "$$name"_"$$xno" ; \
1061 $(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $$i $$j \
1062 > $(srcdir)/result/relaxng/"$$name"_"$$xno" \
1063 2> $(srcdir)/result/relaxng/"$$name"_"$$xno".err; \
Daniel Veillard07cb8222003-09-10 10:51:05 +00001064 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillardf4e55762003-04-15 23:32:22 +00001065 else \
Daniel Veillard2b8c4a12003-10-02 22:28:19 +00001066 log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --stream --relaxng $$i $$j \
Daniel Veillardf4e55762003-04-15 23:32:22 +00001067 > res.$$name 2> err.$$name;\
1068 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillardbb5abab2003-10-03 22:21:51 +00001069 diff $(srcdir)/result/relaxng/"$$name"_"$$xno" res.$$name;\
Daniel Veillardec18c962009-08-26 18:37:43 +02001070 if [ "$$name" != "tutor10_1" -a "$$name" != "tutor10_2" -a "$$name" != "tutor3_2" -a "$$name" != "307377" -a "$$name" != "tutor8_2" ] ; then \
Daniel Veillardbb5abab2003-10-03 22:21:51 +00001071 diff $(srcdir)/result/relaxng/"$$name"_"$$xno".err \
1072 err.$$name | grep -v "error detected at";\
1073 fi ; grep Unimplemented err.$$name`; \
William M. Bracka0c48ad2004-04-16 15:58:29 +00001074 if [ -n "$$log" ] ; then echo "$$name"_"$$xno" result ; echo $$log ; fi ; \
Daniel Veillardf4e55762003-04-15 23:32:22 +00001075 rm res.$$name err.$$name ; \
1076 fi ; fi ; \
1077 done; done)
Daniel Veillard6eadf632003-01-23 18:29:16 +00001078
Daniel Veillardc740a172005-07-31 12:17:24 +00001079Schematrontests: xmllint$(EXEEXT)
1080 @(echo > .memdump)
1081 @echo "## Schematron regression tests"
1082 -@(for i in $(srcdir)/test/schematron/*.sct ; do \
1083 name=`basename $$i | sed 's+\.sct++'`; \
1084 for j in $(srcdir)/test/schematron/"$$name"_*.xml ; do \
1085 if [ -f $$j ] ; then \
1086 xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \
1087 if [ ! -f $(srcdir)/result/schematron/"$$name"_"$$xno" ]; \
1088 then \
1089 echo New test file "$$name"_"$$xno" ; \
1090 $(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --schematron $$i $$j \
1091 > $(srcdir)/result/schematron/"$$name"_"$$xno" \
1092 2> $(srcdir)/result/schematron/"$$name"_"$$xno".err; \
1093 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
1094 else \
1095 log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --schematron $$i $$j \
1096 > res.$$name 2> err.$$name;\
1097 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
1098 diff $(srcdir)/result/schematron/"$$name"_"$$xno" \
1099 res.$$name;\
1100 diff $(srcdir)/result/schematron/"$$name"_"$$xno".err \
1101 err.$$name | grep -v "error detected at";\
1102 grep Unimplemented err.$$name`; \
1103 if [ -n "$$log" ] ; then echo "$$name"_"$$xno" result ; echo $$log ; fi ; \
1104 rm res.$$name err.$$name ; \
1105 fi ; fi ; \
1106 done; done)
1107
Daniel Veillard6dc91962004-03-22 19:10:02 +00001108RelaxNGPythonTests:
1109 @(if [ -x $(PYTHON) ] ; then \
Daniel Veillard6d38c752004-05-10 00:40:51 +00001110 PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH ; \
William M. Brackf5806742004-03-31 02:01:32 +00001111 export PYTHONPATH; \
William M. Bracka22da292005-02-12 01:08:22 +00001112 LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
1113 export LD_LIBRARY_PATH; \
Daniel Veillard6dc91962004-03-22 19:10:02 +00001114 echo "## Relax-NG Python based test suite 1" ; \
Daniel Veillard252004d2004-03-23 12:32:32 +00001115 $(CHECKER) $(PYTHON) $(srcdir)/check-relaxng-test-suite.py ; \
Daniel Veillard6dc91962004-03-22 19:10:02 +00001116 echo "## Relax-NG Python based test suite 2" ; \
Daniel Veillard252004d2004-03-23 12:32:32 +00001117 $(CHECKER) $(PYTHON) $(srcdir)/check-relaxng-test-suite2.py ; \
Daniel Veillard6dc91962004-03-22 19:10:02 +00001118 fi)
1119
1120SchemasPythonTests:
1121 @(if [ -x $(PYTHON) ] ; then \
Daniel Veillard6d38c752004-05-10 00:40:51 +00001122 PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH; \
William M. Brackf5806742004-03-31 02:01:32 +00001123 export PYTHONPATH; \
William M. Bracka22da292005-02-12 01:08:22 +00001124 LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
1125 export LD_LIBRARY_PATH; \
Daniel Veillard6dc91962004-03-22 19:10:02 +00001126 echo "## XML Schemas datatypes Python based test suite" ; \
Kasimier T. Buchcik27759f22005-12-05 15:32:28 +00001127 echo "## It is normal to see 11 errors reported" ; \
Daniel Veillard252004d2004-03-23 12:32:32 +00001128 $(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \
Daniel Veillard6dc91962004-03-22 19:10:02 +00001129 fi)
Daniel Richard G5706b6d2012-08-06 11:32:54 +08001130 @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" pytests ; fi)
Daniel Veillard6dc91962004-03-22 19:10:02 +00001131
Daniel Veillardf9d16912005-01-30 22:36:30 +00001132Patterntests: xmllint$(EXEEXT)
1133 @(echo > .memdump)
1134 @echo "## Pattern regression tests"
1135 -@(for i in $(srcdir)/test/pattern/*.pat ; do \
1136 name=`basename $$i .pat`; \
1137 if [ -f $(srcdir)/test/pattern/$$name.xml ] ; then \
1138 if [ ! -f $(srcdir)/result/pattern/$$name ] ; then \
1139 rm -f result.$$name ; \
1140 echo New test file $$name ; \
1141 for pat in `cat $$i` ; do \
Daniel Veillardd4301ab2005-02-03 22:24:10 +00001142 $(CHECKER) $(top_builddir)/xmllint --walker --pattern $$pat $(srcdir)/test/pattern/$$name.xml >> $(srcdir)/result/pattern/$$name ; \
Daniel Veillardf9d16912005-01-30 22:36:30 +00001143 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
1144 done ;\
1145 else \
1146 rm -f result.$$name ; \
1147 lst=`cat $$i` ; \
Daniel Veillardd4301ab2005-02-03 22:24:10 +00001148 log=`for pat in $$lst ; do $(CHECKER) $(top_builddir)/xmllint --walker --pattern $$pat $(srcdir)/test/pattern/$$name.xml 2>&1 >> result.$$name ; \
Daniel Veillardf9d16912005-01-30 22:36:30 +00001149 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
1150 done ;\
1151 diff $(srcdir)/result/pattern/$$name result.$$name` ; \
1152 if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
1153 rm result.$$name ; \
1154 fi ; fi ; done ;)
1155
Daniel Veillardce1648b2005-01-04 15:10:22 +00001156ModuleTests: testModule$(EXEEXT) testdso.la
1157 @echo "## Module tests"
1158 @(./testModule$(EXEEXT))
1159
Daniel Veillard1a792412003-11-18 23:52:38 +00001160cleanup:
1161 -@(find . -name .\#\* -exec rm {} \;)
Daniel Richard G5706b6d2012-08-06 11:32:54 +08001162 -@(find . -name \*.gcda -o -name \*.gcno -exec rm -f {} \;)
1163 -@(find . -name \*.orig -o -name \*.rej -o -name \*.old -exec rm -f {} \;)
Daniel Veillard1a792412003-11-18 23:52:38 +00001164
1165dist-hook: cleanup libxml2.spec
Daniel Veillard580ced82003-03-21 21:22:48 +00001166 -cp libxml2.spec $(distdir)
Patrick Monnerat917e3532014-03-04 17:36:54 +01001167 (cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn --exclude .git win32 macos os400 vms VxWorks bakefile test result) | (cd $(distdir); tar xf -)
Michael Fulbright63dc42c1999-02-21 21:20:12 +00001168
Daniel Veillard0bff36d2004-08-31 09:37:03 +00001169dist-source: distdir
Daniel Veillarde4aaae22005-07-10 23:12:52 +00001170 $(AMTAR) -chof - --exclude Tests --exclude test --exclude result $(distdir) | GZIP=$(GZIP_ENV) gzip -c >`echo "$(distdir)" | sed "s+libxml2+libxml2-sources+"`.tar.gz
Daniel Veillard0bff36d2004-08-31 09:37:03 +00001171
Daniel Veillard87b30462005-07-05 14:04:36 +00001172dist-test: distdir
Daniel Veillarde4aaae22005-07-10 23:12:52 +00001173 (mkdir -p $(distdir))
Daniel Veillardc943f702012-05-23 17:10:59 +08001174 (cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn --exclude .git xstc/Tests) | (cd $(distdir); tar xf -)
Daniel Veillard1f33c4d2005-07-10 21:38:31 +00001175 tar -cf - $(distdir)/test $(distdir)/result $(distdir)/xstc/Tests $(distdir)/Makefile.tests $(distdir)/README $(distdir)/README.tests $(distdir)/AUTHORS $(distdir)/testapi.c $(distdir)/runtest.c $(distdir)/runsuite.c | GZIP=$(GZIP_ENV) gzip -c >`echo "$(distdir)" | sed "s+libxml2+libxml2-tests+"`.tar.gz
1176 @(rm -rf $(distdir)/xstc/Test)
Daniel Veillard87b30462005-07-05 14:04:36 +00001177
Daniel Veillard8e199902001-01-25 18:54:39 +00001178cleantar:
Daniel Veillard55253e22002-02-18 14:32:39 +00001179 @(rm -f libxml*.tar.gz COPYING.LIB)
Daniel Veillard8e199902001-01-25 18:54:39 +00001180
Daniel Veillard1a792412003-11-18 23:52:38 +00001181rpm: cleanup cleantar
Daniel Veillarde4aaae22005-07-10 23:12:52 +00001182 @(unset CDPATH ; $(MAKE) dist-source dist && rpmbuild -ta $(distdir).tar.gz)
Owen Taylor3473f882001-02-23 17:55:21 +00001183
1184## We create xml2Conf.sh here and not from configure because we want
1185## to get the paths expanded correctly. Macros like srcdir are given
1186## the value NONE in configure if the user doesn't specify them (this
1187## is an autoconf feature, not a bug).
1188
Daniel Veillard06d25242004-02-25 13:01:42 +00001189xml2Conf.sh: xml2Conf.sh.in Makefile
1190## Use sed and then mv to avoid problems if the user interrupts.
1191 sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \
1192 -e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \
1193 -e 's?\@VERSION\@?$(VERSION)?g' \
1194 -e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \
1195 < $(srcdir)/xml2Conf.sh.in > xml2Conf.tmp \
1196 && mv xml2Conf.tmp xml2Conf.sh
1197
Daniel Richard G5706b6d2012-08-06 11:32:54 +08001198CLEANFILES = runxmlconf.log test.out xml2Conf.sh *.gcda *.gcno *.res
Daniel Veillard742a0bb2012-09-11 13:37:30 +08001199DISTCLEANFILES = COPYING missing.lst
Owen Taylor3473f882001-02-23 17:55:21 +00001200
1201confexecdir=$(libdir)
1202confexec_DATA = xml2Conf.sh
Daniel Veillard7a5e0dd2004-09-17 08:45:25 +00001203CVS_EXTRA_DIST=
Daniel Veillard580ced82003-03-21 21:22:48 +00001204EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \
Daniel Veillard96f6fe92004-11-04 10:52:50 +00001205 libxml.m4 Copyright check-xml-test-suite.py gentest.py \
Daniel Veillard252004d2004-03-23 12:32:32 +00001206 check-relaxng-test-suite.py check-relaxng-test-suite2.py \
1207 check-xsddata-test-suite.py check-xinclude-test-suite.py \
Owen Taylor3473f882001-02-23 17:55:21 +00001208 example/Makefile.am example/gjobread.c example/gjobs.xml \
AEST 2003 Malcolm Tredinnick06431122003-09-30 02:36:08 +00001209 $(man_MANS) libxml-2.0.pc.in libxml-2.0-uninstalled.pc.in \
Samuel Martinfa23ac12014-10-11 21:50:41 +02001210 libxml2-config.cmake.in \
Bjorn Reese026d29f2002-01-19 15:40:18 +00001211 trionan.c trionan.h triostr.c triostr.h trio.c trio.h \
Daniel Veillardbca22f42012-07-11 16:48:47 +08001212 triop.h triodef.h libxml.h elfgcchack.h xzlib.h buf.h \
Daniel Veillard187e5292012-08-06 10:27:58 +08001213 enc.h save.h testThreadsWin32.c genUnicode.py TODO_SCHEMAS \
Daniel Veillarddab93ea2004-08-20 16:47:10 +00001214 dbgen.pl dbgenattr.pl regressions.py regressions.xml \
Vojtech Fried3e031b72012-08-24 16:52:44 +08001215 README.tests Makefile.tests libxml2.syms timsort.h \
Daniel Veillarddab93ea2004-08-20 16:47:10 +00001216 $(CVS_EXTRA_DIST)
Daniel Veillardf6bc7c22003-09-17 22:33:22 +00001217
Owen Taylor3473f882001-02-23 17:55:21 +00001218
1219pkgconfigdir = $(libdir)/pkgconfig
1220pkgconfig_DATA = libxml-2.0.pc
1221
Samuel Martinfa23ac12014-10-11 21:50:41 +02001222cmakedir = $(libdir)/cmake/libxml2
1223cmake_DATA = libxml2-config.cmake
1224
Daniel Veillard36065812002-01-24 15:02:46 +00001225#
William M. Brackf20fbf72004-06-25 05:49:08 +00001226# Install the tests program sources as examples
Daniel Veillard36065812002-01-24 15:02:46 +00001227#
Daniel Veillard366a9152002-10-23 20:43:53 +00001228BASE_DIR=$(datadir)/doc
Daniel Veillard36065812002-01-24 15:02:46 +00001229DOC_MODULE=libxml2-$(VERSION)
1230EXAMPLES_DIR=$(BASE_DIR)/$(DOC_MODULE)/examples
1231
1232install-data-local:
Daniel Richard G5706b6d2012-08-06 11:32:54 +08001233 $(MKDIR_P) $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)
1234 -$(INSTALL) -m 0644 $(srcdir)/Copyright $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)
1235 $(MKDIR_P) $(DESTDIR)$(EXAMPLES_DIR)
1236 -$(INSTALL) -m 0644 $(srcdir)/xmllint.c $(DESTDIR)$(EXAMPLES_DIR)
1237 -$(INSTALL) -m 0644 $(srcdir)/testSAX.c $(DESTDIR)$(EXAMPLES_DIR)
1238 -$(INSTALL) -m 0644 $(srcdir)/testHTML.c $(DESTDIR)$(EXAMPLES_DIR)
1239 -$(INSTALL) -m 0644 $(srcdir)/testXPath.c $(DESTDIR)$(EXAMPLES_DIR)
Daniel Veillardda3b29a2004-08-14 11:15:13 +00001240
Daniel Veillard9ebb6322008-01-11 07:19:24 +00001241uninstall-local:
Daniel Veillard2173b5c2009-08-24 14:23:32 +02001242 rm -f $(DESTDIR)$(EXAMPLES_DIR)/testXPath.c
1243 rm -f $(DESTDIR)$(EXAMPLES_DIR)/testHTML.c
1244 rm -f $(DESTDIR)$(EXAMPLES_DIR)/testSAX.c
1245 rm -f $(DESTDIR)$(EXAMPLES_DIR)/xmllint.c
Daniel Veillard9ebb6322008-01-11 07:19:24 +00001246 rm -rf $(DESTDIR)$(EXAMPLES_DIR)
Daniel Veillard2173b5c2009-08-24 14:23:32 +02001247 rm -f $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)/Copyright
Daniel Veillard9ebb6322008-01-11 07:19:24 +00001248 rm -rf $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)
1249
Daniel Veillardda3b29a2004-08-14 11:15:13 +00001250tst: tst.c
Daniel Veillard48f0f3f2012-05-08 10:59:41 +08001251 $(CC) $(CFLAGS) -Iinclude -o tst tst.c .libs/libxml2.a -lpthread -lm -lz -llzma
Daniel Veillard75e389d2005-07-29 22:02:24 +00001252
1253sparse: clean
1254 $(MAKE) CC=cgcc
Daniel Veillardbfa5cf12008-08-27 15:33:28 +00001255
1256#
1257# Coverage support, largely borrowed from libvirt
1258# Both binaries comes from the lcov package in Fedora
1259#
1260LCOV = /usr/bin/lcov
1261GENHTML = /usr/bin/genhtml
1262
1263cov: clean-cov
1264 if [ "`echo $(LDFLAGS) | grep coverage`" = "" ] ; then \
1265 echo not configured with coverage; exit 1 ; fi
1266 if [ ! -x $(LCOV) -o ! -x $(GENHTML) ] ; then \
1267 echo Need $(LCOV) and $(GENHTML) excecutables; exit 1 ; fi
1268 -@($(MAKE) check)
1269 -@(./runsuite$(EXEEXT))
1270 mkdir $(top_builddir)/coverage
1271 $(LCOV) -c -o $(top_builddir)/coverage/libxml2.info.tmp -d $(top_srcdir)
1272 $(LCOV) -r $(top_builddir)/coverage/libxml2.info.tmp -o $(top_builddir)/coverage/libxml2.info *usr*
1273 rm $(top_builddir)/coverage/libxml2.info.tmp
1274 $(GENHTML) -s -t "libxml2" -o $(top_builddir)/coverage --legend $(top_builddir)/coverage/libxml2.info
1275 echo "Coverage report is in $(top_builddir)/coverage/index.html"
1276
1277clean-cov:
1278 rm -rf $(top_builddir)/coverage
1279