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 | f09e7e3 | 2000-10-01 15:53:30 +0000 | [diff] [blame] | 219 | testall : tests SVGtests SAXtests |
Daniel Veillard | 011b63c | 1999-06-02 17:44:04 +0000 | [diff] [blame] | 220 | |
Daniel Richard G | 5706b6d | 2012-08-06 11:32:54 +0800 | [diff] [blame] | 221 | 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) |
| 222 | @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \ |
| 223 | $(MAKE) tests ; fi) |
| 224 | @(cd doc/examples ; $(MAKE) tests) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 225 | |
Daniel Veillard | d0cf7f6 | 2004-11-09 16:17:02 +0000 | [diff] [blame] | 226 | APItests: testapi$(EXEEXT) |
| 227 | @echo "## Running the API regression tests this may take a little while" |
| 228 | -@($(CHECKER) $(top_builddir)/testapi -q) |
| 229 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 230 | HTMLtests : testHTML$(EXEEXT) |
Daniel Veillard | 357c960 | 2001-05-03 10:49:20 +0000 | [diff] [blame] | 231 | @(echo > .memdump) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 232 | @echo "## HTML regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 233 | -@(for i in $(srcdir)/test/HTML/* ; do \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 234 | name=`basename $$i`; \ |
Daniel Veillard | 82150d8 | 1999-07-07 07:32:15 +0000 | [diff] [blame] | 235 | if [ ! -d $$i ] ; then \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 236 | if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \ |
| 237 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 238 | $(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] | 239 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 240 | log=`$(CHECKER) $(top_builddir)/testHTML $$i > result.$$name 2> error.$$name ; \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 241 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 242 | diff $(srcdir)/result/HTML/$$name result.$$name ; \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 243 | diff -b $(srcdir)/result/HTML/$$name.err error.$$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 244 | $(CHECKER) $(top_builddir)/testHTML result.$$name > result2.$$name 2>error.$$name ; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 245 | diff result.$$name result2.$$name` ; \ |
| 246 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 7c1206f | 1999-10-14 09:10:25 +0000 | [diff] [blame] | 247 | rm result.$$name result2.$$name error.$$name ; \ |
Daniel Veillard | 82150d8 | 1999-07-07 07:32:15 +0000 | [diff] [blame] | 248 | fi ; fi ; done) |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 249 | |
| 250 | HTMLPushtests : testHTML$(EXEEXT) |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 251 | @echo "## Push HTML regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 252 | -@(for i in $(srcdir)/test/HTML/* ; do \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 253 | name=`basename $$i`; \ |
| 254 | if [ ! -d $$i ] ; then \ |
| 255 | if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \ |
| 256 | echo New test file $$name ; \ |
William M. Brack | f20fbf7 | 2004-06-25 05:49:08 +0000 | [diff] [blame] | 257 | $(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] | 258 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 259 | log=`$(CHECKER) $(top_builddir)/testHTML --push $$i > result.$$name 2> error.$$name ; \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 260 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 261 | diff $(srcdir)/result/HTML/$$name result.$$name ; \ |
| 262 | cut -b 1-15 $(srcdir)/result/HTML/$$name.err > errorcut.$$name; \ |
| 263 | cut -b 1-15 error.$$name > errorcut2.$$name; \ |
| 264 | diff -b errorcut.$$name errorcut2.$$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 265 | $(CHECKER) $(top_builddir)/testHTML --push result.$$name > result2.$$name 2>error.$$name ; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 266 | diff result.$$name result2.$$name` ; \ |
| 267 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 268 | rm result.$$name result2.$$name error.$$name errorcut.$$name errorcut2.$$name ; \ |
| 269 | fi ; fi ; done) |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 270 | @echo "## HTML SAX regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 271 | -@(for i in $(srcdir)/test/HTML/* ; do \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 272 | name=`basename $$i`; \ |
| 273 | if [ ! -d $$i ] ; then \ |
| 274 | if [ ! -f $(srcdir)/result/HTML/$$name.sax ] ; then \ |
| 275 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 276 | $(CHECKER) $(top_builddir)/testHTML --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 277 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 278 | log=`$(CHECKER) $(top_builddir)/testHTML --sax $$i > result.$$name.sax ; \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 279 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 280 | diff $(srcdir)/result/HTML/$$name.sax result.$$name.sax` ; \ |
| 281 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 282 | rm result.$$name.sax ; \ |
| 283 | fi ; fi ; done) |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 284 | @echo "## Push HTML SAX regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 285 | -@(for i in $(srcdir)/test/HTML/* ; do \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 286 | name=`basename $$i`; \ |
| 287 | if [ ! -d $$i ] ; then \ |
| 288 | if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \ |
| 289 | echo New test file $$name ; \ |
William M. Brack | f20fbf7 | 2004-06-25 05:49:08 +0000 | [diff] [blame] | 290 | $(CHECKER) $(top_builddir)/testHTML --push --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 291 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 292 | 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] | 293 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 294 | diff $(srcdir)/result/HTML/$$name.sax result.$$name.sax` ; \ |
| 295 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 87b9539 | 2000-08-12 21:12:04 +0000 | [diff] [blame] | 296 | rm result.$$name.sax ; \ |
| 297 | fi ; fi ; done) |
| 298 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 299 | XMLtests : xmllint$(EXEEXT) |
Daniel Veillard | 357c960 | 2001-05-03 10:49:20 +0000 | [diff] [blame] | 300 | @(echo > .memdump) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 301 | @echo "## XML regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 302 | -@(for i in $(srcdir)/test/* ; do \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 303 | name=`basename $$i`; \ |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 304 | if [ ! -d $$i ] ; then \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 305 | if [ ! -f $(srcdir)/result/$$name ] ; then \ |
| 306 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 307 | $(CHECKER) $(top_builddir)/xmllint $$i > $(srcdir)/result/$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 308 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 309 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 310 | log=`$(CHECKER) $(top_builddir)/xmllint $$i 2>&1 > result.$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 311 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 312 | diff $(srcdir)/result/$$name result.$$name ; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 313 | $(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] | 314 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 315 | diff result.$$name result2.$$name` ;\ |
| 316 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 317 | rm result.$$name result2.$$name ; \ |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 318 | fi ; fi ; done) |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 319 | @echo "## XML regression tests on memory" |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 320 | -@(for i in $(srcdir)/test/* ; do \ |
| 321 | name=`basename $$i`; \ |
| 322 | if [ ! -d $$i ] ; then \ |
| 323 | if [ ! -f $(srcdir)/result/$$name ] ; then \ |
| 324 | echo New test file $$name ; \ |
| 325 | $(CHECKER) $(top_builddir)/xmllint --memory $$i > $(srcdir)/result/$$name ; \ |
| 326 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
| 327 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 328 | log=`$(CHECKER) $(top_builddir)/xmllint --memory $$i 2>&1 > result.$$name ; \ |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 329 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 330 | diff $(srcdir)/result/$$name result.$$name ; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 331 | $(CHECKER) $(top_builddir)/xmllint --memory result.$$name 2>&1 > result2.$$name | grep -v 'failed to load external entity' ; \ |
| 332 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"`; \ |
| 333 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 334 | diff result.$$name result2.$$name ; \ |
| 335 | rm result.$$name result2.$$name ; \ |
| 336 | fi ; fi ; done) |
| 337 | |
| 338 | XMLPushtests: xmllint$(EXEEXT) |
Daniel Veillard | 3e5bb8e | 2001-06-27 16:34:34 +0000 | [diff] [blame] | 339 | @(echo > .memdump) |
Daniel Veillard | 3e5bb8e | 2001-06-27 16:34:34 +0000 | [diff] [blame] | 340 | @echo "## XML push regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 341 | -@(for i in $(srcdir)/test/* ; do \ |
Daniel Veillard | 3e5bb8e | 2001-06-27 16:34:34 +0000 | [diff] [blame] | 342 | name=`basename $$i`; \ |
| 343 | if [ ! -d $$i ] ; then \ |
| 344 | if [ ! -f $(srcdir)/result/$$name ] ; then \ |
| 345 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 346 | $(CHECKER) $(top_builddir)/xmllint --push $$i > $(srcdir)/result/$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 347 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 3e5bb8e | 2001-06-27 16:34:34 +0000 | [diff] [blame] | 348 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 349 | log=`$(CHECKER) $(top_builddir)/xmllint --push $$i 2>&1 > result.$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 350 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 3e5bb8e | 2001-06-27 16:34:34 +0000 | [diff] [blame] | 351 | diff $(srcdir)/result/$$name result.$$name ; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 352 | $(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] | 353 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 354 | diff result.$$name result2.$$name` ; \ |
| 355 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 3e5bb8e | 2001-06-27 16:34:34 +0000 | [diff] [blame] | 356 | rm result.$$name result2.$$name ; \ |
| 357 | fi ; fi ; done) |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 358 | |
Daniel Veillard | 3b7840c | 2003-09-11 23:42:01 +0000 | [diff] [blame] | 359 | NStests : xmllint$(EXEEXT) |
| 360 | @(echo > .memdump) |
Daniel Veillard | 3b7840c | 2003-09-11 23:42:01 +0000 | [diff] [blame] | 361 | @echo "## XML Namespaces regression tests" |
Daniel Veillard | 3b7840c | 2003-09-11 23:42:01 +0000 | [diff] [blame] | 362 | -@(for i in $(srcdir)/test/namespaces/* ; do \ |
| 363 | name=`basename $$i`; \ |
| 364 | if [ ! -d $$i ] ; then \ |
| 365 | if [ ! -f $(srcdir)/result/namespaces/$$name ] ; then \ |
| 366 | echo New test file $$name ; \ |
| 367 | $(CHECKER) $(top_builddir)/xmllint $$i \ |
| 368 | 2> $(srcdir)/result/namespaces/$$name.err \ |
| 369 | > $(srcdir)/result/namespaces/$$name ; \ |
| 370 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
| 371 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 372 | log=`$(CHECKER) $(top_builddir)/xmllint $$i 2> error.$$name > result.$$name ; \ |
Daniel Veillard | 3b7840c | 2003-09-11 23:42:01 +0000 | [diff] [blame] | 373 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
| 374 | diff $(srcdir)/result/namespaces/$$name result.$$name ; \ |
Daniel Veillard | 03a53c3 | 2004-10-26 16:06:51 +0000 | [diff] [blame] | 375 | diff $(srcdir)/result/namespaces/$$name.err error.$$name`; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 376 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 3b7840c | 2003-09-11 23:42:01 +0000 | [diff] [blame] | 377 | rm result.$$name error.$$name ; \ |
| 378 | fi ; fi ; done) |
| 379 | |
Daniel Veillard | 67f8b1c | 2004-04-09 21:51:49 +0000 | [diff] [blame] | 380 | IDtests : xmllint$(EXEEXT) testXPath$(EXEEXT) |
| 381 | @(echo > .memdump) |
| 382 | @echo "## xml:id regression tests" |
| 383 | -@(for i in $(srcdir)/test/xmlid/id_*.xml ; do \ |
| 384 | name=`basename $$i`; \ |
| 385 | if [ ! -d $$i ] ; then \ |
| 386 | if [ ! -f $(srcdir)/result/xmlid/$$name ] ; then \ |
| 387 | echo New test file $$name ; \ |
| 388 | $(CHECKER) $(top_builddir)/testXPath -i $$i "id('bar')" \ |
| 389 | 2> $(srcdir)/result/xmlid/$$name.err \ |
| 390 | > $(srcdir)/result/xmlid/$$name ; \ |
| 391 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
| 392 | else \ |
| 393 | log=`$(CHECKER) $(top_builddir)/testXPath -i $$i "id('bar')" 2> error.$$name > result.$$name ; \ |
| 394 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
| 395 | diff $(srcdir)/result/xmlid/$$name result.$$name ; \ |
| 396 | diff $(srcdir)/result/xmlid/$$name.err error.$$name` ; \ |
| 397 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
| 398 | rm result.$$name error.$$name ; \ |
| 399 | fi ; fi ; done) |
| 400 | |
Daniel Veillard | 522bc60 | 2004-02-21 11:53:09 +0000 | [diff] [blame] | 401 | Errtests : xmllint$(EXEEXT) |
| 402 | @(echo > .memdump) |
| 403 | @echo "## Error cases regression tests" |
| 404 | -@(for i in $(srcdir)/test/errors/*.xml ; do \ |
| 405 | name=`basename $$i`; \ |
| 406 | if [ ! -d $$i ] ; then \ |
| 407 | if [ ! -f $(srcdir)/result/errors/$$name ] ; then \ |
| 408 | echo New test file $$name ; \ |
| 409 | $(CHECKER) $(top_builddir)/xmllint $$i \ |
| 410 | 2> $(srcdir)/result/errors/$$name.err \ |
| 411 | > $(srcdir)/result/errors/$$name ; \ |
| 412 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
| 413 | else \ |
| 414 | log=`$(CHECKER) $(top_builddir)/xmllint $$i 2> error.$$name > result.$$name ; \ |
| 415 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
| 416 | diff $(srcdir)/result/errors/$$name result.$$name ; \ |
| 417 | diff $(srcdir)/result/errors/$$name.err error.$$name` ; \ |
| 418 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
| 419 | rm result.$$name error.$$name ; \ |
| 420 | fi ; fi ; done) |
| 421 | @echo "## Error cases stream regression tests" |
| 422 | -@(for i in $(srcdir)/test/errors/*.xml ; do \ |
| 423 | name=`basename $$i`; \ |
| 424 | if [ ! -d $$i ] ; then \ |
| 425 | if [ ! -f $(srcdir)/result/errors/$$name.str ] ; then \ |
| 426 | echo New test file $$name ; \ |
Daniel Veillard | 4a14fb8 | 2004-06-14 19:58:20 +0000 | [diff] [blame] | 427 | $(CHECKER) $(top_builddir)/xmllint --stream $$i \ |
Daniel Veillard | 522bc60 | 2004-02-21 11:53:09 +0000 | [diff] [blame] | 428 | 2> $(srcdir)/result/errors/$$name.str \ |
Daniel Veillard | b8590d4 | 2005-01-21 15:10:23 +0000 | [diff] [blame] | 429 | > /dev/null ; \ |
Daniel Veillard | 522bc60 | 2004-02-21 11:53:09 +0000 | [diff] [blame] | 430 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
| 431 | else \ |
Daniel Veillard | b8590d4 | 2005-01-21 15:10:23 +0000 | [diff] [blame] | 432 | log=`$(CHECKER) $(top_builddir)/xmllint --stream $$i 2> error.$$name > /dev/null ; \ |
Daniel Veillard | 522bc60 | 2004-02-21 11:53:09 +0000 | [diff] [blame] | 433 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 522bc60 | 2004-02-21 11:53:09 +0000 | [diff] [blame] | 434 | diff $(srcdir)/result/errors/$$name.str error.$$name` ; \ |
| 435 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | b8590d4 | 2005-01-21 15:10:23 +0000 | [diff] [blame] | 436 | rm error.$$name ; \ |
Daniel Veillard | 522bc60 | 2004-02-21 11:53:09 +0000 | [diff] [blame] | 437 | fi ; fi ; done) |
| 438 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 439 | Docbtests : xmllint$(EXEEXT) |
Daniel Veillard | 89cad53 | 2001-10-22 09:46:13 +0000 | [diff] [blame] | 440 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 441 | XMLenttests : xmllint$(EXEEXT) |
Daniel Veillard | 357c960 | 2001-05-03 10:49:20 +0000 | [diff] [blame] | 442 | @(echo > .memdump) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 443 | @echo "## XML entity subst regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 444 | -@(for i in $(srcdir)/test/* ; do \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 445 | name=`basename $$i`; \ |
Daniel Veillard | 011b63c | 1999-06-02 17:44:04 +0000 | [diff] [blame] | 446 | if [ ! -d $$i ] ; then \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 447 | if [ ! -f $(srcdir)/result/noent/$$name ] ; then \ |
| 448 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 449 | $(CHECKER) $(top_builddir)/xmllint --noent $$i > $(srcdir)/result/noent/$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 450 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 011b63c | 1999-06-02 17:44:04 +0000 | [diff] [blame] | 451 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 452 | log=`$(CHECKER) $(top_builddir)/xmllint --noent $$i 2>&1 > result.$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 453 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 454 | diff $(srcdir)/result/noent/$$name result.$$name ; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 455 | $(CHECKER) $(top_builddir)/xmllint --noent result.$$name 2>&1 > result2.$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 456 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 457 | diff result.$$name result2.$$name` ; \ |
| 458 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 459 | rm result.$$name result2.$$name ; \ |
Daniel Veillard | 011b63c | 1999-06-02 17:44:04 +0000 | [diff] [blame] | 460 | fi ; fi ; done) |
| 461 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 462 | URItests : testURI$(EXEEXT) |
Daniel Veillard | 357c960 | 2001-05-03 10:49:20 +0000 | [diff] [blame] | 463 | @(echo > .memdump) |
Daniel Veillard | 98a7916 | 2000-09-04 11:15:39 +0000 | [diff] [blame] | 464 | @echo "## URI module regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 465 | -@(for i in $(srcdir)/test/URI/*.data ; do \ |
Daniel Veillard | 98a7916 | 2000-09-04 11:15:39 +0000 | [diff] [blame] | 466 | name=`basename $$i`; \ |
| 467 | if [ ! -d $$i ] ; then \ |
| 468 | if [ ! -f $(srcdir)/result/URI/$$name ] ; then \ |
| 469 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 470 | $(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] | 471 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 98a7916 | 2000-09-04 11:15:39 +0000 | [diff] [blame] | 472 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 473 | 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] | 474 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 475 | diff $(srcdir)/result/URI/$$name result.$$name` ; \ |
| 476 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 98a7916 | 2000-09-04 11:15:39 +0000 | [diff] [blame] | 477 | rm result.$$name ; \ |
| 478 | fi ; fi ; done) |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 479 | -@(for i in $(srcdir)/test/URI/*.uri ; do \ |
Daniel Veillard | b6e7fdb | 2001-02-02 17:07:32 +0000 | [diff] [blame] | 480 | name=`basename $$i`; \ |
| 481 | if [ ! -d $$i ] ; then \ |
| 482 | if [ ! -f $(srcdir)/result/URI/$$name ] ; then \ |
| 483 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 484 | $(CHECKER) $(top_builddir)/testURI < $$i > $(srcdir)/result/URI/$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 485 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | b6e7fdb | 2001-02-02 17:07:32 +0000 | [diff] [blame] | 486 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 487 | log=`$(CHECKER) $(top_builddir)/testURI < $$i 2>&1 > result.$$name ; \ |
Daniel Veillard | b6e7fdb | 2001-02-02 17:07:32 +0000 | [diff] [blame] | 488 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 489 | diff $(srcdir)/result/URI/$$name result.$$name` ; \ |
| 490 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | b6e7fdb | 2001-02-02 17:07:32 +0000 | [diff] [blame] | 491 | rm result.$$name ; \ |
| 492 | fi ; fi ; done) |
Daniel Veillard | 98a7916 | 2000-09-04 11:15:39 +0000 | [diff] [blame] | 493 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 494 | XPathtests : testXPath$(EXEEXT) |
Daniel Veillard | 357c960 | 2001-05-03 10:49:20 +0000 | [diff] [blame] | 495 | @(echo > .memdump) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 496 | @echo "## XPath regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 497 | -@(if [ "`$(top_builddir)/testXPath | grep 'support not compiled in'`" != "" ] ; \ |
Daniel Veillard | 017b108 | 2001-06-21 11:20:21 +0000 | [diff] [blame] | 498 | then echo Skipping debug not compiled in ; exit 0 ; fi ; \ |
| 499 | for i in $(srcdir)/test/XPath/expr/* ; do \ |
Daniel Veillard | 1566d3a | 1999-07-15 14:24:29 +0000 | [diff] [blame] | 500 | name=`basename $$i`; \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 501 | if [ ! -d $$i ] ; then \ |
| 502 | if [ ! -f $(srcdir)/result/XPath/expr/$$name ] ; then \ |
| 503 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 504 | $(CHECKER) $(top_builddir)/testXPath -f --expr $$i > $(srcdir)/result/XPath/expr/$$name ; \ |
Daniel Veillard | 9e7160d | 2001-03-18 23:17:47 +0000 | [diff] [blame] | 505 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 1566d3a | 1999-07-15 14:24:29 +0000 | [diff] [blame] | 506 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 507 | log=`$(CHECKER) $(top_builddir)/testXPath -f --expr $$i 2>&1 > result.$$name ; \ |
Daniel Veillard | 9e7160d | 2001-03-18 23:17:47 +0000 | [diff] [blame] | 508 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 509 | diff $(srcdir)/result/XPath/expr/$$name result.$$name` ; \ |
| 510 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 511 | rm result.$$name ; \ |
Daniel Veillard | 017b108 | 2001-06-21 11:20:21 +0000 | [diff] [blame] | 512 | fi ; fi ; done ; \ |
| 513 | for i in $(srcdir)/test/XPath/docs/* ; do \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 514 | if [ ! -d $$i ] ; then \ |
| 515 | doc=`basename $$i`; \ |
| 516 | for j in $(srcdir)/test/XPath/tests/$$doc* ; do \ |
Daniel Veillard | c8df0aa | 2000-10-10 23:50:30 +0000 | [diff] [blame] | 517 | if [ ! -f $$j ] ; then continue ; fi ; \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 518 | name=`basename $$j`; \ |
| 519 | if [ ! -d $$j ] ; then \ |
| 520 | if [ ! -f $(srcdir)/result/XPath/tests/$$name ] ; then \ |
| 521 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 522 | $(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] | 523 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 524 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 525 | 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] | 526 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 527 | diff $(srcdir)/result/XPath/tests/$$name result.$$name` ; \ |
| 528 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 529 | rm result.$$name ; \ |
Daniel Veillard | 1566d3a | 1999-07-15 14:24:29 +0000 | [diff] [blame] | 530 | fi ; fi ; done ; fi ; done) |
| 531 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 532 | XPtrtests : testXPath$(EXEEXT) |
Daniel Veillard | 357c960 | 2001-05-03 10:49:20 +0000 | [diff] [blame] | 533 | @(echo > .memdump) |
Daniel Veillard | c8df0aa | 2000-10-10 23:50:30 +0000 | [diff] [blame] | 534 | @echo "## XPointer regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 535 | -@(if [ "`$(top_builddir)/testXPath | grep 'support not compiled in'`" != "" ] ; \ |
Daniel Veillard | 017b108 | 2001-06-21 11:20:21 +0000 | [diff] [blame] | 536 | then echo Skipping debug not compiled in ; exit 0 ; fi ; \ |
| 537 | for i in $(srcdir)/test/XPath/docs/* ; do \ |
Daniel Veillard | c8df0aa | 2000-10-10 23:50:30 +0000 | [diff] [blame] | 538 | if [ ! -d $$i ] ; then \ |
| 539 | doc=`basename $$i`; \ |
| 540 | for j in $(srcdir)/test/XPath/xptr/$$doc* ; do \ |
| 541 | if [ ! -f $$j ] ; then continue ; fi ; \ |
| 542 | name=`basename $$j`; \ |
| 543 | if [ ! -d $$j ] ; then \ |
| 544 | if [ ! -f $(srcdir)/result/XPath/xptr/$$name ] ; then \ |
| 545 | echo New test file $$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 546 | $(CHECKER) $(top_builddir)/testXPath -xptr -f -i $$i $$j > $(srcdir)/result/XPath/xptr/$$name ; \ |
| 547 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | c8df0aa | 2000-10-10 23:50:30 +0000 | [diff] [blame] | 548 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 549 | 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] | 550 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 551 | diff $(srcdir)/result/XPath/xptr/$$name result.$$name` ; \ |
| 552 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | c8df0aa | 2000-10-10 23:50:30 +0000 | [diff] [blame] | 553 | rm result.$$name ; \ |
| 554 | fi ; fi ; done ; fi ; done) |
| 555 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 556 | XIncludetests : xmllint$(EXEEXT) |
Daniel Veillard | 357c960 | 2001-05-03 10:49:20 +0000 | [diff] [blame] | 557 | @(echo > .memdump) |
Daniel Veillard | bf43275 | 2000-11-12 15:56:56 +0000 | [diff] [blame] | 558 | @echo "## XInclude regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 559 | -@(for i in $(srcdir)/test/XInclude/docs/* ; do \ |
Daniel Veillard | bf43275 | 2000-11-12 15:56:56 +0000 | [diff] [blame] | 560 | name=`basename $$i`; \ |
| 561 | if [ ! -d $$i ] ; then \ |
| 562 | if [ ! -f $(srcdir)/result/XInclude/$$name ] ; then \ |
| 563 | echo New test file $$name ; \ |
Daniel Veillard | e74d2e1 | 2003-12-09 11:35:37 +0000 | [diff] [blame] | 564 | $(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] | 565 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | bf43275 | 2000-11-12 15:56:56 +0000 | [diff] [blame] | 566 | else \ |
Daniel Veillard | 1f8658a | 2004-08-14 21:46:31 +0000 | [diff] [blame] | 567 | 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] | 568 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | e74d2e1 | 2003-12-09 11:35:37 +0000 | [diff] [blame] | 569 | diff $(srcdir)/result/XInclude/$$name result.$$name ; \ |
| 570 | diff $(srcdir)/result/XInclude/$$name.err error.$$name` ; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 571 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | e74d2e1 | 2003-12-09 11:35:37 +0000 | [diff] [blame] | 572 | rm result.$$name error.$$name ; \ |
Daniel Veillard | bf43275 | 2000-11-12 15:56:56 +0000 | [diff] [blame] | 573 | fi ; fi ; done) |
Daniel Veillard | c14c389 | 2004-08-16 12:34:50 +0000 | [diff] [blame] | 574 | -@(for i in $(srcdir)/test/XInclude/docs/* ; do \ |
| 575 | name=`basename $$i`; \ |
| 576 | if [ ! -d $$i ] ; then \ |
| 577 | if [ ! -f $(srcdir)/result/XInclude/$$name ] ; then \ |
| 578 | echo New test file $$name ; \ |
| 579 | $(CHECKER) $(top_builddir)/xmllint --nowarning --noxincludenode $$i > $(srcdir)/result/XInclude/$$name 2> $(srcdir)/result/XInclude/$$name.err ; \ |
| 580 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 581 | else \ |
| 582 | log=`$(CHECKER) $(top_builddir)/xmllint --nowarning --noxincludenode $$i > result.$$name 2>error.$$name ; \ |
| 583 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 584 | diff $(srcdir)/result/XInclude/$$name result.$$name ; \ |
| 585 | diff $(srcdir)/result/XInclude/$$name.err error.$$name` ; \ |
| 586 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
| 587 | rm result.$$name error.$$name ; \ |
| 588 | fi ; fi ; done) |
Daniel Veillard | 7899c5c | 2003-11-03 12:31:38 +0000 | [diff] [blame] | 589 | @(echo > .memdump) |
| 590 | @echo "## XInclude xmlReader regression tests" |
| 591 | -@(for i in $(srcdir)/test/XInclude/docs/* ; do \ |
| 592 | name=`basename $$i`; \ |
| 593 | if [ ! -d $$i ] ; then \ |
| 594 | if [ ! -f $(srcdir)/result/XInclude/$$name.rdr ] ; then \ |
| 595 | echo New test file $$name ; \ |
William M. Brack | f20fbf7 | 2004-06-25 05:49:08 +0000 | [diff] [blame] | 596 | $(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] | 597 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 598 | else \ |
Daniel Veillard | 1f8658a | 2004-08-14 21:46:31 +0000 | [diff] [blame] | 599 | 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] | 600 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | e74d2e1 | 2003-12-09 11:35:37 +0000 | [diff] [blame] | 601 | diff $(srcdir)/result/XInclude/$$name.err error.$$name ; \ |
Daniel Veillard | 7899c5c | 2003-11-03 12:31:38 +0000 | [diff] [blame] | 602 | diff $(srcdir)/result/XInclude/$$name.rdr result.$$name` ; \ |
| 603 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | e74d2e1 | 2003-12-09 11:35:37 +0000 | [diff] [blame] | 604 | rm result.$$name error.$$name ; \ |
Daniel Veillard | 7899c5c | 2003-11-03 12:31:38 +0000 | [diff] [blame] | 605 | fi ; fi ; done) |
Daniel Veillard | c14c389 | 2004-08-16 12:34:50 +0000 | [diff] [blame] | 606 | -@(for i in $(srcdir)/test/XInclude/docs/* ; do \ |
| 607 | name=`basename $$i`; \ |
| 608 | if [ ! -d $$i ] ; then \ |
| 609 | if [ ! -f $(srcdir)/result/XInclude/$$name.rdr ] ; then \ |
| 610 | echo New test file $$name ; \ |
| 611 | $(CHECKER) $(top_builddir)/xmllint --nowarning --noxincludenode --stream --debug $$i > $(srcdir)/result/XInclude/$$name.rdr ; \ |
| 612 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 613 | else \ |
| 614 | log=`$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --stream --debug $$i > result.$$name 2>error.$$name ; \ |
| 615 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 616 | diff $(srcdir)/result/XInclude/$$name.err error.$$name ; \ |
| 617 | diff $(srcdir)/result/XInclude/$$name.rdr result.$$name` ; \ |
| 618 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
| 619 | rm result.$$name error.$$name ; \ |
| 620 | fi ; fi ; done) |
Daniel Veillard | bf43275 | 2000-11-12 15:56:56 +0000 | [diff] [blame] | 621 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 622 | Scripttests : xmllint$(EXEEXT) |
Daniel Veillard | b8c9be9 | 2001-07-09 16:01:19 +0000 | [diff] [blame] | 623 | @(echo > .memdump) |
Daniel Veillard | b8c9be9 | 2001-07-09 16:01:19 +0000 | [diff] [blame] | 624 | @echo "## Scripts regression tests" |
| 625 | @echo "## Some of the base computations may be different if srcdir != ." |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 626 | -@(for i in $(srcdir)/test/scripts/*.script ; do \ |
Daniel Veillard | b8c9be9 | 2001-07-09 16:01:19 +0000 | [diff] [blame] | 627 | name=`basename $$i .script`; \ |
| 628 | xml=$(srcdir)/test/scripts/`basename $$i .script`.xml; \ |
| 629 | if [ -f $$xml ] ; then \ |
| 630 | if [ ! -f $(srcdir)/result/scripts/$$name ] ; then \ |
| 631 | echo New test file $$name ; \ |
Daniel Veillard | 29b1748 | 2004-08-16 00:39:03 +0000 | [diff] [blame] | 632 | $(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] | 633 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | b8c9be9 | 2001-07-09 16:01:19 +0000 | [diff] [blame] | 634 | else \ |
Daniel Veillard | 29b1748 | 2004-08-16 00:39:03 +0000 | [diff] [blame] | 635 | 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] | 636 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 29b1748 | 2004-08-16 00:39:03 +0000 | [diff] [blame] | 637 | diff $(srcdir)/result/scripts/$$name result.$$name ; \ |
| 638 | diff $(srcdir)/result/scripts/$$name.err result.$$name.err` ; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 639 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 29b1748 | 2004-08-16 00:39:03 +0000 | [diff] [blame] | 640 | rm result.$$name result.$$name.err ; \ |
Daniel Veillard | b8c9be9 | 2001-07-09 16:01:19 +0000 | [diff] [blame] | 641 | fi ; fi ; done) |
| 642 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 643 | Catatests : xmlcatalog$(EXEEXT) |
Daniel Veillard | cda9692 | 2001-08-21 10:56:31 +0000 | [diff] [blame] | 644 | @(echo > .memdump) |
Daniel Veillard | cda9692 | 2001-08-21 10:56:31 +0000 | [diff] [blame] | 645 | @echo "## Catalog regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 646 | -@(for i in $(srcdir)/test/catalogs/*.script ; do \ |
Daniel Veillard | cda9692 | 2001-08-21 10:56:31 +0000 | [diff] [blame] | 647 | name=`basename $$i .script`; \ |
| 648 | xml=$(srcdir)/test/catalogs/`basename $$i .script`.xml; \ |
| 649 | if [ -f $$xml ] ; then \ |
| 650 | if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \ |
| 651 | echo New test file $$name ; \ |
William M. Brack | f20fbf7 | 2004-06-25 05:49:08 +0000 | [diff] [blame] | 652 | $(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] | 653 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | cda9692 | 2001-08-21 10:56:31 +0000 | [diff] [blame] | 654 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 655 | log=`$(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > result.$$name ; \ |
Daniel Veillard | cda9692 | 2001-08-21 10:56:31 +0000 | [diff] [blame] | 656 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 657 | diff $(srcdir)/result/catalogs/$$name result.$$name` ; \ |
| 658 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | cda9692 | 2001-08-21 10:56:31 +0000 | [diff] [blame] | 659 | rm result.$$name ; \ |
| 660 | fi ; fi ; done) |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 661 | -@(for i in $(srcdir)/test/catalogs/*.script ; do \ |
Daniel Veillard | c853b32 | 2001-11-06 15:24:37 +0000 | [diff] [blame] | 662 | name=`basename $$i .script`; \ |
| 663 | sgml=$(srcdir)/test/catalogs/`basename $$i .script`.sgml; \ |
| 664 | if [ -f $$sgml ] ; then \ |
| 665 | if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \ |
| 666 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 667 | $(CHECKER) $(top_builddir)/xmlcatalog --shell $$sgml < $$i > $(srcdir)/result/catalogs/$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 668 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | c853b32 | 2001-11-06 15:24:37 +0000 | [diff] [blame] | 669 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 670 | log=`$(CHECKER) $(top_builddir)/xmlcatalog --shell $$sgml < $$i > result.$$name ; \ |
Daniel Veillard | c853b32 | 2001-11-06 15:24:37 +0000 | [diff] [blame] | 671 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 672 | diff $(srcdir)/result/catalogs/$$name result.$$name` ; \ |
| 673 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | c853b32 | 2001-11-06 15:24:37 +0000 | [diff] [blame] | 674 | rm result.$$name ; \ |
| 675 | fi ; fi ; done) |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 676 | @echo "## Add and del operations on XML Catalogs" |
Daniel Veillard | 66651aa | 2002-11-15 11:21:43 +0000 | [diff] [blame] | 677 | -@($(CHECKER) $(top_builddir)/xmlcatalog --create --noout $(srcdir)/result/catalogs/mycatalog; \ |
Daniel Veillard | c853b32 | 2001-11-06 15:24:37 +0000 | [diff] [blame] | 678 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 66651aa | 2002-11-15 11:21:43 +0000 | [diff] [blame] | 679 | $(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid sysid $(srcdir)/result/catalogs/mycatalog; \ |
Daniel Veillard | c853b32 | 2001-11-06 15:24:37 +0000 | [diff] [blame] | 680 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
Daniel Veillard | 66651aa | 2002-11-15 11:21:43 +0000 | [diff] [blame] | 681 | $(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] | 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 Pubid3 sysid3 $(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 | diff result/catalogs/mycatalog.full $(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 --del sysid $(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 | $(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid3 $(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 sysid2 $(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 | diff result/catalogs/mycatalog.empty $(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 | rm -f $(srcdir)/result/catalogs/mycatalog) |
Daniel Veillard | cda9692 | 2001-08-21 10:56:31 +0000 | [diff] [blame] | 696 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 697 | SVGtests : xmllint$(EXEEXT) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 698 | @echo "## SVG parsing regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 699 | -@(for i in $(srcdir)/test/SVG/* ; do \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 700 | name=`basename $$i`; \ |
Daniel Veillard | 011b63c | 1999-06-02 17:44:04 +0000 | [diff] [blame] | 701 | if [ ! -d $$i ] ; then \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 702 | if [ ! -f $(srcdir)/result/SVG/$$name ] ; then \ |
| 703 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 704 | $(CHECKER) $(top_builddir)/xmllint $$i > $(srcdir)/result/SVG/$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 705 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 011b63c | 1999-06-02 17:44:04 +0000 | [diff] [blame] | 706 | else \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 707 | echo Testing $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 708 | $(CHECKER) $(top_builddir)/xmllint $$i > result.$$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 | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 710 | diff $(srcdir)/result/SVG/$$name result.$$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 711 | $(CHECKER) $(top_builddir)/xmllint result.$$name > result2.$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 712 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 713 | diff result.$$name result2.$$name ; \ |
| 714 | rm result.$$name result2.$$name ; \ |
Daniel Veillard | 011b63c | 1999-06-02 17:44:04 +0000 | [diff] [blame] | 715 | fi ; fi ; done) |
| 716 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 717 | Threadtests : testThreads$(EXEEXT) |
Daniel Veillard | ab7488e | 2001-10-17 11:30:37 +0000 | [diff] [blame] | 718 | @echo "## Threaded regression tests" |
Daniel Veillard | bb5abab | 2003-10-03 22:21:51 +0000 | [diff] [blame] | 719 | -@($(CHECKER) $(top_builddir)/testThreads ; \ |
| 720 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
| 721 | exit 0) |
Daniel Veillard | ab7488e | 2001-10-17 11:30:37 +0000 | [diff] [blame] | 722 | |
Daniel Veillard | 81514ba | 2003-09-16 23:17:26 +0000 | [diff] [blame] | 723 | Readertests : xmllint$(EXEEXT) |
Daniel Veillard | 8a44e59 | 2003-09-15 14:50:06 +0000 | [diff] [blame] | 724 | @(echo > .memdump) |
Daniel Veillard | 8a44e59 | 2003-09-15 14:50:06 +0000 | [diff] [blame] | 725 | @echo "## Reader regression tests" |
Daniel Veillard | 8a44e59 | 2003-09-15 14:50:06 +0000 | [diff] [blame] | 726 | -@(for i in $(srcdir)/test/* ; do \ |
| 727 | name=`basename $$i`; \ |
| 728 | if [ ! -d $$i ] ; then \ |
| 729 | if [ ! -f $(srcdir)/result/$$name.rdr ] ; then \ |
| 730 | echo New test file $$name ; \ |
| 731 | $(CHECKER) $(top_builddir)/xmllint --nonet --debug --stream $$i > $(srcdir)/result/$$name.rdr 2>/dev/null ; \ |
| 732 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 733 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 734 | 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] | 735 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 736 | diff $(srcdir)/result/$$name.rdr result.$$name` ; \ |
| 737 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 8a44e59 | 2003-09-15 14:50:06 +0000 | [diff] [blame] | 738 | rm result.$$name ; \ |
| 739 | fi ; fi ; done) |
Daniel Veillard | 5335055 | 2003-09-18 13:35:51 +0000 | [diff] [blame] | 740 | @echo "## Reader on memory regression tests" |
Daniel Veillard | 5335055 | 2003-09-18 13:35:51 +0000 | [diff] [blame] | 741 | -@(for i in $(srcdir)/test/* ; do \ |
| 742 | name=`basename $$i`; \ |
| 743 | if [ ! -d $$i ] ; then \ |
| 744 | if [ ! -f $(srcdir)/result/$$name.rdr ] ; then \ |
| 745 | echo New test file $$name ; \ |
| 746 | $(CHECKER) $(top_builddir)/xmllint --memory --nonet --debug --stream $$i > $(srcdir)/result/$$name.rdr 2>/dev/null ; \ |
| 747 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 748 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 749 | 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] | 750 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 751 | diff $(srcdir)/result/$$name.rdr result.$$name` ; \ |
| 752 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 5335055 | 2003-09-18 13:35:51 +0000 | [diff] [blame] | 753 | rm result.$$name ; \ |
| 754 | fi ; fi ; done) |
Daniel Veillard | 7899c5c | 2003-11-03 12:31:38 +0000 | [diff] [blame] | 755 | @(echo > .memdump) |
| 756 | @echo "## Walker regression tests" |
| 757 | -@(for i in $(srcdir)/test/* ; do \ |
| 758 | name=`basename $$i`; \ |
| 759 | if [ ! -d $$i ] ; then \ |
| 760 | if [ ! -f $(srcdir)/result/$$name.rdr ] ; then \ |
| 761 | echo New test file $$name ; \ |
| 762 | $(CHECKER) $(top_builddir)/xmllint --nonet --debug --walker $$i > $(srcdir)/result/$$name.rdr 2>/dev/null ; \ |
| 763 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 764 | else \ |
| 765 | log=`$(CHECKER) $(top_builddir)/xmllint --nonet --debug --walker $$i > result.$$name 2>/dev/null ; \ |
| 766 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 767 | diff $(srcdir)/result/$$name.rdr result.$$name` ; \ |
| 768 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
| 769 | rm result.$$name ; \ |
| 770 | fi ; fi ; done) |
Daniel Veillard | 0df3bc3 | 2004-06-08 12:03:41 +0000 | [diff] [blame] | 771 | @echo "## Reader entities substitution regression tests" |
| 772 | -@(for i in $(srcdir)/test/* ; do \ |
| 773 | name=`basename $$i`; \ |
| 774 | if [ ! -d $$i ] ; then \ |
| 775 | if [ ! -f $(srcdir)/result/$$name.rde ] ; then \ |
| 776 | echo New test file $$name ; \ |
| 777 | $(CHECKER) $(top_builddir)/xmllint --noent --nonet --debug --stream $$i > $(srcdir)/result/$$name.rde 2>/dev/null ; \ |
| 778 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 779 | else \ |
| 780 | log=`$(CHECKER) $(top_builddir)/xmllint --noent --nonet --debug --stream $$i > result.$$name 2>/dev/null ; \ |
| 781 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 782 | diff $(srcdir)/result/$$name.rde result.$$name` ; \ |
| 783 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
| 784 | rm result.$$name ; \ |
| 785 | fi ; fi ; done) |
| 786 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 787 | SAXtests : testSAX$(EXEEXT) |
Daniel Veillard | 357c960 | 2001-05-03 10:49:20 +0000 | [diff] [blame] | 788 | @(echo > .memdump) |
Daniel Veillard | 4a5a964 | 2005-06-27 10:40:55 +0000 | [diff] [blame] | 789 | @echo "## SAX1 callbacks regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 790 | -@(for i in $(srcdir)/test/* ; do \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 791 | name=`basename $$i`; \ |
| 792 | if [ ! -d $$i ] ; then \ |
Daniel Veillard | 4b1577f | 2003-09-03 13:10:37 +0000 | [diff] [blame] | 793 | if [ ! -f $(srcdir)/result/$$name.sax ] ; then \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 794 | echo New test file $$name ; \ |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 795 | $(CHECKER) $(top_builddir)/testSAX $$i > $(srcdir)/result/$$name.sax 2> /dev/null ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 796 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 797 | else \ |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 798 | log=`$(CHECKER) $(top_builddir)/testSAX $$i > result.$$name 2> /dev/null ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 799 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 800 | diff $(srcdir)/result/$$name.sax result.$$name` ; \ |
| 801 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 802 | rm result.$$name ; \ |
| 803 | fi ; fi ; done) |
Daniel Veillard | 4a5a964 | 2005-06-27 10:40:55 +0000 | [diff] [blame] | 804 | @echo "## SAX2 callbacks regression tests" |
| 805 | -@(for i in $(srcdir)/test/* ; do \ |
| 806 | name=`basename $$i`; \ |
| 807 | if [ ! -d $$i ] ; then \ |
| 808 | if [ ! -f $(srcdir)/result/$$name.sax2 ] ; then \ |
| 809 | echo New test file $$name ; \ |
| 810 | $(CHECKER) $(top_builddir)/testSAX --sax2 $$i > $(srcdir)/result/$$name.sax2 2> /dev/null ; \ |
| 811 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 812 | else \ |
| 813 | log=`$(CHECKER) $(top_builddir)/testSAX --sax2 $$i > result.$$name 2> /dev/null ; \ |
| 814 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 815 | diff $(srcdir)/result/$$name.sax2 result.$$name` ; \ |
| 816 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
| 817 | rm result.$$name ; \ |
| 818 | fi ; fi ; done) |
Arturo Espinosa | 15fe6e7 | 1998-09-07 17:27:57 +0000 | [diff] [blame] | 819 | |
Daniel Veillard | 07be19b | 2002-02-08 14:20:35 +0000 | [diff] [blame] | 820 | Validtests : xmllint$(EXEEXT) |
Daniel Veillard | 357c960 | 2001-05-03 10:49:20 +0000 | [diff] [blame] | 821 | @(echo > .memdump) |
Daniel Veillard | dab4cb3 | 2001-04-20 13:03:48 +0000 | [diff] [blame] | 822 | @echo "## Valid documents regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 823 | -@(for i in $(srcdir)/test/VCM/* ; do \ |
Daniel Veillard | dab4cb3 | 2001-04-20 13:03:48 +0000 | [diff] [blame] | 824 | name=`basename $$i`; \ |
| 825 | if [ ! -d $$i ] ; then \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 826 | log=`$(CHECKER) $(top_builddir)/xmllint --valid --noout --nowarning $$i ; \ |
| 827 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"`;\ |
| 828 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | dab4cb3 | 2001-04-20 13:03:48 +0000 | [diff] [blame] | 829 | fi ; done ; exit 0) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 830 | @echo "## Validity checking regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 831 | -@(for i in $(srcdir)/test/VC/* ; do \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 832 | name=`basename $$i`; \ |
| 833 | if [ ! -d $$i ] ; then \ |
| 834 | if [ ! -f $(srcdir)/result/VC/$$name ] ; then \ |
| 835 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 836 | $(CHECKER) $(top_builddir)/xmllint --noout --valid $$i 2> $(srcdir)/result/VC/$$name ; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 837 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 838 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 839 | log=`$(CHECKER) $(top_builddir)/xmllint --noout --valid $$i 2> result.$$name ; \ |
Daniel Veillard | dab4cb3 | 2001-04-20 13:03:48 +0000 | [diff] [blame] | 840 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 841 | diff $(srcdir)/result/VC/$$name result.$$name` ; \ |
| 842 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 843 | rm result.$$name ; \ |
| 844 | fi ; fi ; done) |
Daniel Veillard | dab4cb3 | 2001-04-20 13:03:48 +0000 | [diff] [blame] | 845 | @echo "## General documents valid regression tests" |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 846 | -@(for i in $(srcdir)/test/valid/* ; do \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 847 | name=`basename $$i`; \ |
| 848 | if [ ! -d $$i ] ; then \ |
| 849 | if [ ! -f $(srcdir)/result/valid/$$name ] ; then \ |
| 850 | echo New test file $$name ; \ |
Daniel Veillard | 4b3a84f | 2002-03-19 14:36:46 +0000 | [diff] [blame] | 851 | $(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] | 852 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 853 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 854 | log=`$(CHECKER) $(top_builddir)/xmllint --valid $$i > result.$$name 2>error.$$name ; \ |
Daniel Veillard | dab4cb3 | 2001-04-20 13:03:48 +0000 | [diff] [blame] | 855 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 856 | diff $(srcdir)/result/valid/$$name result.$$name ; \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 857 | diff $(srcdir)/result/valid/$$name.err error.$$name` ; \ |
| 858 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 3500838 | 1999-10-25 13:15:52 +0000 | [diff] [blame] | 859 | rm result.$$name error.$$name ; \ |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 860 | fi ; fi ; done) |
Arturo Espinosa | 15fe6e7 | 1998-09-07 17:27:57 +0000 | [diff] [blame] | 861 | |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 862 | Regexptests: testRegexp$(EXEEXT) |
| 863 | @(echo > .memdump) |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 864 | @echo "## Regexp regression tests" |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 865 | -@(for i in $(srcdir)/test/regexp/* ; do \ |
| 866 | name=`basename $$i`; \ |
| 867 | if [ ! -d $$i ] ; then \ |
| 868 | if [ ! -f $(srcdir)/result/regexp/$$name ] ; then \ |
| 869 | echo New test file $$name ; \ |
| 870 | $(CHECKER) $(top_builddir)/testRegexp -i $$i > $(srcdir)/result/regexp/$$name; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 871 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 872 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 873 | log=`$(CHECKER) $(top_builddir)/testRegexp -i $$i 2>&1 > result.$$name ; \ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 874 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 875 | diff $(srcdir)/result/regexp/$$name result.$$name` ; \ |
| 876 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 877 | rm result.$$name ; \ |
| 878 | fi ; fi ; done) |
Daniel Veillard | 355a023 | 2005-08-22 12:58:05 +0000 | [diff] [blame] | 879 | @echo "## Formal expresssions regression tests" |
| 880 | -@(for i in $(srcdir)/test/expr/* ; do \ |
| 881 | name=`basename $$i`; \ |
| 882 | if [ ! -d $$i ] ; then \ |
| 883 | if [ ! -f $(srcdir)/result/expr/$$name ] ; then \ |
| 884 | echo New test file $$name ; \ |
| 885 | $(CHECKER) $(top_builddir)/testRegexp --expr -i $$i > $(srcdir)/result/expr/$$name; \ |
| 886 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 887 | else \ |
| 888 | log=`$(CHECKER) $(top_builddir)/testRegexp --expr -i $$i 2>&1 > result.$$name ; \ |
| 889 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 890 | diff $(srcdir)/result/expr/$$name result.$$name` ; \ |
| 891 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
| 892 | rm result.$$name ; \ |
| 893 | fi ; fi ; done) |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 894 | |
| 895 | Automatatests: testAutomata$(EXEEXT) |
| 896 | @(echo > .memdump) |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 897 | @echo "## Automata regression tests" |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 898 | -@(for i in $(srcdir)/test/automata/* ; do \ |
| 899 | name=`basename $$i`; \ |
| 900 | if [ ! -d $$i ] ; then \ |
| 901 | if [ ! -f $(srcdir)/result/automata/$$name ] ; then \ |
| 902 | echo New test file $$name ; \ |
| 903 | $(CHECKER) $(top_builddir)/testAutomata $$i > $(srcdir)/result/automata/$$name; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 904 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 905 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 906 | log=`$(CHECKER) $(top_builddir)/testAutomata $$i 2>&1 > result.$$name ; \ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 907 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 908 | diff $(srcdir)/result/automata/$$name result.$$name` ; \ |
| 909 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 910 | rm result.$$name ; \ |
| 911 | fi ; fi ; done) |
| 912 | |
Daniel Veillard | 9ebb632 | 2008-01-11 07:19:24 +0000 | [diff] [blame] | 913 | dba100000.xml: dbgenattr.pl |
Daniel Veillard | f6bc7c2 | 2003-09-17 22:33:22 +0000 | [diff] [blame] | 914 | @echo "## generating dba100000.xml" |
Daniel Veillard | 9ebb632 | 2008-01-11 07:19:24 +0000 | [diff] [blame] | 915 | @($(PERL) $(top_srcdir)/dbgenattr.pl 100000 > dba100000.xml) |
Daniel Veillard | f6bc7c2 | 2003-09-17 22:33:22 +0000 | [diff] [blame] | 916 | |
Daniel Veillard | 9ebb632 | 2008-01-11 07:19:24 +0000 | [diff] [blame] | 917 | Timingtests: xmllint$(EXEEXT) dba100000.xml |
Daniel Veillard | f6bc7c2 | 2003-09-17 22:33:22 +0000 | [diff] [blame] | 918 | @echo "## Timing tests to try to detect performance" |
| 919 | @echo "## as well a memory usage breakage when streaming" |
Daniel Veillard | e96a2a4 | 2003-09-24 21:23:56 +0000 | [diff] [blame] | 920 | @echo "## 1/ using the file interface" |
| 921 | @echo "## 2/ using the memory interface" |
| 922 | @echo "## 3/ repeated DOM parsing" |
| 923 | @echo "## 4/ repeated DOM validation" |
Daniel Veillard | 9ebb632 | 2008-01-11 07:19:24 +0000 | [diff] [blame] | 924 | -@($(top_builddir)/xmllint --stream --timing dba100000.xml; \ |
Daniel Veillard | d9e9c9d | 2003-09-18 22:03:46 +0000 | [diff] [blame] | 925 | MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\ |
| 926 | if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \ |
Daniel Veillard | f6bc7c2 | 2003-09-17 22:33:22 +0000 | [diff] [blame] | 927 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 928 | exit 0) |
Daniel Veillard | 9ebb632 | 2008-01-11 07:19:24 +0000 | [diff] [blame] | 929 | -@($(top_builddir)/xmllint --stream --timing --memory dba100000.xml; \ |
Daniel Veillard | d9e9c9d | 2003-09-18 22:03:46 +0000 | [diff] [blame] | 930 | MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\ |
| 931 | if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \ |
Daniel Veillard | f6bc7c2 | 2003-09-17 22:33:22 +0000 | [diff] [blame] | 932 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 933 | exit 0) |
Daniel Veillard | c74859e | 2004-02-26 09:57:32 +0000 | [diff] [blame] | 934 | -@($(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] | 935 | MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\ |
| 936 | if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \ |
| 937 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 938 | exit 0) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 939 | |
| 940 | VTimingtests: xmllint$(EXEEXT) |
Daniel Veillard | c74859e | 2004-02-26 09:57:32 +0000 | [diff] [blame] | 941 | -@($(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] | 942 | MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\ |
| 943 | if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \ |
| 944 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 945 | exit 0) |
Daniel Veillard | f6bc7c2 | 2003-09-17 22:33:22 +0000 | [diff] [blame] | 946 | |
Aleksey Sanin | 508a101 | 2002-05-31 06:32:32 +0000 | [diff] [blame] | 947 | C14Ntests : testC14N$(EXEEXT) |
Aleksey Sanin | f8cb6dd | 2002-06-04 04:27:06 +0000 | [diff] [blame] | 948 | @echo "## C14N and XPath regression tests" |
Aleksey Sanin | 8386824 | 2009-07-09 10:26:22 +0200 | [diff] [blame] | 949 | -@(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] | 950 | for i in $(srcdir)/test/c14n/$$m/*.xml ; do \ |
| 951 | if [ ! -d $$i ] ; then \ |
| 952 | name=`basename $$i .xml`; \ |
Aleksey Sanin | f8cb6dd | 2002-06-04 04:27:06 +0000 | [diff] [blame] | 953 | cmdline="$(CHECKER) $(top_builddir)/testC14N --$$m $$i"; \ |
Daniel Veillard | 6318673 | 2002-10-15 08:43:17 +0000 | [diff] [blame] | 954 | if [ -f $(srcdir)/test/c14n/$$m/$$name.xpath ] ; then \ |
Aleksey Sanin | f8cb6dd | 2002-06-04 04:27:06 +0000 | [diff] [blame] | 955 | cmdline="$$cmdline $(srcdir)/test/c14n/$$m/$$name.xpath"; \ |
Daniel Veillard | 6318673 | 2002-10-15 08:43:17 +0000 | [diff] [blame] | 956 | if [ -f $(srcdir)/test/c14n/$$m/$$name.ns ] ; then \ |
Aleksey Sanin | f8cb6dd | 2002-06-04 04:27:06 +0000 | [diff] [blame] | 957 | cmdline="$$cmdline '`cat $(srcdir)/test/c14n/$$m/$$name.ns`'"; \ |
| 958 | fi; \ |
Aleksey Sanin | 508a101 | 2002-05-31 06:32:32 +0000 | [diff] [blame] | 959 | fi; \ |
Aleksey Sanin | f8cb6dd | 2002-06-04 04:27:06 +0000 | [diff] [blame] | 960 | $$cmdline > $(srcdir)/test/c14n/test.tmp; \ |
Aleksey Sanin | 508a101 | 2002-05-31 06:32:32 +0000 | [diff] [blame] | 961 | if [ $$? -eq 0 ]; then \ |
Aleksey Sanin | c57f9c1 | 2002-05-31 19:14:57 +0000 | [diff] [blame] | 962 | diff $(srcdir)/result/c14n/$$m/$$name $(srcdir)/test/c14n/test.tmp; \ |
Aleksey Sanin | 508a101 | 2002-05-31 06:32:32 +0000 | [diff] [blame] | 963 | if [ $$? -ne 0 ]; then \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 964 | echo "Test $$m/$$name failed"; \ |
Aleksey Sanin | f8cb6dd | 2002-06-04 04:27:06 +0000 | [diff] [blame] | 965 | cat $(srcdir)/test/c14n/test.tmp; \ |
Aleksey Sanin | 508a101 | 2002-05-31 06:32:32 +0000 | [diff] [blame] | 966 | fi; \ |
| 967 | else \ |
| 968 | echo "C14N failed"; \ |
| 969 | fi; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 970 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Aleksey Sanin | 508a101 | 2002-05-31 06:32:32 +0000 | [diff] [blame] | 971 | fi; \ |
| 972 | rm -f $(srcdir)/test/c14n/test.tmp; \ |
| 973 | done; \ |
| 974 | done) |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 975 | |
| 976 | Schemastests: testSchemas$(EXEEXT) |
| 977 | @(echo > .memdump) |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 978 | @echo "## Schemas regression tests" |
Daniel Veillard | 8651f53 | 2002-04-17 09:06:27 +0000 | [diff] [blame] | 979 | -@(for i in $(srcdir)/test/schemas/*_*.xsd ; do \ |
| 980 | name=`basename $$i | sed 's+_.*++'`; \ |
| 981 | sno=`basename $$i | sed 's+.*_\(.*\).xsd+\1+'`; \ |
| 982 | for j in $(srcdir)/test/schemas/"$$name"_*.xml ; do \ |
Daniel Veillard | 5add868 | 2003-03-10 13:13:58 +0000 | [diff] [blame] | 983 | if [ -f $$j ] ; then \ |
Daniel Veillard | 8651f53 | 2002-04-17 09:06:27 +0000 | [diff] [blame] | 984 | xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \ |
| 985 | if [ ! -f $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno" ]; \ |
| 986 | then \ |
Daniel Veillard | 6231e84 | 2002-04-18 11:54:04 +0000 | [diff] [blame] | 987 | echo New test file "$$name"_"$$sno"_"$$xno" ; \ |
Daniel Veillard | 8651f53 | 2002-04-17 09:06:27 +0000 | [diff] [blame] | 988 | $(CHECKER) $(top_builddir)/testSchemas $$i $$j \ |
| 989 | > $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno" \ |
| 990 | 2> $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno".err; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 991 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 8651f53 | 2002-04-17 09:06:27 +0000 | [diff] [blame] | 992 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 993 | log=`$(CHECKER) $(top_builddir)/testSchemas $$i $$j \ |
Daniel Veillard | 8651f53 | 2002-04-17 09:06:27 +0000 | [diff] [blame] | 994 | > res.$$name 2> err.$$name;\ |
| 995 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 996 | diff $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno" \ |
| 997 | res.$$name;\ |
| 998 | diff $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno".err \ |
| 999 | err.$$name;\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 1000 | grep Unimplemented err.$$name`; \ |
| 1001 | if [ -n "$$log" ] ; then echo "$$name"_"$$sno"_"$$xno" result ; echo $$log ; fi ; \ |
Daniel Veillard | 8651f53 | 2002-04-17 09:06:27 +0000 | [diff] [blame] | 1002 | rm res.$$name err.$$name ; \ |
Daniel Veillard | 5add868 | 2003-03-10 13:13:58 +0000 | [diff] [blame] | 1003 | fi ; fi ;\ |
Daniel Veillard | 8651f53 | 2002-04-17 09:06:27 +0000 | [diff] [blame] | 1004 | done; done) |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 1005 | |
Daniel Veillard | 71531f3 | 2003-02-05 13:19:53 +0000 | [diff] [blame] | 1006 | Relaxtests: xmllint$(EXEEXT) |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 1007 | @(echo > .memdump) |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 1008 | @echo "## Relax-NG regression tests" |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 1009 | -@(for i in $(srcdir)/test/relaxng/*.rng ; do \ |
| 1010 | name=`basename $$i | sed 's+\.rng++'`; \ |
Daniel Veillard | 231d791 | 2003-02-09 14:22:17 +0000 | [diff] [blame] | 1011 | if [ ! -f $(srcdir)/result/relaxng/"$$name"_valid ] ; then \ |
| 1012 | echo New schemas $$name ; \ |
| 1013 | $(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $(srcdir)/test/relaxng/tutorA.rng $$i \ |
| 1014 | > $(srcdir)/result/relaxng/"$$name"_valid \ |
| 1015 | 2> $(srcdir)/result/relaxng/"$$name"_err; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 1016 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 231d791 | 2003-02-09 14:22:17 +0000 | [diff] [blame] | 1017 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 1018 | 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] | 1019 | > res.$$name 2> err.$$name;\ |
| 1020 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 1021 | diff $(srcdir)/result/relaxng/"$$name"_valid \ |
| 1022 | res.$$name;\ |
| 1023 | diff $(srcdir)/result/relaxng/"$$name"_err \ |
| 1024 | err.$$name | grep -v "error detected at";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 1025 | grep Unimplemented err.$$name`; \ |
| 1026 | if [ -n "$$log" ] ; then echo schemas $$name result ; echo $$log ; fi ; \ |
Daniel Veillard | 231d791 | 2003-02-09 14:22:17 +0000 | [diff] [blame] | 1027 | rm res.$$name err.$$name ; \ |
| 1028 | fi; \ |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 1029 | for j in $(srcdir)/test/relaxng/"$$name"_*.xml ; do \ |
| 1030 | if [ -f $$j ] ; then \ |
| 1031 | xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \ |
| 1032 | if [ ! -f $(srcdir)/result/relaxng/"$$name"_"$$xno" ]; \ |
| 1033 | then \ |
| 1034 | echo New test file "$$name"_"$$xno" ; \ |
Daniel Veillard | 71531f3 | 2003-02-05 13:19:53 +0000 | [diff] [blame] | 1035 | $(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $$i $$j \ |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 1036 | > $(srcdir)/result/relaxng/"$$name"_"$$xno" \ |
| 1037 | 2> $(srcdir)/result/relaxng/"$$name"_"$$xno".err; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 1038 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 1039 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 1040 | log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $$i $$j \ |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 1041 | > res.$$name 2> err.$$name;\ |
| 1042 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 1043 | diff $(srcdir)/result/relaxng/"$$name"_"$$xno" \ |
| 1044 | res.$$name;\ |
| 1045 | diff $(srcdir)/result/relaxng/"$$name"_"$$xno".err \ |
Daniel Veillard | d41f4f4 | 2003-01-29 21:07:52 +0000 | [diff] [blame] | 1046 | err.$$name | grep -v "error detected at";\ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 1047 | grep Unimplemented err.$$name`; \ |
| 1048 | if [ -n "$$log" ] ; then echo "$$name"_"$$xno" result ; echo $$log ; fi ; \ |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 1049 | rm res.$$name err.$$name ; \ |
| 1050 | fi ; fi ; \ |
| 1051 | done; done) |
Daniel Veillard | f4e5576 | 2003-04-15 23:32:22 +0000 | [diff] [blame] | 1052 | @echo "## Relax-NG streaming regression tests" |
Daniel Veillard | f4e5576 | 2003-04-15 23:32:22 +0000 | [diff] [blame] | 1053 | -@(for i in $(srcdir)/test/relaxng/*.rng ; do \ |
| 1054 | name=`basename $$i | sed 's+\.rng++'`; \ |
| 1055 | for j in $(srcdir)/test/relaxng/"$$name"_*.xml ; do \ |
| 1056 | if [ -f $$j ] ; then \ |
| 1057 | xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \ |
| 1058 | if [ ! -f $(srcdir)/result/relaxng/"$$name"_"$$xno" ]; \ |
| 1059 | then \ |
| 1060 | echo New test file "$$name"_"$$xno" ; \ |
| 1061 | $(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $$i $$j \ |
| 1062 | > $(srcdir)/result/relaxng/"$$name"_"$$xno" \ |
| 1063 | 2> $(srcdir)/result/relaxng/"$$name"_"$$xno".err; \ |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 1064 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | f4e5576 | 2003-04-15 23:32:22 +0000 | [diff] [blame] | 1065 | else \ |
Daniel Veillard | 2b8c4a1 | 2003-10-02 22:28:19 +0000 | [diff] [blame] | 1066 | log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --stream --relaxng $$i $$j \ |
Daniel Veillard | f4e5576 | 2003-04-15 23:32:22 +0000 | [diff] [blame] | 1067 | > res.$$name 2> err.$$name;\ |
| 1068 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
Daniel Veillard | bb5abab | 2003-10-03 22:21:51 +0000 | [diff] [blame] | 1069 | diff $(srcdir)/result/relaxng/"$$name"_"$$xno" res.$$name;\ |
Daniel Veillard | ec18c96 | 2009-08-26 18:37:43 +0200 | [diff] [blame] | 1070 | 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] | 1071 | diff $(srcdir)/result/relaxng/"$$name"_"$$xno".err \ |
| 1072 | err.$$name | grep -v "error detected at";\ |
| 1073 | fi ; grep Unimplemented err.$$name`; \ |
William M. Brack | a0c48ad | 2004-04-16 15:58:29 +0000 | [diff] [blame] | 1074 | if [ -n "$$log" ] ; then echo "$$name"_"$$xno" result ; echo $$log ; fi ; \ |
Daniel Veillard | f4e5576 | 2003-04-15 23:32:22 +0000 | [diff] [blame] | 1075 | rm res.$$name err.$$name ; \ |
| 1076 | fi ; fi ; \ |
| 1077 | done; done) |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 1078 | |
Daniel Veillard | c740a17 | 2005-07-31 12:17:24 +0000 | [diff] [blame] | 1079 | Schematrontests: xmllint$(EXEEXT) |
| 1080 | @(echo > .memdump) |
| 1081 | @echo "## Schematron regression tests" |
| 1082 | -@(for i in $(srcdir)/test/schematron/*.sct ; do \ |
| 1083 | name=`basename $$i | sed 's+\.sct++'`; \ |
| 1084 | for j in $(srcdir)/test/schematron/"$$name"_*.xml ; do \ |
| 1085 | if [ -f $$j ] ; then \ |
| 1086 | xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \ |
| 1087 | if [ ! -f $(srcdir)/result/schematron/"$$name"_"$$xno" ]; \ |
| 1088 | then \ |
| 1089 | echo New test file "$$name"_"$$xno" ; \ |
| 1090 | $(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --schematron $$i $$j \ |
| 1091 | > $(srcdir)/result/schematron/"$$name"_"$$xno" \ |
| 1092 | 2> $(srcdir)/result/schematron/"$$name"_"$$xno".err; \ |
| 1093 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 1094 | else \ |
| 1095 | log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --schematron $$i $$j \ |
| 1096 | > res.$$name 2> err.$$name;\ |
| 1097 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 1098 | diff $(srcdir)/result/schematron/"$$name"_"$$xno" \ |
| 1099 | res.$$name;\ |
| 1100 | diff $(srcdir)/result/schematron/"$$name"_"$$xno".err \ |
| 1101 | err.$$name | grep -v "error detected at";\ |
| 1102 | grep Unimplemented err.$$name`; \ |
| 1103 | if [ -n "$$log" ] ; then echo "$$name"_"$$xno" result ; echo $$log ; fi ; \ |
| 1104 | rm res.$$name err.$$name ; \ |
| 1105 | fi ; fi ; \ |
| 1106 | done; done) |
| 1107 | |
Daniel Veillard | 6dc9196 | 2004-03-22 19:10:02 +0000 | [diff] [blame] | 1108 | RelaxNGPythonTests: |
| 1109 | @(if [ -x $(PYTHON) ] ; then \ |
Daniel Veillard | 6d38c75 | 2004-05-10 00:40:51 +0000 | [diff] [blame] | 1110 | PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH ; \ |
William M. Brack | f580674 | 2004-03-31 02:01:32 +0000 | [diff] [blame] | 1111 | export PYTHONPATH; \ |
William M. Brack | a22da29 | 2005-02-12 01:08:22 +0000 | [diff] [blame] | 1112 | LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \ |
| 1113 | export LD_LIBRARY_PATH; \ |
Daniel Veillard | 6dc9196 | 2004-03-22 19:10:02 +0000 | [diff] [blame] | 1114 | echo "## Relax-NG Python based test suite 1" ; \ |
Daniel Veillard | 252004d | 2004-03-23 12:32:32 +0000 | [diff] [blame] | 1115 | $(CHECKER) $(PYTHON) $(srcdir)/check-relaxng-test-suite.py ; \ |
Daniel Veillard | 6dc9196 | 2004-03-22 19:10:02 +0000 | [diff] [blame] | 1116 | echo "## Relax-NG Python based test suite 2" ; \ |
Daniel Veillard | 252004d | 2004-03-23 12:32:32 +0000 | [diff] [blame] | 1117 | $(CHECKER) $(PYTHON) $(srcdir)/check-relaxng-test-suite2.py ; \ |
Daniel Veillard | 6dc9196 | 2004-03-22 19:10:02 +0000 | [diff] [blame] | 1118 | fi) |
| 1119 | |
| 1120 | SchemasPythonTests: |
| 1121 | @(if [ -x $(PYTHON) ] ; then \ |
Daniel Veillard | 6d38c75 | 2004-05-10 00:40:51 +0000 | [diff] [blame] | 1122 | PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH; \ |
William M. Brack | f580674 | 2004-03-31 02:01:32 +0000 | [diff] [blame] | 1123 | export PYTHONPATH; \ |
William M. Brack | a22da29 | 2005-02-12 01:08:22 +0000 | [diff] [blame] | 1124 | LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \ |
| 1125 | export LD_LIBRARY_PATH; \ |
Daniel Veillard | 6dc9196 | 2004-03-22 19:10:02 +0000 | [diff] [blame] | 1126 | echo "## XML Schemas datatypes Python based test suite" ; \ |
Kasimier T. Buchcik | 27759f2 | 2005-12-05 15:32:28 +0000 | [diff] [blame] | 1127 | echo "## It is normal to see 11 errors reported" ; \ |
Daniel Veillard | 252004d | 2004-03-23 12:32:32 +0000 | [diff] [blame] | 1128 | $(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \ |
Daniel Veillard | 6dc9196 | 2004-03-22 19:10:02 +0000 | [diff] [blame] | 1129 | fi) |
Daniel Richard G | 5706b6d | 2012-08-06 11:32:54 +0800 | [diff] [blame] | 1130 | @(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] | 1131 | |
Daniel Veillard | f9d1691 | 2005-01-30 22:36:30 +0000 | [diff] [blame] | 1132 | Patterntests: xmllint$(EXEEXT) |
| 1133 | @(echo > .memdump) |
| 1134 | @echo "## Pattern regression tests" |
| 1135 | -@(for i in $(srcdir)/test/pattern/*.pat ; do \ |
| 1136 | name=`basename $$i .pat`; \ |
| 1137 | if [ -f $(srcdir)/test/pattern/$$name.xml ] ; then \ |
| 1138 | if [ ! -f $(srcdir)/result/pattern/$$name ] ; then \ |
| 1139 | rm -f result.$$name ; \ |
| 1140 | echo New test file $$name ; \ |
| 1141 | for pat in `cat $$i` ; do \ |
Daniel Veillard | d4301ab | 2005-02-03 22:24:10 +0000 | [diff] [blame] | 1142 | $(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] | 1143 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 1144 | done ;\ |
| 1145 | else \ |
| 1146 | rm -f result.$$name ; \ |
| 1147 | lst=`cat $$i` ; \ |
Daniel Veillard | d4301ab | 2005-02-03 22:24:10 +0000 | [diff] [blame] | 1148 | 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] | 1149 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
| 1150 | done ;\ |
| 1151 | diff $(srcdir)/result/pattern/$$name result.$$name` ; \ |
| 1152 | if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \ |
| 1153 | rm result.$$name ; \ |
| 1154 | fi ; fi ; done ;) |
| 1155 | |
Daniel Veillard | ce1648b | 2005-01-04 15:10:22 +0000 | [diff] [blame] | 1156 | ModuleTests: testModule$(EXEEXT) testdso.la |
| 1157 | @echo "## Module tests" |
| 1158 | @(./testModule$(EXEEXT)) |
| 1159 | |
Daniel Veillard | 1a79241 | 2003-11-18 23:52:38 +0000 | [diff] [blame] | 1160 | cleanup: |
| 1161 | -@(find . -name .\#\* -exec rm {} \;) |
Daniel Richard G | 5706b6d | 2012-08-06 11:32:54 +0800 | [diff] [blame] | 1162 | -@(find . -name \*.gcda -o -name \*.gcno -exec rm -f {} \;) |
| 1163 | -@(find . -name \*.orig -o -name \*.rej -o -name \*.old -exec rm -f {} \;) |
Daniel Veillard | 1a79241 | 2003-11-18 23:52:38 +0000 | [diff] [blame] | 1164 | |
| 1165 | dist-hook: cleanup libxml2.spec |
Daniel Veillard | 580ced8 | 2003-03-21 21:22:48 +0000 | [diff] [blame] | 1166 | -cp libxml2.spec $(distdir) |
Patrick Monnerat | 917e353 | 2014-03-04 17:36:54 +0100 | [diff] [blame] | 1167 | (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] | 1168 | |
Daniel Veillard | 0bff36d | 2004-08-31 09:37:03 +0000 | [diff] [blame] | 1169 | dist-source: distdir |
Daniel Veillard | e4aaae2 | 2005-07-10 23:12:52 +0000 | [diff] [blame] | 1170 | $(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] | 1171 | |
Daniel Veillard | 87b3046 | 2005-07-05 14:04:36 +0000 | [diff] [blame] | 1172 | dist-test: distdir |
Daniel Veillard | e4aaae2 | 2005-07-10 23:12:52 +0000 | [diff] [blame] | 1173 | (mkdir -p $(distdir)) |
Daniel Veillard | c943f70 | 2012-05-23 17:10:59 +0800 | [diff] [blame] | 1174 | (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] | 1175 | tar -cf - $(distdir)/test $(distdir)/result $(distdir)/xstc/Tests $(distdir)/Makefile.tests $(distdir)/README $(distdir)/README.tests $(distdir)/AUTHORS $(distdir)/testapi.c $(distdir)/runtest.c $(distdir)/runsuite.c | GZIP=$(GZIP_ENV) gzip -c >`echo "$(distdir)" | sed "s+libxml2+libxml2-tests+"`.tar.gz |
| 1176 | @(rm -rf $(distdir)/xstc/Test) |
Daniel Veillard | 87b3046 | 2005-07-05 14:04:36 +0000 | [diff] [blame] | 1177 | |
Daniel Veillard | 8e19990 | 2001-01-25 18:54:39 +0000 | [diff] [blame] | 1178 | cleantar: |
Daniel Veillard | 55253e2 | 2002-02-18 14:32:39 +0000 | [diff] [blame] | 1179 | @(rm -f libxml*.tar.gz COPYING.LIB) |
Daniel Veillard | 8e19990 | 2001-01-25 18:54:39 +0000 | [diff] [blame] | 1180 | |
Daniel Veillard | 1a79241 | 2003-11-18 23:52:38 +0000 | [diff] [blame] | 1181 | rpm: cleanup cleantar |
Daniel Veillard | e4aaae2 | 2005-07-10 23:12:52 +0000 | [diff] [blame] | 1182 | @(unset CDPATH ; $(MAKE) dist-source dist && rpmbuild -ta $(distdir).tar.gz) |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1183 | |
| 1184 | ## We create xml2Conf.sh here and not from configure because we want |
| 1185 | ## to get the paths expanded correctly. Macros like srcdir are given |
| 1186 | ## the value NONE in configure if the user doesn't specify them (this |
| 1187 | ## is an autoconf feature, not a bug). |
| 1188 | |
Daniel Veillard | 06d2524 | 2004-02-25 13:01:42 +0000 | [diff] [blame] | 1189 | xml2Conf.sh: xml2Conf.sh.in Makefile |
| 1190 | ## Use sed and then mv to avoid problems if the user interrupts. |
| 1191 | sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \ |
| 1192 | -e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \ |
| 1193 | -e 's?\@VERSION\@?$(VERSION)?g' \ |
| 1194 | -e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \ |
| 1195 | < $(srcdir)/xml2Conf.sh.in > xml2Conf.tmp \ |
| 1196 | && mv xml2Conf.tmp xml2Conf.sh |
| 1197 | |
Daniel Richard G | 5706b6d | 2012-08-06 11:32:54 +0800 | [diff] [blame] | 1198 | CLEANFILES = runxmlconf.log test.out xml2Conf.sh *.gcda *.gcno *.res |
Daniel Veillard | 742a0bb | 2012-09-11 13:37:30 +0800 | [diff] [blame] | 1199 | DISTCLEANFILES = COPYING missing.lst |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1200 | |
| 1201 | confexecdir=$(libdir) |
| 1202 | confexec_DATA = xml2Conf.sh |
Daniel Veillard | 7a5e0dd | 2004-09-17 08:45:25 +0000 | [diff] [blame] | 1203 | CVS_EXTRA_DIST= |
Daniel Veillard | 580ced8 | 2003-03-21 21:22:48 +0000 | [diff] [blame] | 1204 | 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] | 1205 | libxml.m4 Copyright check-xml-test-suite.py gentest.py \ |
Daniel Veillard | 252004d | 2004-03-23 12:32:32 +0000 | [diff] [blame] | 1206 | check-relaxng-test-suite.py check-relaxng-test-suite2.py \ |
| 1207 | check-xsddata-test-suite.py check-xinclude-test-suite.py \ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1208 | example/Makefile.am example/gjobread.c example/gjobs.xml \ |
AEST 2003 Malcolm Tredinnick | 0643112 | 2003-09-30 02:36:08 +0000 | [diff] [blame] | 1209 | $(man_MANS) libxml-2.0.pc.in libxml-2.0-uninstalled.pc.in \ |
Samuel Martin | fa23ac1 | 2014-10-11 21:50:41 +0200 | [diff] [blame] | 1210 | libxml2-config.cmake.in \ |
Bjorn Reese | 026d29f | 2002-01-19 15:40:18 +0000 | [diff] [blame] | 1211 | trionan.c trionan.h triostr.c triostr.h trio.c trio.h \ |
Daniel Veillard | bca22f4 | 2012-07-11 16:48:47 +0800 | [diff] [blame] | 1212 | triop.h triodef.h libxml.h elfgcchack.h xzlib.h buf.h \ |
Daniel Veillard | 187e529 | 2012-08-06 10:27:58 +0800 | [diff] [blame] | 1213 | enc.h save.h testThreadsWin32.c genUnicode.py TODO_SCHEMAS \ |
Daniel Veillard | dab93ea | 2004-08-20 16:47:10 +0000 | [diff] [blame] | 1214 | dbgen.pl dbgenattr.pl regressions.py regressions.xml \ |
Vojtech Fried | 3e031b7 | 2012-08-24 16:52:44 +0800 | [diff] [blame] | 1215 | README.tests Makefile.tests libxml2.syms timsort.h \ |
Daniel Veillard | dab93ea | 2004-08-20 16:47:10 +0000 | [diff] [blame] | 1216 | $(CVS_EXTRA_DIST) |
Daniel Veillard | f6bc7c2 | 2003-09-17 22:33:22 +0000 | [diff] [blame] | 1217 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1218 | |
| 1219 | pkgconfigdir = $(libdir)/pkgconfig |
| 1220 | pkgconfig_DATA = libxml-2.0.pc |
| 1221 | |
Samuel Martin | fa23ac1 | 2014-10-11 21:50:41 +0200 | [diff] [blame] | 1222 | cmakedir = $(libdir)/cmake/libxml2 |
| 1223 | cmake_DATA = libxml2-config.cmake |
| 1224 | |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 1225 | # |
William M. Brack | f20fbf7 | 2004-06-25 05:49:08 +0000 | [diff] [blame] | 1226 | # Install the tests program sources as examples |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 1227 | # |
Daniel Veillard | 366a915 | 2002-10-23 20:43:53 +0000 | [diff] [blame] | 1228 | BASE_DIR=$(datadir)/doc |
Daniel Veillard | 3606581 | 2002-01-24 15:02:46 +0000 | [diff] [blame] | 1229 | DOC_MODULE=libxml2-$(VERSION) |
| 1230 | EXAMPLES_DIR=$(BASE_DIR)/$(DOC_MODULE)/examples |
| 1231 | |
| 1232 | install-data-local: |
Daniel Richard G | 5706b6d | 2012-08-06 11:32:54 +0800 | [diff] [blame] | 1233 | $(MKDIR_P) $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) |
| 1234 | -$(INSTALL) -m 0644 $(srcdir)/Copyright $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) |
| 1235 | $(MKDIR_P) $(DESTDIR)$(EXAMPLES_DIR) |
| 1236 | -$(INSTALL) -m 0644 $(srcdir)/xmllint.c $(DESTDIR)$(EXAMPLES_DIR) |
| 1237 | -$(INSTALL) -m 0644 $(srcdir)/testSAX.c $(DESTDIR)$(EXAMPLES_DIR) |
| 1238 | -$(INSTALL) -m 0644 $(srcdir)/testHTML.c $(DESTDIR)$(EXAMPLES_DIR) |
| 1239 | -$(INSTALL) -m 0644 $(srcdir)/testXPath.c $(DESTDIR)$(EXAMPLES_DIR) |
Daniel Veillard | da3b29a | 2004-08-14 11:15:13 +0000 | [diff] [blame] | 1240 | |
Daniel Veillard | 9ebb632 | 2008-01-11 07:19:24 +0000 | [diff] [blame] | 1241 | uninstall-local: |
Daniel Veillard | 2173b5c | 2009-08-24 14:23:32 +0200 | [diff] [blame] | 1242 | rm -f $(DESTDIR)$(EXAMPLES_DIR)/testXPath.c |
| 1243 | rm -f $(DESTDIR)$(EXAMPLES_DIR)/testHTML.c |
| 1244 | rm -f $(DESTDIR)$(EXAMPLES_DIR)/testSAX.c |
| 1245 | rm -f $(DESTDIR)$(EXAMPLES_DIR)/xmllint.c |
Daniel Veillard | 9ebb632 | 2008-01-11 07:19:24 +0000 | [diff] [blame] | 1246 | rm -rf $(DESTDIR)$(EXAMPLES_DIR) |
Daniel Veillard | 2173b5c | 2009-08-24 14:23:32 +0200 | [diff] [blame] | 1247 | rm -f $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)/Copyright |
Daniel Veillard | 9ebb632 | 2008-01-11 07:19:24 +0000 | [diff] [blame] | 1248 | rm -rf $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) |
| 1249 | |
Daniel Veillard | da3b29a | 2004-08-14 11:15:13 +0000 | [diff] [blame] | 1250 | tst: tst.c |
Daniel Veillard | 48f0f3f | 2012-05-08 10:59:41 +0800 | [diff] [blame] | 1251 | $(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] | 1252 | |
| 1253 | sparse: clean |
| 1254 | $(MAKE) CC=cgcc |
Daniel Veillard | bfa5cf1 | 2008-08-27 15:33:28 +0000 | [diff] [blame] | 1255 | |
| 1256 | # |
| 1257 | # Coverage support, largely borrowed from libvirt |
| 1258 | # Both binaries comes from the lcov package in Fedora |
| 1259 | # |
| 1260 | LCOV = /usr/bin/lcov |
| 1261 | GENHTML = /usr/bin/genhtml |
| 1262 | |
| 1263 | cov: clean-cov |
| 1264 | if [ "`echo $(LDFLAGS) | grep coverage`" = "" ] ; then \ |
| 1265 | echo not configured with coverage; exit 1 ; fi |
| 1266 | if [ ! -x $(LCOV) -o ! -x $(GENHTML) ] ; then \ |
| 1267 | echo Need $(LCOV) and $(GENHTML) excecutables; exit 1 ; fi |
| 1268 | -@($(MAKE) check) |
| 1269 | -@(./runsuite$(EXEEXT)) |
| 1270 | mkdir $(top_builddir)/coverage |
| 1271 | $(LCOV) -c -o $(top_builddir)/coverage/libxml2.info.tmp -d $(top_srcdir) |
| 1272 | $(LCOV) -r $(top_builddir)/coverage/libxml2.info.tmp -o $(top_builddir)/coverage/libxml2.info *usr* |
| 1273 | rm $(top_builddir)/coverage/libxml2.info.tmp |
| 1274 | $(GENHTML) -s -t "libxml2" -o $(top_builddir)/coverage --legend $(top_builddir)/coverage/libxml2.info |
| 1275 | echo "Coverage report is in $(top_builddir)/coverage/index.html" |
| 1276 | |
| 1277 | clean-cov: |
| 1278 | rm -rf $(top_builddir)/coverage |
| 1279 | |