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