summaryrefslogtreecommitdiff
path: root/tests/exslt/functions/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'tests/exslt/functions/Makefile.am')
-rw-r--r--tests/exslt/functions/Makefile.am33
1 files changed, 26 insertions, 7 deletions
diff --git a/tests/exslt/functions/Makefile.am b/tests/exslt/functions/Makefile.am
index d2c27c00..d5dc12fc 100644
--- a/tests/exslt/functions/Makefile.am
+++ b/tests/exslt/functions/Makefile.am
@@ -20,15 +20,34 @@ valgrind:
$(MAKE) CHECKER='valgrind -q' tests
test tests: $(top_builddir)/xsltproc/xsltproc
+ @echo '## Running exslt function tests'
@(echo > .memdump)
@(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 ; \
+ 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 \
+ mv $$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 $(srcdir)/$$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)