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