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