+Wed Feb 6 11:29:31 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am configure.in tests/Makefile.am tests/*/Makefile.am
+ tests/*/*/Makefile.am: refactored make tests, make all now don't
+ run the test suite
+ * python/Makefile.am: added tests
+ * python/tests/basic.py python/tests/Makefile.am: added the first
+ basic test, memory debug included
+
Wed Feb 6 00:20:57 CET 2002 Daniel Veillard <daniel@veillard.com>
* configure.in python/Makefile.am: attempst to tweak to get
dummy:
tests: dummy
- @(cd tests ; $(MAKE) test)
+ @(cd tests ; $(MAKE) tests)
+ @(cd python ; $(MAKE) tests)
cleantar:
@(rm -f libxslt*.tar.gz)
libexslt/exsltconfig.h
xsltproc/Makefile
python/Makefile
+python/tests/Makefile
tests/Makefile
tests/docs/Makefile
tests/REC1/Makefile
-# SUBDIRS= . tests
+SUBDIRS= . tests
LIBS=-L../libxslt/.libs -L../libxslt -lxslt -L../libexslt/.libs -L../libexslt -lexslt $(PYTHON_SITE_PACKAGES)/_libxml.so $(LIBXML_LIBS)
INCLUDES=-I/usr/include/python$(PYTHON_VERSION) -I$(PYTHON_INCLUDES) $(LIBXML_CFLAGS) -I$(top_srcdir)
$(GENERATED): $(srcdir)/$(GENERATE) $(API_DESC)
cd $(srcdir) && $(PYTHON) $(GENERATE)
-tests: all
+tests test: all
cd tests && $(MAKE) tests
clean:
--- /dev/null
+EXAMPLE_DIR = $(prefix)/share/doc/libxslt-python-$(LIBXML_VERSION)/examples
+
+TESTS= \
+ basic.py
+
+XMLS= \
+ test.xml \
+ test.xsl
+
+EXTRA_DIST = $(TESTS) $(XMLS)
+
+if WITH_PYTHON
+tests: $(TESTS)
+ -@(PYTHONPATH=".." ; export PYTHONPATH; \
+ for test in $(TESTS) ; do echo "-- $$test" ; $(PYTHON) $$test ; done)
+else
+tests:
+endif
+
+clean:
+ rm -f *.pyc core
+
+install-data-local:
+ $(mkinstalldirs) $(DESTDIR)$(EXAMPLE_DIR)
+ -(for test in $(TESTS) $(XMLS); \
+ do @INSTALL@ -m 0644 $$test $(DESTDIR)$(EXAMPLE_DIR) ; done)
+
--- /dev/null
+#!/usr/bin/python -u
+import libxml2
+import libxslt
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+
+styledoc = libxml2.parseFile("test.xsl")
+style = libxslt.parseStylesheetDoc(styledoc)
+doc = libxml2.parseFile("test.xml")
+result = style.applyStylesheet(doc, None)
+style.saveResultToFilename("foo", result, 0)
+style = None
+doc.freeDoc()
+result.freeDoc()
+
+# Memory debug specific
+libxslt.cleanupGlobals()
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print "OK"
+else:
+ print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+ libxml2.dumpMemory()
+++ /dev/null
-#!/usr/bin/python -u
-import libxml2
-import libxslt
-
-styledoc = libxml2.parseFile("test.xsl")
-style = libxslt.parseStylesheetDoc(styledoc)
-doc = libxml2.parseFile("test.xml")
-result = style.applyStylesheet(doc, None)
-result.saveFile("-")
all:
-test tests: all docbook_tests
+test tests:
+ @(cur=`pwd` ; for dir in $(SUBDIRS) ; do cd $$dir ; make tests ; cd $$cur ; done)
+
+full: tests docbook_tests
docbook_tests:
- @(cd docbook ; $(MAKE) tests)
+ @(cd docbook ; $(MAKE) full)
stand-2.7-1.out stand-2.7-1.xml
-all: test
+all:
test tests: $(top_builddir)/xsltproc/xsltproc
@(echo > .memdump)
EXTRA_DIST = doc.xsl doc.xml doc.dtd result.xml
-all: test
+all:
test tests: $(top_builddir)/xsltproc/xsltproc
@(echo > .memdump)
EXTRA_DIST = data.xml vrml.xsl vrml.xml svg.xsl svg.xml html.xsl html.xml
-all: test
+all:
test tests: $(top_builddir)/xsltproc/xsltproc
@(echo > .memdump)
$(top_builddir)/xsltproc/xsltproc:
@(cd ../../xsltproc ; $(MAKE) xsltproc)
-all: alphabetize attsets avts axis backwards bottles breadth brutal chart \
+all:
+
+tests test: \
+ alphabetize attsets avts axis backwards bottles breadth brutal chart \
creation current dbonerow dbtail decoy depth encrypt functions game \
html identity inventory metric number oddtemplate patterns prettyprint \
priority products queens reverser stringsort summarize total tower trend \
## Process this file with automake to produce Makefile.in
-all: single xtchunk # Avoid doing the test in normal pass
+all:
+
+tests: single xtchunk # Avoid doing the test in normal pass
$(top_builddir)/xsltproc/xsltproc:
@(cd ../../xsltproc ; $(MAKE) xsltproc)
EXTRA_DIST = README VERSION
-tests: htmltests xhtmltests fotests
+full: tests htmltests xhtmltests fotests
#
# a single tests to check that stuff ain't broken
message.xml message.xsl message.result
-all: test
+all:
test tests: $(top_builddir)/xsltproc/xsltproc
@(echo > .memdump)
all:
-test tests: all
+test tests:
+ @(cur=`pwd` ; for dir in $(SUBDIRS) ; do cd $$dir ; make tests ; cd $$cur ; done)
node-set.3.xml node-set.3.xsl node-set.3.out \
object-type.1.xml object-type.1.xsl object-type.1.out
-all: test
+all:
test tests: $(top_builddir)/xsltproc/xsltproc
@(echo > .memdump)
function.5.out function.5.xml function.5.xsl \
function.6.out function.6.xml function.6.xsl
-all: test
+all:
test tests: $(top_builddir)/xsltproc/xsltproc
@(echo > .memdump)
min.1.out min.1.xml min.1.xsl \
min.2.out min.2.xml min.2.xsl
-all: test
+all:
test tests: $(top_builddir)/xsltproc/xsltproc
@(echo > .memdump)
leading.1.out leading.1.xml leading.1.xsl \
trailing.1.out trailing.1.xml trailing.1.xsl
-all: test
+all:
test tests: $(top_builddir)/xsltproc/xsltproc
@(echo > .memdump)
EXTRA_DIST = \
tokenize.1.xml tokenize.1.xsl tokenize.1.out
-all: test
+all:
test tests: $(top_builddir)/xsltproc/xsltproc
@(echo > .memdump)
list.xml list.xsl list.out
-all: test
+all:
test tests: $(top_builddir)/xsltproc/xsltproc
@(echo > .memdump)
inner.xsl
-all: test
+all:
test tests: $(top_builddir)/xsltproc/xsltproc
@(echo > .memdump)
out/letterw.html out/letterx.html out/lettery.html out/letterz.html \
out/titlepage.html
-all: test
+all:
test tests: $(top_builddir)/xsltproc/xsltproc
@(echo > .memdump)
extra.out extra.xml extra.xsl \
extra2.out extra2.xml extra2.xsl
-all: test
+all:
test tests: $(top_builddir)/xsltproc/xsltproc
@(echo > .memdump)
EXTRA_DIST = format-number.xsl format-number.xml format-number.out
-all: test
+all:
test tests: $(top_builddir)/xsltproc/xsltproc
@(echo > .memdump)
undefvar.xml undefvar.xsl undefvar.out undefvar.err
-all: test
+all:
test tests: $(top_builddir)/xsltproc/xsltproc
@(echo > .memdump)
logo-REC xmlspec.xsl REC-xml-2e.xsl diffspec.xsl \
REC-xml-20001006.html REC-xml-20001006-review.html
-all: test
+all:
test tests: $(top_builddir)/xsltproc/xsltproc
@(echo > .memdump)