diff options
-rw-r--r-- | ChangeLog | 20 | ||||
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | tests/Makefile.am | 5 | ||||
-rw-r--r-- | tests/REC/Makefile.am | 75 | ||||
-rw-r--r-- | tests/REC/test-2.5-1.err | 4 | ||||
-rw-r--r-- | tests/REC1/Makefile.am | 7 |
6 files changed, 95 insertions, 21 deletions
@@ -1,3 +1,23 @@ +Sat Mar 6 23:05:11 HKT 2004 William Brack <wbrack@mmm.com.hk> + + * Makefile.am, tests/Makefile.am, tests/REC/Makefile.am, + tests/REC1/Makefile.am, tests/REC2/Makefile.am, + tests/XSLTMark/Makefile.am, tests/docbook/Makefile.am, + tests/exslt/common/Makefile.am, tests/exslt/date/Makefile.am, + tests/exslt/functions/Makefile.am, tests/exslt/math/Makefile.am, + tests/exslt/sets/Makefile.am, tests/exslt/strings/Makefile.am, + tests/extensions/Makefile.am, tests/general/Makefile.am, + tests/keys/Makefile.am, tests/multiple/Makefile.am, + tests/namespaces/Makefile.am, tests/numbers/Makefile.am, + tests/reports/Makefile.am, test/xmlspec/Makefile.am, + tests/general/bug-60.err, tests/docbook/result/html/gdp-handbook.err, + tests/REC/test-2.5-1.err: + Major enhancement to "make tests". All but Python tests + cleaned up to produce minimum summary output if no problems. + * tests/general/bug-145.xsl, tests/general/bug-145.err, + tests/docs/Makefile.am, tests/docs/bug-145.xml: + Added test case for bugzilla bug 135938 + Thu Mar 4 23:02:18 HKT 2004 William Brack <wbrack@mmm.com.hk> * libxslt/xsltutils.h, libxslt/xsltutils.c, libxslt/preproc.c: diff --git a/Makefile.am b/Makefile.am index 52d3c38f..31fff1c4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -42,8 +42,9 @@ check-local: tests dummy: tests: dummy - @(cd tests ; $(MAKE) tests) - @(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; $(MAKE) tests ; fi) + @echo '## Running the regression test suite' + @(cd tests ; $(MAKE) MAKEFLAGS+=--silent tests) + @(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; $(MAKE) MAKEFLAGS+=--silent tests ; fi) valgrind: @echo '## Running the regression tests under Valgrind' diff --git a/tests/Makefile.am b/tests/Makefile.am index a1589203..8fd4e8b5 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -5,6 +5,11 @@ SUBDIRS=docs REC1 REC2 REC general namespaces keys numbers documents \ all: +# Each subdirectory has it's own Makefile to cater for the unique +# requirements of that subdirectory. In general, xsltproc will be +# run on the *.xsl / *.xml file combinations, and the output of that +# run will be compared with the "expected" output contained in *.out +# and (if errors are expected) in *.err test tests: @(cur=`pwd` ; for dir in $(SUBDIRS) ; do cd $$dir ; $(MAKE) CHECKER='$(CHECKER)' tests ; cd $$cur ; done) diff --git a/tests/REC/Makefile.am b/tests/REC/Makefile.am index 120e2acb..bc2c10a7 100644 --- a/tests/REC/Makefile.am +++ b/tests/REC/Makefile.am @@ -19,7 +19,7 @@ EXTRA_DIST = \ test-16.1-2.out test-16.1-2.xml test-16.1-2.xsl \ test-2.3-1.out test-2.3-1.xml test-2.3-1.xsl \ test-2.3-2.out test-2.3-2.xml test-2.3-2.xsl \ - test-2.5-1.out test-2.5-1.xml test-2.5-1.xsl \ + test-2.5-1.out test-2.5-1.xml test-2.5-1.xsl test-2.5-1.err \ test-2.6.2-1.out test-2.6.2-1.xml test-2.6.2-1.xsl \ test-5.2-1.out test-5.2-1.xml test-5.2-1.xsl \ test-5.2-2.out test-5.2-2.xml test-5.2-2.xsl \ @@ -80,25 +80,66 @@ valgrind: test tests: $(top_builddir)/xsltproc/xsltproc @(echo > .memdump) - @(for i in $(srcdir)/*.xsl ; do \ + @echo '## Running REC tests' + -@(for i in $(srcdir)/*.xsl ; do \ name=`basename $$i .xsl` ; \ - if [ ! -f $(srcdir)/$$name.xml ] ; then continue ; fi ; \ - echo $$name.xml ; \ - $(CHECKER) $(top_builddir)/xsltproc/xsltproc $(srcdir)/$$name.xsl $(srcdir)/$$name.xml > $$name.res;\ - if [ ! -f $(srcdir)/$$name.out ] ; then cp $$name.res $(srcdir)/$$name.out ; \ - else if [ ! -s $$name.res ] ; then echo "Fatal error, no $$name.res\n" ; \ - else diff $(srcdir)/$$name.out $$name.res ; fi ; fi; \ - grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true;\ - rm -f $$name.res ; \ + if [ ! -f $(srcdir)/$$name.xml ] ; then \ + continue ; \ + fi ; \ + log=`$(CHECKER) $(top_builddir)/xsltproc/xsltproc \ + $(srcdir)/$$name.xsl $(srcdir)/$$name.xml \ + > $$name.res 2>$$name.bad ; \ + if [ ! -f $(srcdir)/$$name.out ] ; then \ + cp $$name.res $(srcdir)/$$name.out ; \ + if [ -s $$name.bad ] ; then \ + cp $$name.bad $(srcdir)/$$name.err ; \ + fi ; \ + else \ + if [ ! -s $$name.res ] ; then \ + echo "Fatal error, no $$name.res\n" ; \ + else \ + diff $(srcdir)/$$name.out $$name.res ; \ + if [ -s $$name.err ] ; then \ + diff $(srcdir)/$$name.err $$name.bad ; \ + else \ + diff /dev/null $$name.bad ; \ + fi ; \ + fi ; \ + fi ; \ + grep "MORY ALLO" .memdump | \ + grep -v "MEMORY ALLOCATED : 0" || true` ; \ + if [ -n "$$log" ] ; then \ + echo $$name result ; \ + echo $$log ; \ + fi ; \ + rm -f $$name.res $$name.bad ; \ done) @(for i in $(srcdir)/stand*.xml ; do \ name=`basename $$i .xml` ; \ - echo $$name.xml ; \ - $(CHECKER) $(top_builddir)/xsltproc/xsltproc $(srcdir)/$$name.xml > $$name.res;\ - if [ ! -f $(srcdir)/$$name.stand.out ] ; then cp $$name.res $(srcdir)/$$name.stand.out ; \ - else if [ ! -s $$name.res ] ; then echo "Fatal error, no $$name.res\n" ; \ - else diff $(srcdir)/$$name.stand.out $$name.res ; fi ; fi; \ - grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true;\ - rm -f $$name.res ; \ + log=`$(CHECKER) $(top_builddir)/xsltproc/xsltproc \ + $(srcdir)/$$name.xml > $$name.res 2>$$name.bad ;\ + if [ ! -f $(srcdir)/$$name.stand.out ] ; then \ + cp $$name.res $(srcdir)/$$name.stand.out ; \ + if [ -s $$name.bad ] ; then \ + cp $$name.bad $(srcdir)/$$name.stand.err ; \ + fi ; \ + else \ + if [ ! -s $$name.res ] ; then \ + echo "Fatal error, no $$name.res\n" ; \ + else \ + diff $(srcdir)/$$name.stand.out $$name.res ; \ + if [ -s $$name.stand.err ] ; then \ + diff $(srcdir)/$$name.stand.err $$name.bad ; \ + else \ + diff /dev/null $$name.bad; \ + fi ; \ + fi ; \ + fi ; \ + grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true` ; \ + if [ -n "$$log" ] ; then \ + echo $$name result ; \ + echo $$log ; \ + fi ; \ + rm -f $$name.res $$name.bad ; \ done) diff --git a/tests/REC/test-2.5-1.err b/tests/REC/test-2.5-1.err new file mode 100644 index 00000000..7fbacdd7 --- /dev/null +++ b/tests/REC/test-2.5-1.err @@ -0,0 +1,4 @@ +compilation error: file ./test-2.5-1.xsl line 6 element exciting-new-1.8-feature +xsltStylePreCompute: unknown xsl:exciting-new-1.8-feature +compilation error: file ./test-2.5-1.xsl line 2 element stylesheet +xsl:version: only 1.0 features are supported diff --git a/tests/REC1/Makefile.am b/tests/REC1/Makefile.am index 510d357a..3b00f0be 100644 --- a/tests/REC1/Makefile.am +++ b/tests/REC1/Makefile.am @@ -11,10 +11,13 @@ valgrind: @echo '## Running the regression tests under Valgrind' $(MAKE) CHECKER='valgrind -q' tests +# No special stuff here, just a single test that either works or doesn't! test tests: $(top_builddir)/xsltproc/xsltproc + @echo '## Running REC1 tests' @(echo > .memdump) - @($(CHECKER) $(top_builddir)/xsltproc/xsltproc $(srcdir)/doc.xsl $(srcdir)/doc.xml > doc.res ; \ + @($(CHECKER) $(top_builddir)/xsltproc/xsltproc \ + $(srcdir)/doc.xsl $(srcdir)/doc.xml > doc.res ; \ diff $(srcdir)/result.xml doc.res ; \ - grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true;\ + grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true; \ rm -f doc.res) |