blob: be4778f290ef9a621e8e2d31f09d0efdab4d201c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
## Process this file with automake to produce Makefile.in
all: single # Avoid doing the test in normal pass
$(top_builddir)/libxslt/xsltproc:
@(cd ../../libxslt ; make xsltproc)
EXTRA_DIST = README VERSION
tests: htmltests xhtmltests fotests
#
# a single tests to check that stuff ain't broken
#
single:
@(echo > .memdump)
@(for i in $(srcdir)/test/gdp-handbook.xml ; do \
echo -n "$$i : html " ; \
out=$(srcdir)/result/html/`basename $$i .xml`.tst; \
html=$(srcdir)/result/html/`basename $$i .xml`.html; \
$(top_builddir)/libxslt/xsltproc --nonet $(srcdir)/html/docbook.xsl $$i > $$out ; \
if [ -f $$html ] ; then \
grep -v id < $$html > $$html.noid ; \
grep -v id < $$out > $$out.noid ; \
diff $$html.noid $$out.noid ; \
rm -f $$html.noid $$out.noid ; \
else mv $$out $$html ; fi ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true; \
rm -f $$out ; \
echo -n "fo " ; \
out=$(srcdir)/result/fo/`basename $$i .xml`.tst; \
fo=$(srcdir)/result/fo/`basename $$i .xml`.fo; \
msg=$(srcdir)/result/fo/`basename $$i .xml`.msg; \
$(top_builddir)/libxslt/xsltproc --nonet $(srcdir)/fo/docbook.xsl $$i > $$out 2> $$msg ; \
if [ -f $$fo ] ; then \
grep -v id < $$fo > $$fo.noid ; \
grep -v id < $$out > $$out.noid ; \
diff $$fo.noid $$out.noid ; \
rm -f $$fo.noid $$out.noid ; \
else mv $$out $$fo ; fi ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true; \
rm -f $$out $$msg ; \
echo -n "xhtml " ; \
out=$(srcdir)/result/xhtml/`basename $$i .xml`.tst; \
xhtml=$(srcdir)/result/xhtml/`basename $$i .xml`.xhtml; \
$(top_builddir)/libxslt/xsltproc --nonet $(srcdir)/xhtml/docbook.xsl $$i > $$out ; \
if [ -f $$xhtml ] ; then \
grep -v id < $$xhtml > $$xhtml.noid ; \
grep -v id < $$out > $$out.noid ; \
diff $$xhtml.noid $$out.noid ; \
rm -f $$xhtml.noid $$out.noid ; \
else mv $$out $$xhtml ; fi ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true; \
rm -f $$out ; \
echo ; \
done )
#
# The full set of tests
#
htmltests: $(top_builddir)/libxslt/xsltproc
@(echo > .memdump)
@echo "##"
@echo "## HTML stylesheets regression tests"
@echo "##"
@(for i in $(srcdir)/test/*.xml ; do \
echo $$i ; \
out=$(srcdir)/result/html/`basename $$i .xml`.tst; \
html=$(srcdir)/result/html/`basename $$i .xml`.html; \
$(top_builddir)/libxslt/xsltproc --nonet $(srcdir)/html/docbook.xsl $$i > $$out ; \
if [ -f $$html ] ; then \
grep -v id < $$html > $$html.noid ; \
grep -v id < $$out > $$out.noid ; \
diff $$html.noid $$out.noid ; \
rm -f $$html.noid $$out.noid ; \
else mv $$out $$html ; fi ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true;\
rm -f $$out ; done )
fotests: $(top_builddir)/libxslt/xsltproc
@(echo > .memdump)
@echo "##"
@echo "## XSL FO stylesheets regression tests"
@echo "##"
@(for i in $(srcdir)/test/*.xml ; do \
echo $$i ; \
out=$(srcdir)/result/fo/`basename $$i .xml`.tst; \
fo=$(srcdir)/result/fo/`basename $$i .xml`.fo; \
msg=$(srcdir)/result/fo/`basename $$i .xml`.msg; \
$(top_builddir)/libxslt/xsltproc --nonet $(srcdir)/fo/docbook.xsl $$i > $$out 2> $$msg ; \
if [ -f $$fo ] ; then \
grep -v id < $$fo > $$fo.noid ; \
grep -v id < $$out > $$out.noid ; \
diff $$fo.noid $$out.noid ; \
rm -f $$fo.noid $$out.noid ; \
else mv $$out $$fo ; fi ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true;\
rm -f $$out $$msg ; \
done )
xhtmltests: $(top_builddir)/libxslt/xsltproc
@(echo > .memdump)
@echo "##"
@echo "## XHTML stylesheets regression tests"
@echo "##"
@(for i in $(srcdir)/test/*.xml ; do \
echo $$i ; \
out=$(srcdir)/result/xhtml/`basename $$i .xml`.tst; \
xhtml=$(srcdir)/result/xhtml/`basename $$i .xml`.xhtml; \
$(top_builddir)/libxslt/xsltproc --nonet $(srcdir)/xhtml/docbook.xsl $$i > $$out ; \
if [ -f $$xhtml ] ; then \
grep -v id < $$xhtml > $$xhtml.noid ; \
grep -v id < $$out > $$out.noid ; \
diff $$xhtml.noid $$out.noid ; \
rm -f $$xhtml.noid $$out.noid ; \
else mv $$out $$xhtml ; fi ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true;\
rm -f $$out ; done )
dist-hook:
@(cd $(srcdir) ; tar -cf - --exclude CVS common html dtd lib xhtml fo result test) | (cd $(distdir); tar xf -)
|