Joel E. Denny wrote:
On Sun, 18 Nov 2007, Joel E. Denny wrote:
On Sat, 17 Nov 2007, Joel E. Denny wrote:
On Wed, 14 Nov 2007, Akim Demaille wrote:
It might be time to write some (simple) tests of the XML output. If I
have some time I will, but...
We might consider adding a maintainer-xml-check similar to
maintainer-push-check. That is, we might test the XSLT output against the
--report and --graph output for all grammars in the test suite. Of
course, this would not help with xml2xhtml.xsl, so it would definitely
need its own test cases.
I'm sure we could come up with something in M4 to make this happen.
Unfortunately, the "Big triangle" and "Big horizontal" torture tests never
complete on my system when testing xml2dot.xsl, so we would want to be
able to specify that certain test cases be skipped.
Using the following patch, here's what I've been doing to test
xml2text.xsl and xml2dot.xsl:
BISON_TEST_XML=1 ./testsuite 1-156 159-
M4 seems like a cleaner approach, but maybe we can salvage some of this
patch.
Here's an uncommitted patch that implements maintainer-xml-check with a
new macro named AT_BISON_CHECK. It also uses AT_BISON_CHECK to replace
the ugly AT_CHECK rewrite from testsuite.at.
What should we do about xsltproc detection? Should we just mention
xsltproc in README-hacking and assume every maintainer will have it in his
PATH? Should we check for it in configure.ac using AC_PATH_PROG? The
patch below does not do the latter.
Yes, and IMO the test should be done unconditionally if xsltproc is
available.
Also, this:
AT_CHECK([[xsltproc \
`]]AT_QUELL_VALGRIND[[ bison
-print-datadir`/xslt/xml2text.xsl \
xml-tests/test.xml > xml-tests/test.xml.output]])
AT_CHECK([[diff -u xml-tests/test.output xml-tests/test.xml.output]])
should be done like this since Autotest knows how to do diffs:
AT_CHECK([xsltproc \
`AT_QUELL_VALGRIND bison -print-datadir`/xslt/xml2text.xsl \
xml-tests/test.xml], 0, [xml-tests/test.output])])
(i.e. first it should tell autotest to do the diff itself, and second I
don't see the point in double-quoting if we know macros like xsltproc
and bison are not going to be defined).
Paolo