summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/REC/Makefile.am72
-rw-r--r--tests/documents/Makefile.am1
-rw-r--r--tests/general/Makefile.am28
-rw-r--r--tests/plugins/Makefile.am4
4 files changed, 57 insertions, 48 deletions
diff --git a/tests/REC/Makefile.am b/tests/REC/Makefile.am
index 49f09f08..04efef94 100644
--- a/tests/REC/Makefile.am
+++ b/tests/REC/Makefile.am
@@ -3,8 +3,8 @@
$(top_builddir)/xsltproc/xsltproc:
@(cd ../../xsltproc ; $(MAKE) xsltproc)
-EXTRA_DIST = \
- article.xsl bigfont.xsl \
+EXTRA_DIST = \
+ article.xsl bigfont.xsl \
test-10-1.out test-10-1.xml test-10-1.xsl \
test-11.2-1.out test-11.2-1.xml test-11.2-1.xsl \
test-11.2-2.out test-11.2-2.xml test-11.2-2.xsl \
@@ -92,32 +92,32 @@ test tests: $(top_builddir)/xsltproc/xsltproc
-@(for i in $(srcdir)/*.xsl ; do \
name=`basename $$i .xsl` ; \
if [ ! -f $(srcdir)/$$name.xml ] ; then \
- continue ; \
+ continue ; \
fi ; \
log=`$(CHECKER) $(top_builddir)/xsltproc/xsltproc \
- $(srcdir)/$$name.xsl $(srcdir)/$$name.xml \
- > $$name.res 2>$$name.bad ; \
+ $(srcdir)/$$name.xsl $(srcdir)/$$name.xml \
+ 2>&1 > $$name.res | sed 's|$(srcdir)|.|' >$$name.bad ; \
if [ ! -f $(srcdir)/$$name.out ] ; then \
- cp $$name.res $(srcdir)/$$name.out ; \
+ 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.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 ; \
fi ; \
grep "MORY ALLO" .memdump | \
grep -v "MEMORY ALLOCATED : 0" || true` ; \
if [ -n "$$log" ] ; then \
- echo $$name result ; \
+ echo $$name result ; \
echo "$$log" ; \
fi ; \
rm -f $$name.res $$name.bad ; \
@@ -125,19 +125,19 @@ test tests: $(top_builddir)/xsltproc/xsltproc
@(for i in $(srcdir)/stand*.xml ; do \
name=`basename $$i .xml` ; \
log=`$(CHECKER) $(top_builddir)/xsltproc/xsltproc \
- $(srcdir)/$$name.xml > $$name.res 2>$$name.bad ;\
+ $(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.res ] ; then \
+ echo "Fatal error, no $$name.res\n" ; \
+ else \
+ diff $(srcdir)/$$name.stand.out $$name.res ; \
if [ -s $(srcdir)/$$name.stand.err ] ; then \
- diff $(srcdir)/$$name.stand.err $$name.bad ; \
+ diff $(srcdir)/$$name.stand.err $$name.bad ; \
else \
diff /dev/null $$name.bad; \
fi ; \
@@ -145,7 +145,7 @@ test tests: $(top_builddir)/xsltproc/xsltproc
fi ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true` ; \
if [ -n "$$log" ] ; then \
- echo $$name result ; \
+ echo $$name result ; \
echo "$$log" ; \
fi ; \
rm -f $$name.res $$name.bad ; \
@@ -154,32 +154,32 @@ test tests: $(top_builddir)/xsltproc/xsltproc
-@(for i in $(srcdir)/*.xsl ; do \
name=`basename $$i .xsl` ; \
if [ ! -f $(srcdir)/$$name.xml ] ; then \
- continue ; \
+ continue ; \
fi ; \
log=`$(CHECKER) $(top_builddir)/xsltproc/xsltproc --nodict \
- $(srcdir)/$$name.xsl $(srcdir)/$$name.xml \
- > $$name.res 2>$$name.bad ; \
+ $(srcdir)/$$name.xsl $(srcdir)/$$name.xml \
+ 2>&1 > $$name.res | sed 's|$(srcdir)|.|' >$$name.bad ; \
if [ ! -f $(srcdir)/$$name.out ] ; then \
- cp $$name.res $(srcdir)/$$name.out ; \
+ 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.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 ; \
fi ; \
grep "MORY ALLO" .memdump | \
grep -v "MEMORY ALLOCATED : 0" || true` ; \
if [ -n "$$log" ] ; then \
- echo $$name result ; \
+ echo $$name result ; \
echo "$$log" ; \
fi ; \
rm -f $$name.res $$name.bad ; \
@@ -187,19 +187,19 @@ test tests: $(top_builddir)/xsltproc/xsltproc
@(for i in $(srcdir)/stand*.xml ; do \
name=`basename $$i .xml` ; \
log=`$(CHECKER) $(top_builddir)/xsltproc/xsltproc --nodict \
- $(srcdir)/$$name.xml > $$name.res 2>$$name.bad ;\
+ $(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.res ] ; then \
+ echo "Fatal error, no $$name.res\n" ; \
+ else \
+ diff $(srcdir)/$$name.stand.out $$name.res ; \
if [ -s $(srcdir)/$$name.stand.err ] ; then \
- diff $(srcdir)/$$name.stand.err $$name.bad ; \
+ diff $(srcdir)/$$name.stand.err $$name.bad ; \
else \
diff /dev/null $$name.bad; \
fi ; \
@@ -207,7 +207,7 @@ test tests: $(top_builddir)/xsltproc/xsltproc
fi ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true` ; \
if [ -n "$$log" ] ; then \
- echo $$name result ; \
+ echo $$name result ; \
echo "$$log" ; \
fi ; \
rm -f $$name.res $$name.bad ; \
diff --git a/tests/documents/Makefile.am b/tests/documents/Makefile.am
index 6cd98a08..173d7d9c 100644
--- a/tests/documents/Makefile.am
+++ b/tests/documents/Makefile.am
@@ -27,6 +27,7 @@ test tests: $(top_builddir)/xsltproc/xsltproc
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true;\
rm -f result)
@($(CHECKER) $(top_builddir)/xsltproc/xsltproc $(srcdir)/test.xsl $(srcdir)/test_bad.xml > result 2>err ; \
+ sed 's|$(srcdir)/||' err > err.tmp; mv err.tmp err; \
diff $(srcdir)/test_bad.result result; \
diff $(srcdir)/test_bad.err err; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true;\
diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am
index 0c2ef307..0611667b 100644
--- a/tests/general/Makefile.am
+++ b/tests/general/Makefile.am
@@ -209,26 +209,30 @@ test tests: $(top_builddir)/xsltproc/xsltproc
if [ ! -f $$j ] ; then continue ; fi ; \
if [ -d $$j ] ; then continue ; fi ; \
name=`basename $$j .xsl`; \
+ real_docs_path=`cd $(srcdir)/../docs && pwd`; \
out=$(srcdir)/"$$name".out; \
err=$(srcdir)/"$$name".err; \
log=`$(CHECKER) $(top_builddir)/xsltproc/xsltproc $$j $$i \
- > result.$$name 2>err.$$name; \
+ 2>&1 > result.$$name | sed 's|$(srcdir)|.|' >err.$$name; \
if [ ! -f $$out ] ; then \
- cp result.$$name $$out ; \
+ cp result.$$name $$out ; \
if [ -s err.$$name ] ; then \
cp err.$$name $$err ; \
fi ; \
else \
- diff $$out result.$$name; \
+ grep '../docs/' $$out >/dev/null && \
+ sed "s|$$real_docs_path|../docs|" result.$$name > \
+ result.$$name.tmp && mv result.$$name.tmp result.$$name; \
+ diff $$out result.$$name; \
if [ -s $$err ] ; then \
- diff $$err err.$$name; \
+ 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 $$name result ; \
echo "$$log" ; \
fi ; \
rm -f result.$$name err.$$name; \
@@ -241,26 +245,30 @@ test tests: $(top_builddir)/xsltproc/xsltproc
if [ ! -f $$j ] ; then continue ; fi ; \
if [ -d $$j ] ; then continue ; fi ; \
name=`basename $$j .xsl`; \
+ real_docs_path=`cd $(srcdir)/../docs && pwd`; \
out=$(srcdir)/"$$name".out; \
err=$(srcdir)/"$$name".err; \
log=`$(CHECKER) $(top_builddir)/xsltproc/xsltproc --nodict $$j $$i \
- > result.$$name 2>err.$$name; \
+ 2>&1 > result.$$name | sed 's|$(srcdir)|.|' >err.$$name; \
if [ ! -f $$out ] ; then \
- cp result.$$name $$out ; \
+ cp result.$$name $$out ; \
if [ -s err.$$name ] ; then \
cp err.$$name $$err ; \
fi ; \
else \
- diff $$out result.$$name; \
+ grep '../docs/' $$out >/dev/null && \
+ sed "s|$$real_docs_path|../docs|" result.$$name > \
+ result.$$name.tmp && mv result.$$name.tmp result.$$name; \
+ diff $$out result.$$name; \
if [ -s $$err ] ; then \
- diff $$err err.$$name; \
+ 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 $$name result ; \
echo "$$log" ; \
fi ; \
rm -f result.$$name err.$$name; \
diff --git a/tests/plugins/Makefile.am b/tests/plugins/Makefile.am
index e0736ab9..132fe133 100644
--- a/tests/plugins/Makefile.am
+++ b/tests/plugins/Makefile.am
@@ -29,8 +29,8 @@ test-logall:
test tests: $(top_builddir)/xsltproc/xsltproc test-logall $(noinst_LTLIBRARIES)
@LD_LIBRARY_PATH=$(plugindir):$(top_builddir)/libxslt/.libs:$(LD_LIBRARY_PATH) \
LIBXSLT_PLUGINS_PATH=$(plugindir) \
- $(top_builddir)/xsltproc/xsltproc plugin.xsl plugin.xml > plugin.res
- @diff plugin.out plugin.res
+ $(top_builddir)/xsltproc/xsltproc $(srcdir)/plugin.xsl $(srcdir)/plugin.xml > plugin.res
+ @diff $(srcdir)/plugin.out plugin.res
@rm plugin.res
else