mirror of
https://github.com/darlinghq/darling-libxslt.git
synced 2024-12-02 08:56:24 +00:00
refactored make tests, make all now don't run the test suite added tests
* 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 Daniel
This commit is contained in:
parent
f0cb070b69
commit
ac6924c939
@ -1,3 +1,12 @@
|
||||
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
|
||||
|
@ -50,7 +50,8 @@ check-local: tests
|
||||
dummy:
|
||||
|
||||
tests: dummy
|
||||
@(cd tests ; $(MAKE) test)
|
||||
@(cd tests ; $(MAKE) tests)
|
||||
@(cd python ; $(MAKE) tests)
|
||||
|
||||
cleantar:
|
||||
@(rm -f libxslt*.tar.gz)
|
||||
|
@ -385,6 +385,7 @@ libexslt/Makefile
|
||||
libexslt/exsltconfig.h
|
||||
xsltproc/Makefile
|
||||
python/Makefile
|
||||
python/tests/Makefile
|
||||
tests/Makefile
|
||||
tests/docs/Makefile
|
||||
tests/REC1/Makefile
|
||||
|
@ -1,4 +1,4 @@
|
||||
# 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)
|
||||
@ -61,7 +61,7 @@ GENERATED= $(srcdir)/libxsltclass.py \
|
||||
$(GENERATED): $(srcdir)/$(GENERATE) $(API_DESC)
|
||||
cd $(srcdir) && $(PYTHON) $(GENERATE)
|
||||
|
||||
tests: all
|
||||
tests test: all
|
||||
cd tests && $(MAKE) tests
|
||||
|
||||
clean:
|
||||
|
27
python/tests/Makefile.am
Normal file
27
python/tests/Makefile.am
Normal file
@ -0,0 +1,27 @@
|
||||
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)
|
||||
|
25
python/tests/basic.py
Executable file
25
python/tests/basic.py
Executable file
@ -0,0 +1,25 @@
|
||||
#!/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()
|
@ -1,9 +0,0 @@
|
||||
#!/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("-")
|
@ -5,8 +5,11 @@ SUBDIRS=docs REC1 REC2 REC general namespaces numbers documents \
|
||||
|
||||
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)
|
||||
|
||||
|
@ -72,7 +72,7 @@ EXTRA_DIST = \
|
||||
stand-2.7-1.out stand-2.7-1.xml
|
||||
|
||||
|
||||
all: test
|
||||
all:
|
||||
|
||||
test tests: $(top_builddir)/xsltproc/xsltproc
|
||||
@(echo > .memdump)
|
||||
|
@ -5,7 +5,7 @@ $(top_builddir)/xsltproc/xsltproc:
|
||||
|
||||
EXTRA_DIST = doc.xsl doc.xml doc.dtd result.xml
|
||||
|
||||
all: test
|
||||
all:
|
||||
|
||||
test tests: $(top_builddir)/xsltproc/xsltproc
|
||||
@(echo > .memdump)
|
||||
|
@ -5,7 +5,7 @@ $(top_builddir)/xsltproc/xsltproc:
|
||||
|
||||
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)
|
||||
|
@ -50,7 +50,10 @@ EXTRA_DIST = \
|
||||
$(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 \
|
||||
|
@ -1,13 +1,15 @@
|
||||
## 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
|
||||
|
@ -10,7 +10,7 @@ EXTRA_DIST = bredfort.css index.xml system.xml \
|
||||
message.xml message.xsl message.result
|
||||
|
||||
|
||||
all: test
|
||||
all:
|
||||
|
||||
test tests: $(top_builddir)/xsltproc/xsltproc
|
||||
@(echo > .memdump)
|
||||
|
@ -4,4 +4,5 @@ SUBDIRS=common functions math sets strings
|
||||
|
||||
all:
|
||||
|
||||
test tests: all
|
||||
test tests:
|
||||
@(cur=`pwd` ; for dir in $(SUBDIRS) ; do cd $$dir ; make tests ; cd $$cur ; done)
|
||||
|
@ -9,7 +9,7 @@ EXTRA_DIST = \
|
||||
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)
|
||||
|
@ -11,7 +11,7 @@ EXTRA_DIST = \
|
||||
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)
|
||||
|
@ -15,7 +15,7 @@ EXTRA_DIST = \
|
||||
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)
|
||||
|
@ -10,7 +10,7 @@ EXTRA_DIST = \
|
||||
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)
|
||||
|
@ -6,7 +6,7 @@ $(top_builddir)/xsltproc/xsltproc:
|
||||
EXTRA_DIST = \
|
||||
tokenize.1.xml tokenize.1.xsl tokenize.1.out
|
||||
|
||||
all: test
|
||||
all:
|
||||
|
||||
test tests: $(top_builddir)/xsltproc/xsltproc
|
||||
@(echo > .memdump)
|
||||
|
@ -8,7 +8,7 @@ EXTRA_DIST = \
|
||||
list.xml list.xsl list.out
|
||||
|
||||
|
||||
all: test
|
||||
all:
|
||||
|
||||
test tests: $(top_builddir)/xsltproc/xsltproc
|
||||
@(echo > .memdump)
|
||||
|
@ -80,7 +80,7 @@ EXTRA_DIST = \
|
||||
inner.xsl
|
||||
|
||||
|
||||
all: test
|
||||
all:
|
||||
|
||||
test tests: $(top_builddir)/xsltproc/xsltproc
|
||||
@(echo > .memdump)
|
||||
|
@ -28,7 +28,7 @@ GENERATED = \
|
||||
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)
|
||||
|
@ -10,7 +10,7 @@ EXTRA_DIST = \
|
||||
extra.out extra.xml extra.xsl \
|
||||
extra2.out extra2.xml extra2.xsl
|
||||
|
||||
all: test
|
||||
all:
|
||||
|
||||
test tests: $(top_builddir)/xsltproc/xsltproc
|
||||
@(echo > .memdump)
|
||||
|
@ -5,7 +5,7 @@ $(top_builddir)/xsltproc/xsltproc:
|
||||
|
||||
EXTRA_DIST = format-number.xsl format-number.xml format-number.out
|
||||
|
||||
all: test
|
||||
all:
|
||||
|
||||
test tests: $(top_builddir)/xsltproc/xsltproc
|
||||
@(echo > .memdump)
|
||||
|
@ -9,7 +9,7 @@ EXTRA_DIST = \
|
||||
undefvar.xml undefvar.xsl undefvar.out undefvar.err
|
||||
|
||||
|
||||
all: test
|
||||
all:
|
||||
|
||||
test tests: $(top_builddir)/xsltproc/xsltproc
|
||||
@(echo > .memdump)
|
||||
|
@ -7,7 +7,7 @@ EXTRA_DIST = REC-xml-20001006.xml xmlspec-v21.dtd W3C-REC.css \
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user