Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 1 | ## Process this file with automake to produce Makefile.in |
Daniel Veillard | 7704473 | 2001-06-29 21:31:07 +0000 | [diff] [blame] | 2 | |
Daniel Veillard | b1da40c | 2004-09-06 11:57:44 +0000 | [diff] [blame] | 3 | SUBDIRS = include . doc example xstc @PYTHON_SUBDIR@ |
Daniel Veillard | 19b858c | 1999-02-06 18:12:01 +0000 | [diff] [blame] | 4 | |
Daniel Veillard | b1da40c | 2004-09-06 11:57:44 +0000 | [diff] [blame] | 5 | DIST_SUBDIRS = include . doc example python xstc |
Daniel Veillard | 7233615 | 2002-09-21 13:08:14 +0000 | [diff] [blame] | 6 | |
Daniel Veillard | 91ad879 | 2002-11-04 17:06:52 +0000 | [diff] [blame] | 7 | INCLUDES = -I$(top_builddir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@ |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 8 | |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 9 | noinst_PROGRAMS=testSchemas testRelax testSAX testHTML testXPath testURI \ |
Daniel Veillard | 877a7bd | 2003-09-13 00:16:32 +0000 | [diff] [blame] | 10 | testThreads testC14N testAutomata testRegexp \ |
Daniel Veillard | ce1648b | 2005-01-04 15:10:22 +0000 | [diff] [blame] | 11 | testReader testapi testModule |
Daniel Veillard | 27fb075 | 1998-10-17 06:47:46 +0000 | [diff] [blame] | 12 | |
Daniel Veillard | 344cee7 | 2001-08-20 00:08:40 +0000 | [diff] [blame] | 13 | bin_PROGRAMS = xmllint xmlcatalog |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 14 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 15 | bin_SCRIPTS=xml2-config |
| 16 | |
| 17 | lib_LTLIBRARIES = libxml2.la |
Daniel Veillard | 6984e6d | 2003-12-09 14:20:17 +0000 | [diff] [blame] | 18 | libxml2_la_LIBADD = @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 19 | |
Daniel Veillard | ce1648b | 2005-01-04 15:10:22 +0000 | [diff] [blame] | 20 | libxml2_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ -version-info @LIBXML_VERSION_INFO@ @MODULE_PLATFORM_LIBS@ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 21 | |
Daniel Veillard | 7150a03 | 2001-05-02 16:41:11 +0000 | [diff] [blame] | 22 | if WITH_TRIO_SOURCES |
Daniel Veillard | 92ad210 | 2001-03-27 12:47:33 +0000 | [diff] [blame] | 23 | libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \ |
| 24 | parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \ |
| 25 | valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \ |
Daniel Veillard | eae522a | 2001-04-23 13:41:34 +0000 | [diff] [blame] | 26 | xpointer.c xinclude.c nanohttp.c nanoftp.c DOCBparser.c \ |
William M. Brack | a2e844a | 2004-01-06 11:52:13 +0000 | [diff] [blame] | 27 | catalog.c globals.c threads.c c14n.c xmlstring.c \ |
Daniel Veillard | 49d5af8 | 2002-05-23 11:55:49 +0000 | [diff] [blame] | 28 | xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \ |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 29 | triostr.c trio.c xmlreader.c relaxng.c dict.c SAX2.c \ |
Daniel Veillard | ce1648b | 2005-01-04 15:10:22 +0000 | [diff] [blame] | 30 | xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c xmlmodule.c |
Daniel Veillard | 7150a03 | 2001-05-02 16:41:11 +0000 | [diff] [blame] | 31 | else |
| 32 | libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \ |
| 33 | parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \ |
| 34 | valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \ |
Daniel Veillard | a737459 | 2001-05-10 14:17:55 +0000 | [diff] [blame] | 35 | xpointer.c xinclude.c nanohttp.c nanoftp.c DOCBparser.c \ |
William M. Brack | a2e844a | 2004-01-06 11:52:13 +0000 | [diff] [blame] | 36 | catalog.c globals.c threads.c c14n.c xmlstring.c \ |
Daniel Veillard | e1ca503 | 2002-12-09 14:13:43 +0000 | [diff] [blame] | 37 | xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \ |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 38 | xmlreader.c relaxng.c dict.c SAX2.c \ |
Daniel Veillard | ce1648b | 2005-01-04 15:10:22 +0000 | [diff] [blame] | 39 | xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \ |
| 40 | xmlmodule.c |
Daniel Veillard | 7150a03 | 2001-05-02 16:41:11 +0000 | [diff] [blame] | 41 | endif |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 42 | |
| 43 | DEPS = $(top_builddir)/libxml2.la |
Daniel Veillard | 6984e6d | 2003-12-09 14:20:17 +0000 | [diff] [blame] | 44 | LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@ |
Daniel Veillard | 1638a47 | 2003-08-14 01:23:25 +0000 | [diff] [blame] | 45 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 46 | |
Daniel Veillard | e915b2d | 2002-03-06 18:42:40 +0000 | [diff] [blame] | 47 | man_MANS = xml2-config.1 libxml.3 |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 48 | |
| 49 | m4datadir = $(datadir)/aclocal |
| 50 | m4data_DATA = libxml.m4 |
| 51 | |
| 52 | xmllint_SOURCES=xmllint.c |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 53 | xmllint_LDFLAGS = |
| 54 | xmllint_DEPENDENCIES = $(DEPS) |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 55 | xmllint_LDADD= @RDL_LIBS@ $(LDADDS) |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 56 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 57 | testSAX_SOURCES=testSAX.c |
Daniel Veillard | 011b63c | 1999-06-02 17:44:04 +0000 | [diff] [blame] | 58 | testSAX_LDFLAGS = |
| 59 | testSAX_DEPENDENCIES = $(DEPS) |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 60 | testSAX_LDADD= $(LDADDS) |
Daniel Veillard | 011b63c | 1999-06-02 17:44:04 +0000 | [diff] [blame] | 61 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 62 | testHTML_SOURCES=testHTML.c |
Daniel Veillard | be70ff7 | 1999-07-05 16:50:46 +0000 | [diff] [blame] | 63 | testHTML_LDFLAGS = |
| 64 | testHTML_DEPENDENCIES = $(DEPS) |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 65 | testHTML_LDADD= $(LDADDS) |
Daniel Veillard | be70ff7 | 1999-07-05 16:50:46 +0000 | [diff] [blame] | 66 | |
Daniel Veillard | 344cee7 | 2001-08-20 00:08:40 +0000 | [diff] [blame] | 67 | xmlcatalog_SOURCES=xmlcatalog.c |
| 68 | xmlcatalog_LDFLAGS = |
| 69 | xmlcatalog_DEPENDENCIES = $(DEPS) |
Daniel Veillard | 03f848d | 2001-11-07 12:53:46 +0000 | [diff] [blame] | 70 | xmlcatalog_LDADD= @RDL_LIBS@ $(LDADDS) |
Daniel Veillard | a737459 | 2001-05-10 14:17:55 +0000 | [diff] [blame] | 71 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 72 | testXPath_SOURCES=testXPath.c |
Daniel Veillard | 1566d3a | 1999-07-15 14:24:29 +0000 | [diff] [blame] | 73 | testXPath_LDFLAGS = |
| 74 | testXPath_DEPENDENCIES = $(DEPS) |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 75 | testXPath_LDADD= $(LDADDS) |
Daniel Veillard | 1566d3a | 1999-07-15 14:24:29 +0000 | [diff] [blame] | 76 | |
Daniel Veillard | 044fc6b | 2002-03-04 17:09:44 +0000 | [diff] [blame] | 77 | testC14N_SOURCES=testC14N.c |
| 78 | testC14N_LDFLAGS = |
| 79 | testC14N_DEPENDENCIES = $(DEPS) |
| 80 | testC14N_LDADD= $(LDADDS) |
| 81 | |
Daniel Veillard | 6984e6d | 2003-12-09 14:20:17 +0000 | [diff] [blame] | 82 | testThreads_SOURCES=testThreads@THREADS_W32@.c |
Daniel Veillard | ab7488e | 2001-10-17 11:30:37 +0000 | [diff] [blame] | 83 | testThreads_LDFLAGS = |
| 84 | testThreads_DEPENDENCIES = $(DEPS) |
Daniel Veillard | dbfe05a | 2005-05-04 09:18:00 +0000 | [diff] [blame] | 85 | testThreads_LDADD= @BASE_THREAD_LIBS@ $(LDADDS) |
Daniel Veillard | ab7488e | 2001-10-17 11:30:37 +0000 | [diff] [blame] | 86 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 87 | testURI_SOURCES=testURI.c |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 88 | testURI_LDFLAGS = |
| 89 | testURI_DEPENDENCIES = $(DEPS) |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 90 | testURI_LDADD= $(LDADDS) |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 91 | |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 92 | testRegexp_SOURCES=testRegexp.c |
| 93 | testRegexp_LDFLAGS = |
| 94 | testRegexp_DEPENDENCIES = $(DEPS) |
| 95 | testRegexp_LDADD= $(LDADDS) |
| 96 | |
| 97 | testAutomata_SOURCES=testAutomata.c |
| 98 | testAutomata_LDFLAGS = |
| 99 | testAutomata_DEPENDENCIES = $(DEPS) |
| 100 | testAutomata_LDADD= $(LDADDS) |
| 101 | |
| 102 | testSchemas_SOURCES=testSchemas.c |
| 103 | testSchemas_LDFLAGS = |
| 104 | testSchemas_DEPENDENCIES = $(DEPS) |
| 105 | testSchemas_LDADD= $(LDADDS) |
| 106 | |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 107 | testRelax_SOURCES=testRelax.c |
| 108 | testRelax_LDFLAGS = |
| 109 | testRelax_DEPENDENCIES = $(DEPS) |
| 110 | testRelax_LDADD= $(LDADDS) |
| 111 | |
Daniel Veillard | e1ca503 | 2002-12-09 14:13:43 +0000 | [diff] [blame] | 112 | testReader_SOURCES=testReader.c |
| 113 | testReader_LDFLAGS = |
| 114 | testReader_DEPENDENCIES = $(DEPS) |
| 115 | testReader_LDADD= $(LDADDS) |
| 116 | |
Daniel Veillard | ce1648b | 2005-01-04 15:10:22 +0000 | [diff] [blame] | 117 | testModule_SOURCES=testModule.c |
| 118 | testModule_LDFLAGS = |
| 119 | testModule_DEPENDENCIES = $(DEPS) |
| 120 | testModule_LDADD= $(LDADDS) |
| 121 | |
| 122 | noinst_LTLIBRARIES = testdso.la |
| 123 | testdso_la_SOURCES = testdso.c |
| 124 | testdso_la_LDFLAGS = -module -rpath $(libdir) |
| 125 | |
Daniel Veillard | 2ae1338 | 2005-01-25 23:45:06 +0000 | [diff] [blame] | 126 | # that one forces the rebuild when "make rebuild" is run on doc/ |
| 127 | rebuild_testapi: |
| 128 | -@(if [ "$(PYTHON)" != "" ] ; then \ |
| 129 | $(PYTHON) $(srcdir)/gentest.py $(srcdir) ; fi ) |
| 130 | |
| 131 | # that one is just to make sure it is rebuilt if missing |
| 132 | # but adding the dependances generate mess |
| 133 | testapi.c: |
William M. Brack | 106cad6 | 2004-12-23 15:56:12 +0000 | [diff] [blame] | 134 | -@(if [ "$(PYTHON)" != "" ] ; then \ |
| 135 | $(PYTHON) $(srcdir)/gentest.py $(srcdir) ; fi ) |
Daniel Veillard | 36e5cd5 | 2004-11-02 14:52:23 +0000 | [diff] [blame] | 136 | |
| 137 | testapi_SOURCES=testapi.c |
| 138 | testapi_LDFLAGS = |
| 139 | testapi_DEPENDENCIES = $(DEPS) |
| 140 | testapi_LDADD= $(LDADDS) |
| 141 | |
Daniel Veillard | de0a0a5 | 2003-04-24 17:12:57 +0000 | [diff] [blame] | 142 | #testOOM_SOURCES=testOOM.c testOOMlib.h testOOMlib.c |
| 143 | #testOOM_LDFLAGS = |
| 144 | #testOOM_DEPENDENCIES = $(DEPS) |
| 145 | #testOOM_LDADD= $(LDADDS) |
Daniel Veillard | a76fe5c | 2003-04-24 16:06:47 +0000 | [diff] [blame] | 146 | |
Daniel Veillard | a90de5e | 2004-05-09 18:06:20 +0000 | [diff] [blame] | 147 | check-local: all tests |
Raja R Harinath | a86c23e | 1999-03-05 22:14:01 +0000 | [diff] [blame] | 148 | |
Daniel Veillard | f09e7e3 | 2000-10-01 15:53:30 +0000 | [diff] [blame] | 149 | testall : tests SVGtests SAXtests |
Daniel Veillard | 011b63c | 1999-06-02 17:44:04 +0000 | [diff] [blame] | 150 | |
Daniel Veillard | f9d1691 | 2005-01-30 22:36:30 +0000 | [diff] [blame] | 151 | tests: 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_THREADS@ Timingtests @TEST_VTIME@ @PYTHON_TESTS@ @TEST_MODULES@ |
William M. Brack | e9449c5 | 2004-07-11 14:41:20 +0000 | [diff] [blame] | 152 | @(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; \ |
| 153 | $(MAKE) MAKEFLAGS+=--silent tests ; fi) |
| 154 | @(cd doc/examples ; $(MAKE) MAKEFLAGS+=--silent tests) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 155 | |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 156 | valgrind: |
| 157 | @echo '## Running the regression tests under Valgrind' |
| 158 | @echo '## Go get a cup of coffee it is gonna take a while ...' |
Daniel Veillard | 25c90c5 | 2005-03-02 10:47:41 +0000 | [diff] [blame] | 159 | $(MAKE) CHECKER='valgrind' tests |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 160 | |
Daniel Veillard | d0cf7f6 | 2004-11-09 16:17:02 +0000 | [diff] [blame] | 161 | APItests: testapi$(EXEEXT) |
| 162 | @echo "## Running the API regression tests this may take a little while" |
| 163 | -@($(CHECKER) $(top_builddir)/testapi -q) |
| 164 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 165 | HTMLtests : testHTML$(EXEEXT) |
Daniel Veillard | 357c960 | 2001-05-03 10:49:20 +0000 | [diff] [blame] | 166 | @(echo > .memdump) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 167 | @echo "## HTML regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 168 | -@(for i in $(srcdir)/test/HTML/* ; do \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 169 | name=`basename $$i`; \ |
Daniel Veillard | 82150d8 | 1999-07-07 07:32:15 +0000 | [diff] [blame] | 170 | if [ ! -d $$i ] ; then \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 171 | if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \ |
| 172 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 173 | $(CHECKER) $(top_builddir)/testHTML $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \ |
Daniel Veillard | 82150d8 | 1999-07-07 07:32:15 +0000 | [diff] [blame] | 174 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 175 | log=`$(CHECKER) $(top_builddir)/testHTML $$i > result.$$name 2> error.$$name ; \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 176 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 177 | diff $(srcdir)/result/HTML/$$name result.$$name ; \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 178 | diff -b $(srcdir)/result/HTML/$$name.err error.$$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 179 | $(CHECKER) $(top_builddir)/testHTML result.$$name > result2.$$name 2>error.$$name ; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 180 | diff result.$$name result2.$$name` ; \ |
| 181 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 7c1206f | 1999-10-14 09:10:25 +0000 | [diff] [blame] | 182 | rm result.$$name result2.$$name error.$$name ; \ |
Daniel Veillard | 82150d8 | 1999-07-07 07:32:15 +0000 | [diff] [blame] | 183 | fi ; fi ; done) |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 184 | |
| 185 | HTMLPushtests : testHTML$(EXEEXT) |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 186 | @echo "## Push HTML regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 187 | -@(for i in $(srcdir)/test/HTML/* ; do \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 188 | name=`basename $$i`; \ |
| 189 | if [ ! -d $$i ] ; then \ |
| 190 | if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \ |
| 191 | echo New test file $$name ; \ |
William M. Brack | f20fbf7 | 2004-06-25 05:49:08 +0000 | [diff] [blame] | 192 | $(CHECKER) $(top_builddir)/testHTML --push $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 193 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 194 | log=`$(CHECKER) $(top_builddir)/testHTML --push $$i > result.$$name 2> error.$$name ; \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 195 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 196 | diff $(srcdir)/result/HTML/$$name result.$$name ; \ |
| 197 | cut -b 1-15 $(srcdir)/result/HTML/$$name.err > errorcut.$$name; \ |
| 198 | cut -b 1-15 error.$$name > errorcut2.$$name; \ |
| 199 | diff -b errorcut.$$name errorcut2.$$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 200 | $(CHECKER) $(top_builddir)/testHTML --push result.$$name > result2.$$name 2>error.$$name ; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 201 | diff result.$$name result2.$$name` ; \ |
| 202 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 203 | rm result.$$name result2.$$name error.$$name errorcut.$$name errorcut2.$$name ; \ |
| 204 | fi ; fi ; done) |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 205 | @echo "## HTML SAX regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 206 | -@(for i in $(srcdir)/test/HTML/* ; do \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 207 | name=`basename $$i`; \ |
| 208 | if [ ! -d $$i ] ; then \ |
| 209 | if [ ! -f $(srcdir)/result/HTML/$$name.sax ] ; then \ |
| 210 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 211 | $(CHECKER) $(top_builddir)/testHTML --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 212 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 213 | log=`$(CHECKER) $(top_builddir)/testHTML --sax $$i > result.$$name.sax ; \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 214 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 215 | diff $(srcdir)/result/HTML/$$name.sax result.$$name.sax` ; \ |
| 216 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 217 | rm result.$$name.sax ; \ |
| 218 | fi ; fi ; done) |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 219 | @echo "## Push HTML SAX regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 220 | -@(for i in $(srcdir)/test/HTML/* ; do \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 221 | name=`basename $$i`; \ |
| 222 | if [ ! -d $$i ] ; then \ |
| 223 | if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \ |
| 224 | echo New test file $$name ; \ |
William M. Brack | f20fbf7 | 2004-06-25 05:49:08 +0000 | [diff] [blame] | 225 | $(CHECKER) $(top_builddir)/testHTML --push --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 226 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 227 | log=`$(CHECKER) $(top_builddir)/testHTML --push --sax $$i 2>&1 > result.$$name.sax ; \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 228 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 229 | diff $(srcdir)/result/HTML/$$name.sax result.$$name.sax` ; \ |
| 230 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 231 | rm result.$$name.sax ; \ |
| 232 | fi ; fi ; done) |
| 233 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 234 | XMLtests : xmllint$(EXEEXT) |
Daniel Veillard | 357c960 | 2001-05-03 10:49:20 +0000 | [diff] [blame] | 235 | @(echo > .memdump) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 236 | @echo "## XML regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 237 | -@(for i in $(srcdir)/test/* ; do \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 238 | name=`basename $$i`; \ |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 239 | if [ ! -d $$i ] ; then \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 240 | if [ ! -f $(srcdir)/result/$$name ] ; then \ |
| 241 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 242 | $(CHECKER) $(top_builddir)/xmllint $$i > $(srcdir)/result/$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 243 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 244 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 245 | log=`$(CHECKER) $(top_builddir)/xmllint $$i 2>&1 > result.$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 246 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 247 | diff $(srcdir)/result/$$name result.$$name ; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 248 | $(CHECKER) $(top_builddir)/xmllint result.$$name 2>&1 > result2.$$name | grep -v 'failed to load external entity' ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 249 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 250 | diff result.$$name result2.$$name` ;\ |
| 251 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 252 | rm result.$$name result2.$$name ; \ |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 253 | fi ; fi ; done) |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 254 | @echo "## XML regression tests on memory" |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 255 | -@(for i in $(srcdir)/test/* ; do \ |
| 256 | name=`basename $$i`; \ |
| 257 | if [ ! -d $$i ] ; then \ |
| 258 | if [ ! -f $(srcdir)/result/$$name ] ; then \ |
| 259 | echo New test file $$name ; \ |
| 260 | $(CHECKER) $(top_builddir)/xmllint --memory $$i > $(srcdir)/result/$$name ; \ |
| 261 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
| 262 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 263 | log=`$(CHECKER) $(top_builddir)/xmllint --memory $$i 2>&1 > result.$$name ; \ |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 264 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 265 | diff $(srcdir)/result/$$name result.$$name ; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 266 | $(CHECKER) $(top_builddir)/xmllint --memory result.$$name 2>&1 > result2.$$name | grep -v 'failed to load external entity' ; \ |
| 267 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"`; \ |
| 268 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 269 | diff result.$$name result2.$$name ; \ |
| 270 | rm result.$$name result2.$$name ; \ |
| 271 | fi ; fi ; done) |
| 272 | |
| 273 | XMLPushtests: xmllint$(EXEEXT) |
Daniel Veillard | 3e5bb8e | 2001-06-27 16:34:34 +0000 | [diff] [blame] | 274 | @(echo > .memdump) |
Daniel Veillard | 3e5bb8e | 2001-06-27 16:34:34 +0000 | [diff] [blame] | 275 | @echo "## XML push regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 276 | -@(for i in $(srcdir)/test/* ; do \ |
Daniel Veillard | 3e5bb8e | 2001-06-27 16:34:34 +0000 | [diff] [blame] | 277 | name=`basename $$i`; \ |
| 278 | if [ ! -d $$i ] ; then \ |
| 279 | if [ ! -f $(srcdir)/result/$$name ] ; then \ |
| 280 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 281 | $(CHECKER) $(top_builddir)/xmllint --push $$i > $(srcdir)/result/$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 282 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 3e5bb8e | 2001-06-27 16:34:34 +0000 | [diff] [blame] | 283 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 284 | log=`$(CHECKER) $(top_builddir)/xmllint --push $$i 2>&1 > result.$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 285 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 3e5bb8e | 2001-06-27 16:34:34 +0000 | [diff] [blame] | 286 | diff $(srcdir)/result/$$name result.$$name ; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 287 | $(CHECKER) $(top_builddir)/xmllint --push result.$$name 2>&1 > result2.$$name | grep -v 'failed to load external entity' ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 288 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 289 | diff result.$$name result2.$$name` ; \ |
| 290 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 3e5bb8e | 2001-06-27 16:34:34 +0000 | [diff] [blame] | 291 | rm result.$$name result2.$$name ; \ |
| 292 | fi ; fi ; done) |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 293 | |
Daniel Veillard | 3b7840c | 2003-09-11 23:42:01 +0000 | [diff] [blame] | 294 | NStests : xmllint$(EXEEXT) |
| 295 | @(echo > .memdump) |
Daniel Veillard | 3b7840c | 2003-09-11 23:42:01 +0000 | [diff] [blame] | 296 | @echo "## XML Namespaces regression tests" |
Daniel Veillard | 3b7840c | 2003-09-11 23:42:01 +0000 | [diff] [blame] | 297 | -@(for i in $(srcdir)/test/namespaces/* ; do \ |
| 298 | name=`basename $$i`; \ |
| 299 | if [ ! -d $$i ] ; then \ |
| 300 | if [ ! -f $(srcdir)/result/namespaces/$$name ] ; then \ |
| 301 | echo New test file $$name ; \ |
| 302 | $(CHECKER) $(top_builddir)/xmllint $$i \ |
| 303 | 2> $(srcdir)/result/namespaces/$$name.err \ |
| 304 | > $(srcdir)/result/namespaces/$$name ; \ |
| 305 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
| 306 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 307 | log=`$(CHECKER) $(top_builddir)/xmllint $$i 2> error.$$name > result.$$name ; \ |
Daniel Veillard | 3b7840c | 2003-09-11 23:42:01 +0000 | [diff] [blame] | 308 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
| 309 | diff $(srcdir)/result/namespaces/$$name result.$$name ; \ |
Daniel Veillard | 03a53c3 | 2004-10-26 16:06:51 +0000 | [diff] [blame] | 310 | diff $(srcdir)/result/namespaces/$$name.err error.$$name`; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 311 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 3b7840c | 2003-09-11 23:42:01 +0000 | [diff] [blame] | 312 | rm result.$$name error.$$name ; \ |
| 313 | fi ; fi ; done) |
| 314 | |
Daniel Veillard | 67f8b1c | 2004-04-09 21:51:49 +0000 | [diff] [blame] | 315 | IDtests : xmllint$(EXEEXT) testXPath$(EXEEXT) |
| 316 | @(echo > .memdump) |
| 317 | @echo "## xml:id regression tests" |
| 318 | -@(for i in $(srcdir)/test/xmlid/id_*.xml ; do \ |
| 319 | name=`basename $$i`; \ |
| 320 | if [ ! -d $$i ] ; then \ |
| 321 | if [ ! -f $(srcdir)/result/xmlid/$$name ] ; then \ |
| 322 | echo New test file $$name ; \ |
| 323 | $(CHECKER) $(top_builddir)/testXPath -i $$i "id('bar')" \ |
| 324 | 2> $(srcdir)/result/xmlid/$$name.err \ |
| 325 | > $(srcdir)/result/xmlid/$$name ; \ |
| 326 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
| 327 | else \ |
| 328 | log=`$(CHECKER) $(top_builddir)/testXPath -i $$i "id('bar')" 2> error.$$name > result.$$name ; \ |
| 329 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
| 330 | diff $(srcdir)/result/xmlid/$$name result.$$name ; \ |
| 331 | diff $(srcdir)/result/xmlid/$$name.err error.$$name` ; \ |
| 332 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
| 333 | rm result.$$name error.$$name ; \ |
| 334 | fi ; fi ; done) |
| 335 | |
Daniel Veillard | 522bc60 | 2004-02-21 11:53:09 +0000 | [diff] [blame] | 336 | Errtests : xmllint$(EXEEXT) |
| 337 | @(echo > .memdump) |
| 338 | @echo "## Error cases regression tests" |
| 339 | -@(for i in $(srcdir)/test/errors/*.xml ; do \ |
| 340 | name=`basename $$i`; \ |
| 341 | if [ ! -d $$i ] ; then \ |
| 342 | if [ ! -f $(srcdir)/result/errors/$$name ] ; then \ |
| 343 | echo New test file $$name ; \ |
| 344 | $(CHECKER) $(top_builddir)/xmllint $$i \ |
| 345 | 2> $(srcdir)/result/errors/$$name.err \ |
| 346 | > $(srcdir)/result/errors/$$name ; \ |
| 347 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
| 348 | else \ |
| 349 | log=`$(CHECKER) $(top_builddir)/xmllint $$i 2> error.$$name > result.$$name ; \ |
| 350 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
| 351 | diff $(srcdir)/result/errors/$$name result.$$name ; \ |
| 352 | diff $(srcdir)/result/errors/$$name.err error.$$name` ; \ |
| 353 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
| 354 | rm result.$$name error.$$name ; \ |
| 355 | fi ; fi ; done) |
| 356 | @echo "## Error cases stream regression tests" |
| 357 | -@(for i in $(srcdir)/test/errors/*.xml ; do \ |
| 358 | name=`basename $$i`; \ |
| 359 | if [ ! -d $$i ] ; then \ |
| 360 | if [ ! -f $(srcdir)/result/errors/$$name.str ] ; then \ |
| 361 | echo New test file $$name ; \ |
Daniel Veillard | 4a14fb8 | 2004-06-14 19:58:20 +0000 | [diff] [blame] | 362 | $(CHECKER) $(top_builddir)/xmllint --stream $$i \ |
Daniel Veillard | 522bc60 | 2004-02-21 11:53:09 +0000 | [diff] [blame] | 363 | 2> $(srcdir)/result/errors/$$name.str \ |
Daniel Veillard | b8590d4 | 2005-01-21 15:10:23 +0000 | [diff] [blame] | 364 | > /dev/null ; \ |
Daniel Veillard | 522bc60 | 2004-02-21 11:53:09 +0000 | [diff] [blame] | 365 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
| 366 | else \ |
Daniel Veillard | b8590d4 | 2005-01-21 15:10:23 +0000 | [diff] [blame] | 367 | log=`$(CHECKER) $(top_builddir)/xmllint --stream $$i 2> error.$$name > /dev/null ; \ |
Daniel Veillard | 522bc60 | 2004-02-21 11:53:09 +0000 | [diff] [blame] | 368 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 522bc60 | 2004-02-21 11:53:09 +0000 | [diff] [blame] | 369 | diff $(srcdir)/result/errors/$$name.str error.$$name` ; \ |
| 370 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | b8590d4 | 2005-01-21 15:10:23 +0000 | [diff] [blame] | 371 | rm error.$$name ; \ |
Daniel Veillard | 522bc60 | 2004-02-21 11:53:09 +0000 | [diff] [blame] | 372 | fi ; fi ; done) |
| 373 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 374 | Docbtests : xmllint$(EXEEXT) |
Daniel Veillard | 89cad53 | 2001-10-22 09:46:13 +0000 | [diff] [blame] | 375 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 376 | XMLenttests : xmllint$(EXEEXT) |
Daniel Veillard | 357c960 | 2001-05-03 10:49:20 +0000 | [diff] [blame] | 377 | @(echo > .memdump) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 378 | @echo "## XML entity subst regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 379 | -@(for i in $(srcdir)/test/* ; do \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 380 | name=`basename $$i`; \ |
Daniel Veillard | 011b63c | 1999-06-02 17:44:04 +0000 | [diff] [blame] | 381 | if [ ! -d $$i ] ; then \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 382 | if [ ! -f $(srcdir)/result/noent/$$name ] ; then \ |
| 383 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 384 | $(CHECKER) $(top_builddir)/xmllint --noent $$i > $(srcdir)/result/noent/$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 385 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 011b63c | 1999-06-02 17:44:04 +0000 | [diff] [blame] | 386 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 387 | log=`$(CHECKER) $(top_builddir)/xmllint --noent $$i 2>&1 > result.$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 388 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 389 | diff $(srcdir)/result/noent/$$name result.$$name ; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 390 | $(CHECKER) $(top_builddir)/xmllint --noent result.$$name 2>&1 > result2.$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 391 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 392 | diff result.$$name result2.$$name` ; \ |
| 393 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 394 | rm result.$$name result2.$$name ; \ |
Daniel Veillard | 011b63c | 1999-06-02 17:44:04 +0000 | [diff] [blame] | 395 | fi ; fi ; done) |
| 396 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 397 | URItests : testURI$(EXEEXT) |
Daniel Veillard | 357c960 | 2001-05-03 10:49:20 +0000 | [diff] [blame] | 398 | @(echo > .memdump) |
Daniel Veillard | 98a7916 | 2000-09-04 11:15:39 +0000 | [diff] [blame] | 399 | @echo "## URI module regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 400 | -@(for i in $(srcdir)/test/URI/*.data ; do \ |
Daniel Veillard | 98a7916 | 2000-09-04 11:15:39 +0000 | [diff] [blame] | 401 | name=`basename $$i`; \ |
| 402 | if [ ! -d $$i ] ; then \ |
| 403 | if [ ! -f $(srcdir)/result/URI/$$name ] ; then \ |
| 404 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 405 | $(CHECKER) $(top_builddir)/testURI -base 'http://foo.com/path/to/index.html?orig#help' < $$i > $(srcdir)/result/URI/$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 406 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 98a7916 | 2000-09-04 11:15:39 +0000 | [diff] [blame] | 407 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 408 | log=`$(CHECKER) $(top_builddir)/testURI -base 'http://foo.com/path/to/index.html?orig#help' < $$i 2>&1 > result.$$name ; \ |
Daniel Veillard | 98a7916 | 2000-09-04 11:15:39 +0000 | [diff] [blame] | 409 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 410 | diff $(srcdir)/result/URI/$$name result.$$name` ; \ |
| 411 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 98a7916 | 2000-09-04 11:15:39 +0000 | [diff] [blame] | 412 | rm result.$$name ; \ |
| 413 | fi ; fi ; done) |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 414 | -@(for i in $(srcdir)/test/URI/*.uri ; do \ |
Daniel Veillard | b6e7fdb | 2001-02-02 17:07:32 +0000 | [diff] [blame] | 415 | name=`basename $$i`; \ |
| 416 | if [ ! -d $$i ] ; then \ |
| 417 | if [ ! -f $(srcdir)/result/URI/$$name ] ; then \ |
| 418 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 419 | $(CHECKER) $(top_builddir)/testURI < $$i > $(srcdir)/result/URI/$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 420 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | b6e7fdb | 2001-02-02 17:07:32 +0000 | [diff] [blame] | 421 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 422 | log=`$(CHECKER) $(top_builddir)/testURI < $$i 2>&1 > result.$$name ; \ |
Daniel Veillard | b6e7fdb | 2001-02-02 17:07:32 +0000 | [diff] [blame] | 423 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 424 | diff $(srcdir)/result/URI/$$name result.$$name` ; \ |
| 425 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | b6e7fdb | 2001-02-02 17:07:32 +0000 | [diff] [blame] | 426 | rm result.$$name ; \ |
| 427 | fi ; fi ; done) |
Daniel Veillard | 98a7916 | 2000-09-04 11:15:39 +0000 | [diff] [blame] | 428 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 429 | XPathtests : testXPath$(EXEEXT) |
Daniel Veillard | 357c960 | 2001-05-03 10:49:20 +0000 | [diff] [blame] | 430 | @(echo > .memdump) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 431 | @echo "## XPath regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 432 | -@(if [ "`$(top_builddir)/testXPath | grep 'support not compiled in'`" != "" ] ; \ |
Daniel Veillard | 017b108 | 2001-06-21 11:20:21 +0000 | [diff] [blame] | 433 | then echo Skipping debug not compiled in ; exit 0 ; fi ; \ |
| 434 | for i in $(srcdir)/test/XPath/expr/* ; do \ |
Daniel Veillard | 1566d3a | 1999-07-15 14:24:29 +0000 | [diff] [blame] | 435 | name=`basename $$i`; \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 436 | if [ ! -d $$i ] ; then \ |
| 437 | if [ ! -f $(srcdir)/result/XPath/expr/$$name ] ; then \ |
| 438 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 439 | $(CHECKER) $(top_builddir)/testXPath -f --expr $$i > $(srcdir)/result/XPath/expr/$$name ; \ |
Daniel Veillard | 9e7160d | 2001-03-18 23:17:47 +0000 | [diff] [blame] | 440 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 1566d3a | 1999-07-15 14:24:29 +0000 | [diff] [blame] | 441 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 442 | log=`$(CHECKER) $(top_builddir)/testXPath -f --expr $$i 2>&1 > result.$$name ; \ |
Daniel Veillard | 9e7160d | 2001-03-18 23:17:47 +0000 | [diff] [blame] | 443 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 444 | diff $(srcdir)/result/XPath/expr/$$name result.$$name` ; \ |
| 445 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 446 | rm result.$$name ; \ |
Daniel Veillard | 017b108 | 2001-06-21 11:20:21 +0000 | [diff] [blame] | 447 | fi ; fi ; done ; \ |
| 448 | for i in $(srcdir)/test/XPath/docs/* ; do \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 449 | if [ ! -d $$i ] ; then \ |
| 450 | doc=`basename $$i`; \ |
| 451 | for j in $(srcdir)/test/XPath/tests/$$doc* ; do \ |
Daniel Veillard | c8df0aa | 2000-10-10 23:50:30 +0000 | [diff] [blame] | 452 | if [ ! -f $$j ] ; then continue ; fi ; \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 453 | name=`basename $$j`; \ |
| 454 | if [ ! -d $$j ] ; then \ |
| 455 | if [ ! -f $(srcdir)/result/XPath/tests/$$name ] ; then \ |
| 456 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 457 | $(CHECKER) $(top_builddir)/testXPath -f -i $$i $$j > $(srcdir)/result/XPath/tests/$$name ; \ |
Daniel Veillard | 9e7160d | 2001-03-18 23:17:47 +0000 | [diff] [blame] | 458 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 459 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 460 | log=`$(CHECKER) $(top_builddir)/testXPath -f -i $$i $$j 2>&1 > result.$$name ; \ |
Daniel Veillard | 9e7160d | 2001-03-18 23:17:47 +0000 | [diff] [blame] | 461 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 462 | diff $(srcdir)/result/XPath/tests/$$name result.$$name` ; \ |
| 463 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 464 | rm result.$$name ; \ |
Daniel Veillard | 1566d3a | 1999-07-15 14:24:29 +0000 | [diff] [blame] | 465 | fi ; fi ; done ; fi ; done) |
| 466 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 467 | XPtrtests : testXPath$(EXEEXT) |
Daniel Veillard | 357c960 | 2001-05-03 10:49:20 +0000 | [diff] [blame] | 468 | @(echo > .memdump) |
Daniel Veillard | c8df0aa | 2000-10-10 23:50:30 +0000 | [diff] [blame] | 469 | @echo "## XPointer regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 470 | -@(if [ "`$(top_builddir)/testXPath | grep 'support not compiled in'`" != "" ] ; \ |
Daniel Veillard | 017b108 | 2001-06-21 11:20:21 +0000 | [diff] [blame] | 471 | then echo Skipping debug not compiled in ; exit 0 ; fi ; \ |
| 472 | for i in $(srcdir)/test/XPath/docs/* ; do \ |
Daniel Veillard | c8df0aa | 2000-10-10 23:50:30 +0000 | [diff] [blame] | 473 | if [ ! -d $$i ] ; then \ |
| 474 | doc=`basename $$i`; \ |
| 475 | for j in $(srcdir)/test/XPath/xptr/$$doc* ; do \ |
| 476 | if [ ! -f $$j ] ; then continue ; fi ; \ |
| 477 | name=`basename $$j`; \ |
| 478 | if [ ! -d $$j ] ; then \ |
| 479 | if [ ! -f $(srcdir)/result/XPath/xptr/$$name ] ; then \ |
| 480 | echo New test file $$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 481 | $(CHECKER) $(top_builddir)/testXPath -xptr -f -i $$i $$j > $(srcdir)/result/XPath/xptr/$$name ; \ |
| 482 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | c8df0aa | 2000-10-10 23:50:30 +0000 | [diff] [blame] | 483 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 484 | log=`$(CHECKER) $(top_builddir)/testXPath -xptr -f -i $$i $$j 2>&1 > result.$$name ; \ |
Daniel Veillard | c8df0aa | 2000-10-10 23:50:30 +0000 | [diff] [blame] | 485 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 486 | diff $(srcdir)/result/XPath/xptr/$$name result.$$name` ; \ |
| 487 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | c8df0aa | 2000-10-10 23:50:30 +0000 | [diff] [blame] | 488 | rm result.$$name ; \ |
| 489 | fi ; fi ; done ; fi ; done) |
| 490 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 491 | XIncludetests : xmllint$(EXEEXT) |
Daniel Veillard | 357c960 | 2001-05-03 10:49:20 +0000 | [diff] [blame] | 492 | @(echo > .memdump) |
Daniel Veillard | bf43275 | 2000-11-12 15:56:56 +0000 | [diff] [blame] | 493 | @echo "## XInclude regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 494 | -@(for i in $(srcdir)/test/XInclude/docs/* ; do \ |
Daniel Veillard | bf43275 | 2000-11-12 15:56:56 +0000 | [diff] [blame] | 495 | name=`basename $$i`; \ |
| 496 | if [ ! -d $$i ] ; then \ |
| 497 | if [ ! -f $(srcdir)/result/XInclude/$$name ] ; then \ |
| 498 | echo New test file $$name ; \ |
Daniel Veillard | e74d2e1 | 2003-12-09 11:35:37 +0000 | [diff] [blame] | 499 | $(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude $$i > $(srcdir)/result/XInclude/$$name 2> $(srcdir)/result/XInclude/$$name.err ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 500 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | bf43275 | 2000-11-12 15:56:56 +0000 | [diff] [blame] | 501 | else \ |
Daniel Veillard | 1f8658a | 2004-08-14 21:46:31 +0000 | [diff] [blame] | 502 | log=`$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude $$i > result.$$name 2>error.$$name ; \ |
Daniel Veillard | bf43275 | 2000-11-12 15:56:56 +0000 | [diff] [blame] | 503 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | e74d2e1 | 2003-12-09 11:35:37 +0000 | [diff] [blame] | 504 | diff $(srcdir)/result/XInclude/$$name result.$$name ; \ |
| 505 | diff $(srcdir)/result/XInclude/$$name.err error.$$name` ; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 506 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | e74d2e1 | 2003-12-09 11:35:37 +0000 | [diff] [blame] | 507 | rm result.$$name error.$$name ; \ |
Daniel Veillard | bf43275 | 2000-11-12 15:56:56 +0000 | [diff] [blame] | 508 | fi ; fi ; done) |
Daniel Veillard | c14c389 | 2004-08-16 12:34:50 +0000 | [diff] [blame] | 509 | -@(for i in $(srcdir)/test/XInclude/docs/* ; do \ |
| 510 | name=`basename $$i`; \ |
| 511 | if [ ! -d $$i ] ; then \ |
| 512 | if [ ! -f $(srcdir)/result/XInclude/$$name ] ; then \ |
| 513 | echo New test file $$name ; \ |
| 514 | $(CHECKER) $(top_builddir)/xmllint --nowarning --noxincludenode $$i > $(srcdir)/result/XInclude/$$name 2> $(srcdir)/result/XInclude/$$name.err ; \ |
| 515 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 516 | else \ |
| 517 | log=`$(CHECKER) $(top_builddir)/xmllint --nowarning --noxincludenode $$i > result.$$name 2>error.$$name ; \ |
| 518 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 519 | diff $(srcdir)/result/XInclude/$$name result.$$name ; \ |
| 520 | diff $(srcdir)/result/XInclude/$$name.err error.$$name` ; \ |
| 521 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
| 522 | rm result.$$name error.$$name ; \ |
| 523 | fi ; fi ; done) |
Daniel Veillard | 7899c5c | 2003-11-03 12:31:38 +0000 | [diff] [blame] | 524 | @(echo > .memdump) |
| 525 | @echo "## XInclude xmlReader regression tests" |
| 526 | -@(for i in $(srcdir)/test/XInclude/docs/* ; do \ |
| 527 | name=`basename $$i`; \ |
| 528 | if [ ! -d $$i ] ; then \ |
| 529 | if [ ! -f $(srcdir)/result/XInclude/$$name.rdr ] ; then \ |
| 530 | echo New test file $$name ; \ |
William M. Brack | f20fbf7 | 2004-06-25 05:49:08 +0000 | [diff] [blame] | 531 | $(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --stream --debug $$i > $(srcdir)/result/XInclude/$$name.rdr ; \ |
Daniel Veillard | 7899c5c | 2003-11-03 12:31:38 +0000 | [diff] [blame] | 532 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 533 | else \ |
Daniel Veillard | 1f8658a | 2004-08-14 21:46:31 +0000 | [diff] [blame] | 534 | log=`$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --stream --debug $$i > result.$$name 2>error.$$name ; \ |
Daniel Veillard | 7899c5c | 2003-11-03 12:31:38 +0000 | [diff] [blame] | 535 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | e74d2e1 | 2003-12-09 11:35:37 +0000 | [diff] [blame] | 536 | diff $(srcdir)/result/XInclude/$$name.err error.$$name ; \ |
Daniel Veillard | 7899c5c | 2003-11-03 12:31:38 +0000 | [diff] [blame] | 537 | diff $(srcdir)/result/XInclude/$$name.rdr result.$$name` ; \ |
| 538 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | e74d2e1 | 2003-12-09 11:35:37 +0000 | [diff] [blame] | 539 | rm result.$$name error.$$name ; \ |
Daniel Veillard | 7899c5c | 2003-11-03 12:31:38 +0000 | [diff] [blame] | 540 | fi ; fi ; done) |
Daniel Veillard | c14c389 | 2004-08-16 12:34:50 +0000 | [diff] [blame] | 541 | -@(for i in $(srcdir)/test/XInclude/docs/* ; do \ |
| 542 | name=`basename $$i`; \ |
| 543 | if [ ! -d $$i ] ; then \ |
| 544 | if [ ! -f $(srcdir)/result/XInclude/$$name.rdr ] ; then \ |
| 545 | echo New test file $$name ; \ |
| 546 | $(CHECKER) $(top_builddir)/xmllint --nowarning --noxincludenode --stream --debug $$i > $(srcdir)/result/XInclude/$$name.rdr ; \ |
| 547 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 548 | else \ |
| 549 | log=`$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --stream --debug $$i > result.$$name 2>error.$$name ; \ |
| 550 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 551 | diff $(srcdir)/result/XInclude/$$name.err error.$$name ; \ |
| 552 | diff $(srcdir)/result/XInclude/$$name.rdr result.$$name` ; \ |
| 553 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
| 554 | rm result.$$name error.$$name ; \ |
| 555 | fi ; fi ; done) |
Daniel Veillard | bf43275 | 2000-11-12 15:56:56 +0000 | [diff] [blame] | 556 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 557 | Scripttests : xmllint$(EXEEXT) |
Daniel Veillard | b8c9be9 | 2001-07-09 16:01:19 +0000 | [diff] [blame] | 558 | @(echo > .memdump) |
Daniel Veillard | b8c9be9 | 2001-07-09 16:01:19 +0000 | [diff] [blame] | 559 | @echo "## Scripts regression tests" |
| 560 | @echo "## Some of the base computations may be different if srcdir != ." |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 561 | -@(for i in $(srcdir)/test/scripts/*.script ; do \ |
Daniel Veillard | b8c9be9 | 2001-07-09 16:01:19 +0000 | [diff] [blame] | 562 | name=`basename $$i .script`; \ |
| 563 | xml=$(srcdir)/test/scripts/`basename $$i .script`.xml; \ |
| 564 | if [ -f $$xml ] ; then \ |
| 565 | if [ ! -f $(srcdir)/result/scripts/$$name ] ; then \ |
| 566 | echo New test file $$name ; \ |
Daniel Veillard | 29b1748 | 2004-08-16 00:39:03 +0000 | [diff] [blame] | 567 | $(CHECKER) $(top_builddir)/xmllint --shell $$xml < $$i > $(srcdir)/result/scripts/$$name 2> $(srcdir)/result/scripts/$$name.err ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 568 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | b8c9be9 | 2001-07-09 16:01:19 +0000 | [diff] [blame] | 569 | else \ |
Daniel Veillard | 29b1748 | 2004-08-16 00:39:03 +0000 | [diff] [blame] | 570 | log=`$(CHECKER) $(top_builddir)/xmllint --shell $$xml < $$i > result.$$name 2> result.$$name.err ; \ |
Daniel Veillard | b8c9be9 | 2001-07-09 16:01:19 +0000 | [diff] [blame] | 571 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 29b1748 | 2004-08-16 00:39:03 +0000 | [diff] [blame] | 572 | diff $(srcdir)/result/scripts/$$name result.$$name ; \ |
| 573 | diff $(srcdir)/result/scripts/$$name.err result.$$name.err` ; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 574 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 29b1748 | 2004-08-16 00:39:03 +0000 | [diff] [blame] | 575 | rm result.$$name result.$$name.err ; \ |
Daniel Veillard | b8c9be9 | 2001-07-09 16:01:19 +0000 | [diff] [blame] | 576 | fi ; fi ; done) |
| 577 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 578 | Catatests : xmlcatalog$(EXEEXT) |
Daniel Veillard | cda9692 | 2001-08-21 10:56:31 +0000 | [diff] [blame] | 579 | @(echo > .memdump) |
Daniel Veillard | cda9692 | 2001-08-21 10:56:31 +0000 | [diff] [blame] | 580 | @echo "## Catalog regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 581 | -@(for i in $(srcdir)/test/catalogs/*.script ; do \ |
Daniel Veillard | cda9692 | 2001-08-21 10:56:31 +0000 | [diff] [blame] | 582 | name=`basename $$i .script`; \ |
| 583 | xml=$(srcdir)/test/catalogs/`basename $$i .script`.xml; \ |
| 584 | if [ -f $$xml ] ; then \ |
| 585 | if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \ |
| 586 | echo New test file $$name ; \ |
William M. Brack | f20fbf7 | 2004-06-25 05:49:08 +0000 | [diff] [blame] | 587 | $(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > $(srcdir)/result/catalogs/$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 588 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | cda9692 | 2001-08-21 10:56:31 +0000 | [diff] [blame] | 589 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 590 | log=`$(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > result.$$name ; \ |
Daniel Veillard | cda9692 | 2001-08-21 10:56:31 +0000 | [diff] [blame] | 591 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 592 | diff $(srcdir)/result/catalogs/$$name result.$$name` ; \ |
| 593 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | cda9692 | 2001-08-21 10:56:31 +0000 | [diff] [blame] | 594 | rm result.$$name ; \ |
| 595 | fi ; fi ; done) |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 596 | -@(for i in $(srcdir)/test/catalogs/*.script ; do \ |
Daniel Veillard | c853b32 | 2001-11-06 15:24:37 +0000 | [diff] [blame] | 597 | name=`basename $$i .script`; \ |
| 598 | sgml=$(srcdir)/test/catalogs/`basename $$i .script`.sgml; \ |
| 599 | if [ -f $$sgml ] ; then \ |
| 600 | if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \ |
| 601 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 602 | $(CHECKER) $(top_builddir)/xmlcatalog --shell $$sgml < $$i > $(srcdir)/result/catalogs/$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 603 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | c853b32 | 2001-11-06 15:24:37 +0000 | [diff] [blame] | 604 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 605 | log=`$(CHECKER) $(top_builddir)/xmlcatalog --shell $$sgml < $$i > result.$$name ; \ |
Daniel Veillard | c853b32 | 2001-11-06 15:24:37 +0000 | [diff] [blame] | 606 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 607 | diff $(srcdir)/result/catalogs/$$name result.$$name` ; \ |
| 608 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | c853b32 | 2001-11-06 15:24:37 +0000 | [diff] [blame] | 609 | rm result.$$name ; \ |
| 610 | fi ; fi ; done) |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 611 | @echo "## Add and del operations on XML Catalogs" |
Daniel Veillard | 66651aa | 2002-11-15 11:21:43 +0000 | [diff] [blame] | 612 | -@($(CHECKER) $(top_builddir)/xmlcatalog --create --noout $(srcdir)/result/catalogs/mycatalog; \ |
Daniel Veillard | c853b32 | 2001-11-06 15:24:37 +0000 | [diff] [blame] | 613 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 66651aa | 2002-11-15 11:21:43 +0000 | [diff] [blame] | 614 | $(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid sysid $(srcdir)/result/catalogs/mycatalog; \ |
Daniel Veillard | c853b32 | 2001-11-06 15:24:37 +0000 | [diff] [blame] | 615 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 66651aa | 2002-11-15 11:21:43 +0000 | [diff] [blame] | 616 | $(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid2 sysid2 $(srcdir)/result/catalogs/mycatalog; \ |
Daniel Veillard | c853b32 | 2001-11-06 15:24:37 +0000 | [diff] [blame] | 617 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 66651aa | 2002-11-15 11:21:43 +0000 | [diff] [blame] | 618 | $(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid3 sysid3 $(srcdir)/result/catalogs/mycatalog; \ |
Daniel Veillard | c853b32 | 2001-11-06 15:24:37 +0000 | [diff] [blame] | 619 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 66651aa | 2002-11-15 11:21:43 +0000 | [diff] [blame] | 620 | diff result/catalogs/mycatalog.full $(srcdir)/result/catalogs/mycatalog; \ |
Daniel Veillard | c853b32 | 2001-11-06 15:24:37 +0000 | [diff] [blame] | 621 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 66651aa | 2002-11-15 11:21:43 +0000 | [diff] [blame] | 622 | $(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid $(srcdir)/result/catalogs/mycatalog; \ |
Daniel Veillard | c853b32 | 2001-11-06 15:24:37 +0000 | [diff] [blame] | 623 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 66651aa | 2002-11-15 11:21:43 +0000 | [diff] [blame] | 624 | $(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid3 $(srcdir)/result/catalogs/mycatalog; \ |
Daniel Veillard | c853b32 | 2001-11-06 15:24:37 +0000 | [diff] [blame] | 625 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 66651aa | 2002-11-15 11:21:43 +0000 | [diff] [blame] | 626 | $(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid2 $(srcdir)/result/catalogs/mycatalog; \ |
Daniel Veillard | c853b32 | 2001-11-06 15:24:37 +0000 | [diff] [blame] | 627 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 66651aa | 2002-11-15 11:21:43 +0000 | [diff] [blame] | 628 | diff result/catalogs/mycatalog.empty $(srcdir)/result/catalogs/mycatalog; \ |
Daniel Veillard | c853b32 | 2001-11-06 15:24:37 +0000 | [diff] [blame] | 629 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 66651aa | 2002-11-15 11:21:43 +0000 | [diff] [blame] | 630 | rm -f $(srcdir)/result/catalogs/mycatalog) |
Daniel Veillard | cda9692 | 2001-08-21 10:56:31 +0000 | [diff] [blame] | 631 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 632 | SVGtests : xmllint$(EXEEXT) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 633 | @echo "## SVG parsing regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 634 | -@(for i in $(srcdir)/test/SVG/* ; do \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 635 | name=`basename $$i`; \ |
Daniel Veillard | 011b63c | 1999-06-02 17:44:04 +0000 | [diff] [blame] | 636 | if [ ! -d $$i ] ; then \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 637 | if [ ! -f $(srcdir)/result/SVG/$$name ] ; then \ |
| 638 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 639 | $(CHECKER) $(top_builddir)/xmllint $$i > $(srcdir)/result/SVG/$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 640 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 011b63c | 1999-06-02 17:44:04 +0000 | [diff] [blame] | 641 | else \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 642 | echo Testing $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 643 | $(CHECKER) $(top_builddir)/xmllint $$i > result.$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 644 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 645 | diff $(srcdir)/result/SVG/$$name result.$$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 646 | $(CHECKER) $(top_builddir)/xmllint result.$$name > result2.$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 647 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 648 | diff result.$$name result2.$$name ; \ |
| 649 | rm result.$$name result2.$$name ; \ |
Daniel Veillard | 011b63c | 1999-06-02 17:44:04 +0000 | [diff] [blame] | 650 | fi ; fi ; done) |
| 651 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 652 | Threadtests : testThreads$(EXEEXT) |
Daniel Veillard | ab7488e | 2001-10-17 11:30:37 +0000 | [diff] [blame] | 653 | @echo "## Threaded regression tests" |
Daniel Veillard | bb5abab | 2003-10-03 22:21:51 +0000 | [diff] [blame] | 654 | -@($(CHECKER) $(top_builddir)/testThreads ; \ |
| 655 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
| 656 | exit 0) |
Daniel Veillard | ab7488e | 2001-10-17 11:30:37 +0000 | [diff] [blame] | 657 | |
Daniel Veillard | 81514ba | 2003-09-16 23:17:26 +0000 | [diff] [blame] | 658 | Readertests : xmllint$(EXEEXT) |
Daniel Veillard | 8a44e59 | 2003-09-15 14:50:06 +0000 | [diff] [blame] | 659 | @(echo > .memdump) |
Daniel Veillard | 8a44e59 | 2003-09-15 14:50:06 +0000 | [diff] [blame] | 660 | @echo "## Reader regression tests" |
Daniel Veillard | 8a44e59 | 2003-09-15 14:50:06 +0000 | [diff] [blame] | 661 | -@(for i in $(srcdir)/test/* ; do \ |
| 662 | name=`basename $$i`; \ |
| 663 | if [ ! -d $$i ] ; then \ |
| 664 | if [ ! -f $(srcdir)/result/$$name.rdr ] ; then \ |
| 665 | echo New test file $$name ; \ |
| 666 | $(CHECKER) $(top_builddir)/xmllint --nonet --debug --stream $$i > $(srcdir)/result/$$name.rdr 2>/dev/null ; \ |
| 667 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 668 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 669 | log=`$(CHECKER) $(top_builddir)/xmllint --nonet --debug --stream $$i > result.$$name 2>/dev/null ; \ |
Daniel Veillard | 8a44e59 | 2003-09-15 14:50:06 +0000 | [diff] [blame] | 670 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 671 | diff $(srcdir)/result/$$name.rdr result.$$name` ; \ |
| 672 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 8a44e59 | 2003-09-15 14:50:06 +0000 | [diff] [blame] | 673 | rm result.$$name ; \ |
| 674 | fi ; fi ; done) |
Daniel Veillard | 5335055 | 2003-09-18 13:35:51 +0000 | [diff] [blame] | 675 | @echo "## Reader on memory regression tests" |
Daniel Veillard | 5335055 | 2003-09-18 13:35:51 +0000 | [diff] [blame] | 676 | -@(for i in $(srcdir)/test/* ; do \ |
| 677 | name=`basename $$i`; \ |
| 678 | if [ ! -d $$i ] ; then \ |
| 679 | if [ ! -f $(srcdir)/result/$$name.rdr ] ; then \ |
| 680 | echo New test file $$name ; \ |
| 681 | $(CHECKER) $(top_builddir)/xmllint --memory --nonet --debug --stream $$i > $(srcdir)/result/$$name.rdr 2>/dev/null ; \ |
| 682 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 683 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 684 | log=`$(CHECKER) $(top_builddir)/xmllint --memory --nonet --debug --stream $$i > result.$$name 2>/dev/null ; \ |
Daniel Veillard | 5335055 | 2003-09-18 13:35:51 +0000 | [diff] [blame] | 685 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 686 | diff $(srcdir)/result/$$name.rdr result.$$name` ; \ |
| 687 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 5335055 | 2003-09-18 13:35:51 +0000 | [diff] [blame] | 688 | rm result.$$name ; \ |
| 689 | fi ; fi ; done) |
Daniel Veillard | 7899c5c | 2003-11-03 12:31:38 +0000 | [diff] [blame] | 690 | @(echo > .memdump) |
| 691 | @echo "## Walker regression tests" |
| 692 | -@(for i in $(srcdir)/test/* ; do \ |
| 693 | name=`basename $$i`; \ |
| 694 | if [ ! -d $$i ] ; then \ |
| 695 | if [ ! -f $(srcdir)/result/$$name.rdr ] ; then \ |
| 696 | echo New test file $$name ; \ |
| 697 | $(CHECKER) $(top_builddir)/xmllint --nonet --debug --walker $$i > $(srcdir)/result/$$name.rdr 2>/dev/null ; \ |
| 698 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 699 | else \ |
| 700 | log=`$(CHECKER) $(top_builddir)/xmllint --nonet --debug --walker $$i > result.$$name 2>/dev/null ; \ |
| 701 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 702 | diff $(srcdir)/result/$$name.rdr result.$$name` ; \ |
| 703 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
| 704 | rm result.$$name ; \ |
| 705 | fi ; fi ; done) |
Daniel Veillard | 0df3bc3 | 2004-06-08 12:03:41 +0000 | [diff] [blame] | 706 | @echo "## Reader entities substitution regression tests" |
| 707 | -@(for i in $(srcdir)/test/* ; do \ |
| 708 | name=`basename $$i`; \ |
| 709 | if [ ! -d $$i ] ; then \ |
| 710 | if [ ! -f $(srcdir)/result/$$name.rde ] ; then \ |
| 711 | echo New test file $$name ; \ |
| 712 | $(CHECKER) $(top_builddir)/xmllint --noent --nonet --debug --stream $$i > $(srcdir)/result/$$name.rde 2>/dev/null ; \ |
| 713 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 714 | else \ |
| 715 | log=`$(CHECKER) $(top_builddir)/xmllint --noent --nonet --debug --stream $$i > result.$$name 2>/dev/null ; \ |
| 716 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 717 | diff $(srcdir)/result/$$name.rde result.$$name` ; \ |
| 718 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
| 719 | rm result.$$name ; \ |
| 720 | fi ; fi ; done) |
| 721 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 722 | SAXtests : testSAX$(EXEEXT) |
Daniel Veillard | 357c960 | 2001-05-03 10:49:20 +0000 | [diff] [blame] | 723 | @(echo > .memdump) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 724 | @echo "## SAX callbacks regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 725 | -@(for i in $(srcdir)/test/* ; do \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 726 | name=`basename $$i`; \ |
| 727 | if [ ! -d $$i ] ; then \ |
Daniel Veillard | 4b1577f | 2003-09-03 13:10:37 +0000 | [diff] [blame] | 728 | if [ ! -f $(srcdir)/result/$$name.sax ] ; then \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 729 | echo New test file $$name ; \ |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 730 | $(CHECKER) $(top_builddir)/testSAX $$i > $(srcdir)/result/$$name.sax 2> /dev/null ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 731 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 732 | else \ |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 733 | log=`$(CHECKER) $(top_builddir)/testSAX $$i > result.$$name 2> /dev/null ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 734 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 735 | diff $(srcdir)/result/$$name.sax result.$$name` ; \ |
| 736 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 737 | rm result.$$name ; \ |
| 738 | fi ; fi ; done) |
Arturo Espinosa | 15fe6e7 | 1998-09-07 17:27:57 +0000 | [diff] [blame] | 739 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 740 | Validtests : xmllint$(EXEEXT) |
Daniel Veillard | 357c960 | 2001-05-03 10:49:20 +0000 | [diff] [blame] | 741 | @(echo > .memdump) |
Daniel Veillard | dab4cb3 | 2001-04-20 13:03:48 +0000 | [diff] [blame] | 742 | @echo "## Valid documents regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 743 | -@(for i in $(srcdir)/test/VCM/* ; do \ |
Daniel Veillard | dab4cb3 | 2001-04-20 13:03:48 +0000 | [diff] [blame] | 744 | name=`basename $$i`; \ |
| 745 | if [ ! -d $$i ] ; then \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 746 | log=`$(CHECKER) $(top_builddir)/xmllint --valid --noout --nowarning $$i ; \ |
| 747 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"`;\ |
| 748 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | dab4cb3 | 2001-04-20 13:03:48 +0000 | [diff] [blame] | 749 | fi ; done ; exit 0) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 750 | @echo "## Validity checking regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 751 | -@(for i in $(srcdir)/test/VC/* ; do \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 752 | name=`basename $$i`; \ |
| 753 | if [ ! -d $$i ] ; then \ |
| 754 | if [ ! -f $(srcdir)/result/VC/$$name ] ; then \ |
| 755 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 756 | $(CHECKER) $(top_builddir)/xmllint --noout --valid $$i 2> $(srcdir)/result/VC/$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 757 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 758 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 759 | log=`$(CHECKER) $(top_builddir)/xmllint --noout --valid $$i 2> result.$$name ; \ |
Daniel Veillard | dab4cb3 | 2001-04-20 13:03:48 +0000 | [diff] [blame] | 760 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 761 | diff $(srcdir)/result/VC/$$name result.$$name` ; \ |
| 762 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 763 | rm result.$$name ; \ |
| 764 | fi ; fi ; done) |
Daniel Veillard | dab4cb3 | 2001-04-20 13:03:48 +0000 | [diff] [blame] | 765 | @echo "## General documents valid regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 766 | -@(for i in $(srcdir)/test/valid/* ; do \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 767 | name=`basename $$i`; \ |
| 768 | if [ ! -d $$i ] ; then \ |
| 769 | if [ ! -f $(srcdir)/result/valid/$$name ] ; then \ |
| 770 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 771 | $(CHECKER) $(top_builddir)/xmllint --valid $$i > $(srcdir)/result/valid/$$name 2>$(srcdir)/result/valid/$$name.err ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 772 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 773 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 774 | log=`$(CHECKER) $(top_builddir)/xmllint --valid $$i > result.$$name 2>error.$$name ; \ |
Daniel Veillard | dab4cb3 | 2001-04-20 13:03:48 +0000 | [diff] [blame] | 775 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 776 | diff $(srcdir)/result/valid/$$name result.$$name ; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 777 | diff $(srcdir)/result/valid/$$name.err error.$$name` ; \ |
| 778 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 3500838 | 1999-10-25 13:15:52 +0000 | [diff] [blame] | 779 | rm result.$$name error.$$name ; \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 780 | fi ; fi ; done) |
Arturo Espinosa | 15fe6e7 | 1998-09-07 17:27:57 +0000 | [diff] [blame] | 781 | |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 782 | Regexptests: testRegexp$(EXEEXT) |
| 783 | @(echo > .memdump) |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 784 | @echo "## Regexp regression tests" |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 785 | -@(for i in $(srcdir)/test/regexp/* ; do \ |
| 786 | name=`basename $$i`; \ |
| 787 | if [ ! -d $$i ] ; then \ |
| 788 | if [ ! -f $(srcdir)/result/regexp/$$name ] ; then \ |
| 789 | echo New test file $$name ; \ |
| 790 | $(CHECKER) $(top_builddir)/testRegexp -i $$i > $(srcdir)/result/regexp/$$name; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 791 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 792 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 793 | log=`$(CHECKER) $(top_builddir)/testRegexp -i $$i 2>&1 > result.$$name ; \ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 794 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 795 | diff $(srcdir)/result/regexp/$$name result.$$name` ; \ |
| 796 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 797 | rm result.$$name ; \ |
| 798 | fi ; fi ; done) |
| 799 | |
| 800 | Automatatests: testAutomata$(EXEEXT) |
| 801 | @(echo > .memdump) |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 802 | @echo "## Automata regression tests" |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 803 | -@(for i in $(srcdir)/test/automata/* ; do \ |
| 804 | name=`basename $$i`; \ |
| 805 | if [ ! -d $$i ] ; then \ |
| 806 | if [ ! -f $(srcdir)/result/automata/$$name ] ; then \ |
| 807 | echo New test file $$name ; \ |
| 808 | $(CHECKER) $(top_builddir)/testAutomata $$i > $(srcdir)/result/automata/$$name; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 809 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 810 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 811 | log=`$(CHECKER) $(top_builddir)/testAutomata $$i 2>&1 > result.$$name ; \ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 812 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 813 | diff $(srcdir)/result/automata/$$name result.$$name` ; \ |
| 814 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 815 | rm result.$$name ; \ |
| 816 | fi ; fi ; done) |
| 817 | |
Daniel Veillard | f6bc7c2 | 2003-09-17 22:33:22 +0000 | [diff] [blame] | 818 | $(srcdir)/dba100000.xml: dbgenattr.pl |
| 819 | @echo "## generating dba100000.xml" |
William M. Brack | 1826d0a | 2004-07-21 09:03:57 +0000 | [diff] [blame] | 820 | @($(PERL) $(top_srcdir)/dbgenattr.pl 100000 > $(srcdir)/dba100000.xml) |
Daniel Veillard | f6bc7c2 | 2003-09-17 22:33:22 +0000 | [diff] [blame] | 821 | |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 822 | Timingtests: xmllint$(EXEEXT) $(srcdir)/dba100000.xml |
Daniel Veillard | f6bc7c2 | 2003-09-17 22:33:22 +0000 | [diff] [blame] | 823 | @echo "## Timing tests to try to detect performance" |
| 824 | @echo "## as well a memory usage breakage when streaming" |
Daniel Veillard | e96a2a4 | 2003-09-24 21:23:56 +0000 | [diff] [blame] | 825 | @echo "## 1/ using the file interface" |
| 826 | @echo "## 2/ using the memory interface" |
| 827 | @echo "## 3/ repeated DOM parsing" |
| 828 | @echo "## 4/ repeated DOM validation" |
Daniel Veillard | c74859e | 2004-02-26 09:57:32 +0000 | [diff] [blame] | 829 | -@($(top_builddir)/xmllint --stream --timing $(srcdir)/dba100000.xml; \ |
Daniel Veillard | d9e9c9d | 2003-09-18 22:03:46 +0000 | [diff] [blame] | 830 | MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\ |
| 831 | if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \ |
Daniel Veillard | f6bc7c2 | 2003-09-17 22:33:22 +0000 | [diff] [blame] | 832 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 833 | exit 0) |
Daniel Veillard | c74859e | 2004-02-26 09:57:32 +0000 | [diff] [blame] | 834 | -@($(top_builddir)/xmllint --stream --timing --memory $(srcdir)/dba100000.xml; \ |
Daniel Veillard | d9e9c9d | 2003-09-18 22:03:46 +0000 | [diff] [blame] | 835 | MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\ |
| 836 | if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \ |
Daniel Veillard | f6bc7c2 | 2003-09-17 22:33:22 +0000 | [diff] [blame] | 837 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 838 | exit 0) |
Daniel Veillard | c74859e | 2004-02-26 09:57:32 +0000 | [diff] [blame] | 839 | -@($(top_builddir)/xmllint --noout --timing --repeat $(srcdir)/test/valid/REC-xml-19980210.xml; \ |
Daniel Veillard | e96a2a4 | 2003-09-24 21:23:56 +0000 | [diff] [blame] | 840 | MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\ |
| 841 | if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \ |
| 842 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 843 | exit 0) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 844 | |
| 845 | VTimingtests: xmllint$(EXEEXT) |
Daniel Veillard | c74859e | 2004-02-26 09:57:32 +0000 | [diff] [blame] | 846 | -@($(top_builddir)/xmllint --noout --timing --valid --repeat $(srcdir)/test/valid/REC-xml-19980210.xml; \ |
Daniel Veillard | e96a2a4 | 2003-09-24 21:23:56 +0000 | [diff] [blame] | 847 | MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\ |
| 848 | if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \ |
| 849 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 850 | exit 0) |
Daniel Veillard | f6bc7c2 | 2003-09-17 22:33:22 +0000 | [diff] [blame] | 851 | |
Aleksey Sanin | 508a101 | 2002-05-31 06:32:32 +0000 | [diff] [blame] | 852 | C14Ntests : testC14N$(EXEEXT) |
Aleksey Sanin | f8cb6dd | 2002-06-04 04:27:06 +0000 | [diff] [blame] | 853 | @echo "## C14N and XPath regression tests" |
Aleksey Sanin | 508a101 | 2002-05-31 06:32:32 +0000 | [diff] [blame] | 854 | -@(for m in with-comments without-comments exc-without-comments ; do \ |
Aleksey Sanin | 508a101 | 2002-05-31 06:32:32 +0000 | [diff] [blame] | 855 | for i in $(srcdir)/test/c14n/$$m/*.xml ; do \ |
| 856 | if [ ! -d $$i ] ; then \ |
| 857 | name=`basename $$i .xml`; \ |
Aleksey Sanin | f8cb6dd | 2002-06-04 04:27:06 +0000 | [diff] [blame] | 858 | cmdline="$(CHECKER) $(top_builddir)/testC14N --$$m $$i"; \ |
Daniel Veillard | 6318673 | 2002-10-15 08:43:17 +0000 | [diff] [blame] | 859 | if [ -f $(srcdir)/test/c14n/$$m/$$name.xpath ] ; then \ |
Aleksey Sanin | f8cb6dd | 2002-06-04 04:27:06 +0000 | [diff] [blame] | 860 | cmdline="$$cmdline $(srcdir)/test/c14n/$$m/$$name.xpath"; \ |
Daniel Veillard | 6318673 | 2002-10-15 08:43:17 +0000 | [diff] [blame] | 861 | if [ -f $(srcdir)/test/c14n/$$m/$$name.ns ] ; then \ |
Aleksey Sanin | f8cb6dd | 2002-06-04 04:27:06 +0000 | [diff] [blame] | 862 | cmdline="$$cmdline '`cat $(srcdir)/test/c14n/$$m/$$name.ns`'"; \ |
| 863 | fi; \ |
Aleksey Sanin | 508a101 | 2002-05-31 06:32:32 +0000 | [diff] [blame] | 864 | fi; \ |
Aleksey Sanin | f8cb6dd | 2002-06-04 04:27:06 +0000 | [diff] [blame] | 865 | $$cmdline > $(srcdir)/test/c14n/test.tmp; \ |
Aleksey Sanin | 508a101 | 2002-05-31 06:32:32 +0000 | [diff] [blame] | 866 | if [ $$? -eq 0 ]; then \ |
Aleksey Sanin | c57f9c1 | 2002-05-31 19:14:57 +0000 | [diff] [blame] | 867 | diff $(srcdir)/result/c14n/$$m/$$name $(srcdir)/test/c14n/test.tmp; \ |
Aleksey Sanin | 508a101 | 2002-05-31 06:32:32 +0000 | [diff] [blame] | 868 | if [ $$? -ne 0 ]; then \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 869 | echo "Test $$m/$$name failed"; \ |
Aleksey Sanin | f8cb6dd | 2002-06-04 04:27:06 +0000 | [diff] [blame] | 870 | cat $(srcdir)/test/c14n/test.tmp; \ |
Aleksey Sanin | 508a101 | 2002-05-31 06:32:32 +0000 | [diff] [blame] | 871 | fi; \ |
| 872 | else \ |
| 873 | echo "C14N failed"; \ |
| 874 | fi; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 875 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Aleksey Sanin | 508a101 | 2002-05-31 06:32:32 +0000 | [diff] [blame] | 876 | fi; \ |
| 877 | rm -f $(srcdir)/test/c14n/test.tmp; \ |
| 878 | done; \ |
| 879 | done) |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 880 | |
| 881 | Schemastests: testSchemas$(EXEEXT) |
| 882 | @(echo > .memdump) |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 883 | @echo "## Schemas regression tests" |
Daniel Veillard | 8651f53 | 2002-04-17 09:06:27 +0000 | [diff] [blame] | 884 | -@(for i in $(srcdir)/test/schemas/*_*.xsd ; do \ |
| 885 | name=`basename $$i | sed 's+_.*++'`; \ |
| 886 | sno=`basename $$i | sed 's+.*_\(.*\).xsd+\1+'`; \ |
| 887 | for j in $(srcdir)/test/schemas/"$$name"_*.xml ; do \ |
Daniel Veillard | 5add868 | 2003-03-10 13:13:58 +0000 | [diff] [blame] | 888 | if [ -f $$j ] ; then \ |
Daniel Veillard | 8651f53 | 2002-04-17 09:06:27 +0000 | [diff] [blame] | 889 | xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \ |
| 890 | if [ ! -f $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno" ]; \ |
| 891 | then \ |
Daniel Veillard | 6231e84 | 2002-04-18 11:54:04 +0000 | [diff] [blame] | 892 | echo New test file "$$name"_"$$sno"_"$$xno" ; \ |
Daniel Veillard | 8651f53 | 2002-04-17 09:06:27 +0000 | [diff] [blame] | 893 | $(CHECKER) $(top_builddir)/testSchemas $$i $$j \ |
| 894 | > $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno" \ |
| 895 | 2> $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno".err; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 896 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 8651f53 | 2002-04-17 09:06:27 +0000 | [diff] [blame] | 897 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 898 | log=`$(CHECKER) $(top_builddir)/testSchemas $$i $$j \ |
Daniel Veillard | 8651f53 | 2002-04-17 09:06:27 +0000 | [diff] [blame] | 899 | > res.$$name 2> err.$$name;\ |
| 900 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 901 | diff $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno" \ |
| 902 | res.$$name;\ |
| 903 | diff $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno".err \ |
| 904 | err.$$name;\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 905 | grep Unimplemented err.$$name`; \ |
| 906 | if [ -n "$$log" ] ; then echo "$$name"_"$$sno"_"$$xno" result ; echo $$log ; fi ; \ |
Daniel Veillard | 8651f53 | 2002-04-17 09:06:27 +0000 | [diff] [blame] | 907 | rm res.$$name err.$$name ; \ |
Daniel Veillard | 5add868 | 2003-03-10 13:13:58 +0000 | [diff] [blame] | 908 | fi ; fi ;\ |
Daniel Veillard | 8651f53 | 2002-04-17 09:06:27 +0000 | [diff] [blame] | 909 | done; done) |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 910 | |
Daniel Veillard | 71531f3 | 2003-02-05 13:19:53 +0000 | [diff] [blame] | 911 | Relaxtests: xmllint$(EXEEXT) |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 912 | @(echo > .memdump) |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 913 | @echo "## Relax-NG regression tests" |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 914 | -@(for i in $(srcdir)/test/relaxng/*.rng ; do \ |
| 915 | name=`basename $$i | sed 's+\.rng++'`; \ |
Daniel Veillard | 231d791 | 2003-02-09 14:22:17 +0000 | [diff] [blame] | 916 | if [ ! -f $(srcdir)/result/relaxng/"$$name"_valid ] ; then \ |
| 917 | echo New schemas $$name ; \ |
| 918 | $(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $(srcdir)/test/relaxng/tutorA.rng $$i \ |
| 919 | > $(srcdir)/result/relaxng/"$$name"_valid \ |
| 920 | 2> $(srcdir)/result/relaxng/"$$name"_err; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 921 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 231d791 | 2003-02-09 14:22:17 +0000 | [diff] [blame] | 922 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 923 | log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $(srcdir)/test/relaxng/tutorA.rng $$i \ |
Daniel Veillard | 231d791 | 2003-02-09 14:22:17 +0000 | [diff] [blame] | 924 | > res.$$name 2> err.$$name;\ |
| 925 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 926 | diff $(srcdir)/result/relaxng/"$$name"_valid \ |
| 927 | res.$$name;\ |
| 928 | diff $(srcdir)/result/relaxng/"$$name"_err \ |
| 929 | err.$$name | grep -v "error detected at";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 930 | grep Unimplemented err.$$name`; \ |
| 931 | if [ -n "$$log" ] ; then echo schemas $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 231d791 | 2003-02-09 14:22:17 +0000 | [diff] [blame] | 932 | rm res.$$name err.$$name ; \ |
| 933 | fi; \ |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 934 | for j in $(srcdir)/test/relaxng/"$$name"_*.xml ; do \ |
| 935 | if [ -f $$j ] ; then \ |
| 936 | xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \ |
| 937 | if [ ! -f $(srcdir)/result/relaxng/"$$name"_"$$xno" ]; \ |
| 938 | then \ |
| 939 | echo New test file "$$name"_"$$xno" ; \ |
Daniel Veillard | 71531f3 | 2003-02-05 13:19:53 +0000 | [diff] [blame] | 940 | $(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $$i $$j \ |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 941 | > $(srcdir)/result/relaxng/"$$name"_"$$xno" \ |
| 942 | 2> $(srcdir)/result/relaxng/"$$name"_"$$xno".err; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 943 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 944 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 945 | log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $$i $$j \ |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 946 | > res.$$name 2> err.$$name;\ |
| 947 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 948 | diff $(srcdir)/result/relaxng/"$$name"_"$$xno" \ |
| 949 | res.$$name;\ |
| 950 | diff $(srcdir)/result/relaxng/"$$name"_"$$xno".err \ |
Daniel Veillard | d41f4f4 | 2003-01-29 21:07:52 +0000 | [diff] [blame] | 951 | err.$$name | grep -v "error detected at";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 952 | grep Unimplemented err.$$name`; \ |
| 953 | if [ -n "$$log" ] ; then echo "$$name"_"$$xno" result ; echo $$log ; fi ; \ |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 954 | rm res.$$name err.$$name ; \ |
| 955 | fi ; fi ; \ |
| 956 | done; done) |
Daniel Veillard | f4e5576 | 2003-04-15 23:32:22 +0000 | [diff] [blame] | 957 | @echo "## Relax-NG streaming regression tests" |
Daniel Veillard | f4e5576 | 2003-04-15 23:32:22 +0000 | [diff] [blame] | 958 | -@(for i in $(srcdir)/test/relaxng/*.rng ; do \ |
| 959 | name=`basename $$i | sed 's+\.rng++'`; \ |
| 960 | for j in $(srcdir)/test/relaxng/"$$name"_*.xml ; do \ |
| 961 | if [ -f $$j ] ; then \ |
| 962 | xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \ |
| 963 | if [ ! -f $(srcdir)/result/relaxng/"$$name"_"$$xno" ]; \ |
| 964 | then \ |
| 965 | echo New test file "$$name"_"$$xno" ; \ |
| 966 | $(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $$i $$j \ |
| 967 | > $(srcdir)/result/relaxng/"$$name"_"$$xno" \ |
| 968 | 2> $(srcdir)/result/relaxng/"$$name"_"$$xno".err; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 969 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | f4e5576 | 2003-04-15 23:32:22 +0000 | [diff] [blame] | 970 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 971 | log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --stream --relaxng $$i $$j \ |
Daniel Veillard | f4e5576 | 2003-04-15 23:32:22 +0000 | [diff] [blame] | 972 | > res.$$name 2> err.$$name;\ |
| 973 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | bb5abab | 2003-10-03 22:21:51 +0000 | [diff] [blame] | 974 | diff $(srcdir)/result/relaxng/"$$name"_"$$xno" res.$$name;\ |
| 975 | if [ "$$name" != "tutor10_1" -a "$$name" != "tutor10_2" -a "$$name" != "tutor3_2" ] ; then \ |
| 976 | diff $(srcdir)/result/relaxng/"$$name"_"$$xno".err \ |
| 977 | err.$$name | grep -v "error detected at";\ |
| 978 | fi ; grep Unimplemented err.$$name`; \ |
William M. Brack | a0c48ad | 2004-04-16 15:58:29 +0000 | [diff] [blame] | 979 | if [ -n "$$log" ] ; then echo "$$name"_"$$xno" result ; echo $$log ; fi ; \ |
Daniel Veillard | f4e5576 | 2003-04-15 23:32:22 +0000 | [diff] [blame] | 980 | rm res.$$name err.$$name ; \ |
| 981 | fi ; fi ; \ |
| 982 | done; done) |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 983 | |
Daniel Veillard | 6dc9196 | 2004-03-22 19:10:02 +0000 | [diff] [blame] | 984 | RelaxNGPythonTests: |
| 985 | @(if [ -x $(PYTHON) ] ; then \ |
Daniel Veillard | 6d38c75 | 2004-05-10 00:40:51 +0000 | [diff] [blame] | 986 | PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH ; \ |
William M. Brack | f580674 | 2004-03-31 02:01:32 +0000 | [diff] [blame] | 987 | export PYTHONPATH; \ |
William M. Brack | a22da29 | 2005-02-12 01:08:22 +0000 | [diff] [blame] | 988 | LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \ |
| 989 | export LD_LIBRARY_PATH; \ |
Daniel Veillard | 6dc9196 | 2004-03-22 19:10:02 +0000 | [diff] [blame] | 990 | echo "## Relax-NG Python based test suite 1" ; \ |
Daniel Veillard | 252004d | 2004-03-23 12:32:32 +0000 | [diff] [blame] | 991 | $(CHECKER) $(PYTHON) $(srcdir)/check-relaxng-test-suite.py ; \ |
Daniel Veillard | 6dc9196 | 2004-03-22 19:10:02 +0000 | [diff] [blame] | 992 | echo "## Relax-NG Python based test suite 2" ; \ |
Daniel Veillard | 252004d | 2004-03-23 12:32:32 +0000 | [diff] [blame] | 993 | $(CHECKER) $(PYTHON) $(srcdir)/check-relaxng-test-suite2.py ; \ |
Daniel Veillard | 6dc9196 | 2004-03-22 19:10:02 +0000 | [diff] [blame] | 994 | fi) |
| 995 | |
| 996 | SchemasPythonTests: |
| 997 | @(if [ -x $(PYTHON) ] ; then \ |
Daniel Veillard | 6d38c75 | 2004-05-10 00:40:51 +0000 | [diff] [blame] | 998 | PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH; \ |
William M. Brack | f580674 | 2004-03-31 02:01:32 +0000 | [diff] [blame] | 999 | export PYTHONPATH; \ |
William M. Brack | a22da29 | 2005-02-12 01:08:22 +0000 | [diff] [blame] | 1000 | LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \ |
| 1001 | export LD_LIBRARY_PATH; \ |
Daniel Veillard | 6dc9196 | 2004-03-22 19:10:02 +0000 | [diff] [blame] | 1002 | echo "## XML Schemas datatypes Python based test suite" ; \ |
William M. Brack | b08d741 | 2005-03-16 01:43:05 +0000 | [diff] [blame] | 1003 | echo "## It is normal to see 10 errors reported" ; \ |
Daniel Veillard | 252004d | 2004-03-23 12:32:32 +0000 | [diff] [blame] | 1004 | $(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \ |
Daniel Veillard | 6dc9196 | 2004-03-22 19:10:02 +0000 | [diff] [blame] | 1005 | fi) |
Daniel Veillard | 522780e | 2004-09-24 12:14:55 +0000 | [diff] [blame] | 1006 | @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" MAKEFLAGS+=--silent pytests ; fi) |
Daniel Veillard | 6dc9196 | 2004-03-22 19:10:02 +0000 | [diff] [blame] | 1007 | |
Daniel Veillard | f9d1691 | 2005-01-30 22:36:30 +0000 | [diff] [blame] | 1008 | Patterntests: xmllint$(EXEEXT) |
| 1009 | @(echo > .memdump) |
| 1010 | @echo "## Pattern regression tests" |
| 1011 | -@(for i in $(srcdir)/test/pattern/*.pat ; do \ |
| 1012 | name=`basename $$i .pat`; \ |
| 1013 | if [ -f $(srcdir)/test/pattern/$$name.xml ] ; then \ |
| 1014 | if [ ! -f $(srcdir)/result/pattern/$$name ] ; then \ |
| 1015 | rm -f result.$$name ; \ |
| 1016 | echo New test file $$name ; \ |
| 1017 | for pat in `cat $$i` ; do \ |
Daniel Veillard | d4301ab | 2005-02-03 22:24:10 +0000 | [diff] [blame] | 1018 | $(CHECKER) $(top_builddir)/xmllint --walker --pattern $$pat $(srcdir)/test/pattern/$$name.xml >> $(srcdir)/result/pattern/$$name ; \ |
Daniel Veillard | f9d1691 | 2005-01-30 22:36:30 +0000 | [diff] [blame] | 1019 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 1020 | done ;\ |
| 1021 | else \ |
| 1022 | rm -f result.$$name ; \ |
| 1023 | lst=`cat $$i` ; \ |
Daniel Veillard | d4301ab | 2005-02-03 22:24:10 +0000 | [diff] [blame] | 1024 | log=`for pat in $$lst ; do $(CHECKER) $(top_builddir)/xmllint --walker --pattern $$pat $(srcdir)/test/pattern/$$name.xml 2>&1 >> result.$$name ; \ |
Daniel Veillard | f9d1691 | 2005-01-30 22:36:30 +0000 | [diff] [blame] | 1025 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 1026 | done ;\ |
| 1027 | diff $(srcdir)/result/pattern/$$name result.$$name` ; \ |
| 1028 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
| 1029 | rm result.$$name ; \ |
| 1030 | fi ; fi ; done ;) |
| 1031 | |
Daniel Veillard | ce1648b | 2005-01-04 15:10:22 +0000 | [diff] [blame] | 1032 | ModuleTests: testModule$(EXEEXT) testdso.la |
| 1033 | @echo "## Module tests" |
| 1034 | @(./testModule$(EXEEXT)) |
| 1035 | |
Daniel Veillard | 1a79241 | 2003-11-18 23:52:38 +0000 | [diff] [blame] | 1036 | cleanup: |
| 1037 | -@(find . -name .\#\* -exec rm {} \;) |
| 1038 | |
| 1039 | dist-hook: cleanup libxml2.spec |
Daniel Veillard | 580ced8 | 2003-03-21 21:22:48 +0000 | [diff] [blame] | 1040 | -cp libxml2.spec $(distdir) |
Daniel Veillard | 48bc062 | 2005-01-28 00:08:31 +0000 | [diff] [blame] | 1041 | (cd $(srcdir) ; tar -cf - --exclude CVS win32 macos vms bakefile test result SAXresult ) | (cd $(distdir); tar xf -) |
Michael Fulbright | 63dc42c | 1999-02-21 21:20:12 +0000 | [diff] [blame] | 1042 | |
Daniel Veillard | 0bff36d | 2004-08-31 09:37:03 +0000 | [diff] [blame] | 1043 | dist-source: distdir |
| 1044 | $(AMTAR) -chof - --exclude test --exclude result $(distdir) | GZIP=$(GZIP_ENV) gzip -c >`echo "$(distdir)" | sed "s+libxml2+libxml2-sources+"`.tar.gz |
| 1045 | |
Daniel Veillard | 8e19990 | 2001-01-25 18:54:39 +0000 | [diff] [blame] | 1046 | cleantar: |
Daniel Veillard | 55253e2 | 2002-02-18 14:32:39 +0000 | [diff] [blame] | 1047 | @(rm -f libxml*.tar.gz COPYING.LIB) |
Daniel Veillard | 8e19990 | 2001-01-25 18:54:39 +0000 | [diff] [blame] | 1048 | |
Daniel Veillard | 1a79241 | 2003-11-18 23:52:38 +0000 | [diff] [blame] | 1049 | rpm: cleanup cleantar |
Daniel Veillard | 0bff36d | 2004-08-31 09:37:03 +0000 | [diff] [blame] | 1050 | @(unset CDPATH ; $(MAKE) dist-source dist && rpmbuild -ta $(distdir).tar.gz) |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1051 | |
| 1052 | ## We create xml2Conf.sh here and not from configure because we want |
| 1053 | ## to get the paths expanded correctly. Macros like srcdir are given |
| 1054 | ## the value NONE in configure if the user doesn't specify them (this |
| 1055 | ## is an autoconf feature, not a bug). |
| 1056 | |
Daniel Veillard | 06d2524 | 2004-02-25 13:01:42 +0000 | [diff] [blame] | 1057 | xml2Conf.sh: xml2Conf.sh.in Makefile |
| 1058 | ## Use sed and then mv to avoid problems if the user interrupts. |
| 1059 | sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \ |
| 1060 | -e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \ |
| 1061 | -e 's?\@VERSION\@?$(VERSION)?g' \ |
| 1062 | -e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \ |
| 1063 | < $(srcdir)/xml2Conf.sh.in > xml2Conf.tmp \ |
| 1064 | && mv xml2Conf.tmp xml2Conf.sh |
| 1065 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1066 | CLEANFILES=xml2Conf.sh |
| 1067 | |
| 1068 | confexecdir=$(libdir) |
| 1069 | confexec_DATA = xml2Conf.sh |
Daniel Veillard | 7a5e0dd | 2004-09-17 08:45:25 +0000 | [diff] [blame] | 1070 | CVS_EXTRA_DIST= |
Daniel Veillard | 580ced8 | 2003-03-21 21:22:48 +0000 | [diff] [blame] | 1071 | EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \ |
Daniel Veillard | 96f6fe9 | 2004-11-04 10:52:50 +0000 | [diff] [blame] | 1072 | libxml.m4 Copyright check-xml-test-suite.py gentest.py \ |
Daniel Veillard | 252004d | 2004-03-23 12:32:32 +0000 | [diff] [blame] | 1073 | check-relaxng-test-suite.py check-relaxng-test-suite2.py \ |
| 1074 | check-xsddata-test-suite.py check-xinclude-test-suite.py \ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1075 | example/Makefile.am example/gjobread.c example/gjobs.xml \ |
AEST 2003 Malcolm Tredinnick | 0643112 | 2003-09-30 02:36:08 +0000 | [diff] [blame] | 1076 | $(man_MANS) libxml-2.0.pc.in libxml-2.0-uninstalled.pc.in \ |
Bjorn Reese | 026d29f | 2002-01-19 15:40:18 +0000 | [diff] [blame] | 1077 | trionan.c trionan.h triostr.c triostr.h trio.c trio.h \ |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 1078 | triop.h triodef.h libxml.h elfgcchack.h \ |
Daniel Veillard | f6bc7c2 | 2003-09-17 22:33:22 +0000 | [diff] [blame] | 1079 | testThreadsWin32.c genUnicode.py TODO_SCHEMAS \ |
Daniel Veillard | dab93ea | 2004-08-20 16:47:10 +0000 | [diff] [blame] | 1080 | dbgen.pl dbgenattr.pl regressions.py regressions.xml \ |
| 1081 | $(CVS_EXTRA_DIST) |
Daniel Veillard | f6bc7c2 | 2003-09-17 22:33:22 +0000 | [diff] [blame] | 1082 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1083 | |
| 1084 | pkgconfigdir = $(libdir)/pkgconfig |
| 1085 | pkgconfig_DATA = libxml-2.0.pc |
| 1086 | |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 1087 | # |
William M. Brack | f20fbf7 | 2004-06-25 05:49:08 +0000 | [diff] [blame] | 1088 | # Install the tests program sources as examples |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 1089 | # |
Daniel Veillard | 366a915 | 2002-10-23 20:43:53 +0000 | [diff] [blame] | 1090 | BASE_DIR=$(datadir)/doc |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 1091 | DOC_MODULE=libxml2-$(VERSION) |
| 1092 | EXAMPLES_DIR=$(BASE_DIR)/$(DOC_MODULE)/examples |
| 1093 | |
| 1094 | install-data-local: |
Daniel Veillard | c575b99 | 2002-02-08 13:28:40 +0000 | [diff] [blame] | 1095 | $(mkinstalldirs) $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) |
| 1096 | -@INSTALL@ -m 0644 $(srcdir)/Copyright $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 1097 | $(mkinstalldirs) $(DESTDIR)$(EXAMPLES_DIR) |
| 1098 | -@INSTALL@ -m 0644 $(srcdir)/xmllint.c $(DESTDIR)$(EXAMPLES_DIR) |
| 1099 | -@INSTALL@ -m 0644 $(srcdir)/testSAX.c $(DESTDIR)$(EXAMPLES_DIR) |
| 1100 | -@INSTALL@ -m 0644 $(srcdir)/testHTML.c $(DESTDIR)$(EXAMPLES_DIR) |
| 1101 | -@INSTALL@ -m 0644 $(srcdir)/testXPath.c $(DESTDIR)$(EXAMPLES_DIR) |
Daniel Veillard | da3b29a | 2004-08-14 11:15:13 +0000 | [diff] [blame] | 1102 | |
| 1103 | tst: tst.c |
| 1104 | $(CC) $(CFLAGS) -Iinclude -o tst tst.c .libs/libxml2.a -lpthread -lm -lz |