summaryrefslogtreecommitdiff
path: root/tests/general/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'tests/general/Makefile.am')
-rw-r--r--tests/general/Makefile.am34
1 files changed, 26 insertions, 8 deletions
diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am
index 156caa4f..2d08bee9 100644
--- a/tests/general/Makefile.am
+++ b/tests/general/Makefile.am
@@ -63,7 +63,7 @@ EXTRA_DIST = \
bug-56.out bug-56.xsl \
bug-57.out bug-57.xsl \
bug-59.out bug-59.xsl \
- bug-60.out bug-60.xsl \
+ bug-60.out bug-60.xsl bug-60.err \
bug-61.out bug-61.xsl \
bug-62-inc.out bug-62-inc.xsl \
bug-62.out bug-62.xsl \
@@ -150,6 +150,7 @@ EXTRA_DIST = \
bug-142.out bug-142.xsl \
bug-143.out bug-143.xsl \
bug-144.out bug-144.xsl \
+ bug-145.out bug-145.xsl bug-145.err \
character.out character.xsl \
character2.out character2.xsl \
itemschoose.out itemschoose.xsl \
@@ -163,8 +164,9 @@ valgrind:
$(MAKE) CHECKER='valgrind -q' tests
test tests: $(top_builddir)/xsltproc/xsltproc
+ @echo '## Running general tests'
@(echo > .memdump)
- @(for i in $(srcdir)/../docs/*.xml ; do \
+ -@(for i in $(srcdir)/../docs/*.xml ; do \
if [ -d $$i ] ; then continue ; fi ; \
doc=`basename $$i .xml` ; \
for j in $(srcdir)/$$doc*.xsl ; do \
@@ -172,11 +174,27 @@ test tests: $(top_builddir)/xsltproc/xsltproc
if [ -d $$j ] ; then continue ; fi ; \
name=`basename $$j .xsl`; \
out=$(srcdir)/"$$name".out; \
- echo Running $$j on $$i ; \
- $(CHECKER) $(top_builddir)/xsltproc/xsltproc $$j $$i > result.$$name;\
- if [ ! -f $$out ] ; then cp result.$$name $$out ; \
- else diff $$out result.$$name; fi ; \
- grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true;\
- rm -f result.$$name ; \
+ err=$(srcdir)/"$$name".err; \
+ log=`$(CHECKER) $(top_builddir)/xsltproc/xsltproc $$j $$i \
+ > result.$$name 2>err.$$name; \
+ if [ ! -f $$out ] ; then \
+ cp result.$$name $$out ; \
+ if [ -s err.$$name ] ; then \
+ cp err.$$name $$err ; \
+ fi ; \
+ else \
+ diff $$out result.$$name; \
+ if [ -s $$err ] ; then \
+ diff $$err err.$$name; \
+ else \
+ diff /dev/null err.$$name; \
+ fi ; \
+ fi ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true`;\
+ if [ -n "$$log" ] ; then \
+ echo $$name result ; \
+ echo $$log ; \
+ fi ; \
+ rm -f result.$$name err.$$name; \
done ; done)