Adapted the XS tests to use the new release of tests and test-definitions.
* xstc/Makefile.am xstc.py xstc-to-python.xsl: Adapted the
XS tests to use the new release of tests and test-definitions.
diff --git a/xstc/Makefile.am b/xstc/Makefile.am
index 6927abb..7627d73 100644
--- a/xstc/Makefile.am
+++ b/xstc/Makefile.am
@@ -2,16 +2,23 @@
# Definition for the tests from W3C
#
PYSCRIPTS=nist-test.py ms-test.py sun-test.py
-TESTDIRS=msxsdtest nisttest suntest
-TARBALL=XSTC-20020116.tar.gz
-TARBALLURL=http://www.w3.org/2001/05/xmlschema-test-collection/$(TARBALL)
+TESTDIR=Tests
+TESTDIRS=$(TESTDIR)/msxsdtest $(TESTDIR)/suntest $(TESTDIR)/Datatypes
+TARBALL=xsts-2002-01-16.tar.gz
+TARBALL_2=xsts-2004-01-14.tar.gz
+TSNAME=xmlschema2002-01-16
+TSNAME_2=xmlschema2004-01-14
+TARBALLURL=http://www.w3.org/XML/2004/xml-schema-test-suite/$(TSNAME)/$(TARBALL)
+TARBALLURL_2=http://www.w3.org/XML/2004/xml-schema-test-suite/$(TSNAME_2)/$(TARBALL_2)
+MSTESTDEF=MSXMLSchema1-0-20020116.testSet
+SUNTESTDEF=SunXMLSchema1-0-20020116.testSet
+NISTTESTDEF=NISTXMLSchema1-0-20020116.testSet
+NISTTESTDEF_2=NISTXMLSchemaDatatypes.testSet
#
# The local data and scripts
#
-EXTRA_DIST=xstc.py sun-test-def.xml ms-test-def.xml nist-test-def.xml \
- xstc-to-python.xsl
-
+EXTRA_DIST=xstc.py xstc-to-python.xsl
#
# Nothing is done by make, only make tests and
# only if Python and Schemas are enabled.
@@ -19,72 +26,82 @@
all:
#
-# The python tests are generated via XSLT
-#
-nist-test.py: nist-test-def.xml xstc-to-python.xsl
- -@(if [ -x $(XSLTPROC) ] ; then \
- echo "Rebuilding script" $@ ; \
- $(XSLTPROC) --nonet $(srcdir)/xstc-to-python.xsl \
- $(srcdir)/nist-test-def.xml > $@ ; \
- chmod +x $@ ; fi )
-
-ms-test.py: ms-test-def.xml xstc-to-python.xsl
- -@(if [ -x $(XSLTPROC) ] ; then \
- echo "Rebuilding script" $@ ; \
- $(XSLTPROC) --nonet $(srcdir)/xstc-to-python.xsl \
- $(srcdir)/ms-test-def.xml > $@ ; \
- chmod +x $@ ; fi )
-
-sun-test.py: sun-test-def.xml xstc-to-python.xsl
- -@(if [ -x $(XSLTPROC) ] ; then \
- echo "Rebuilding script" $@ ; \
- $(XSLTPROC) --nonet $(srcdir)/xstc-to-python.xsl \
- $(srcdir)/sun-test-def.xml > $@ ; \
- chmod +x $@ ; fi )
-
-#
# Rule to load the test description and extract the informations
#
-$(TESTDIRS):
- -@(if [ ! -f $(TARBALL) ] ; then \
- echo "Missing the test suite description, trying to fetch it" ;\
- if [ -x /usr/bin/wget ] ; then \
- wget $(TARBALLURL) ; \
+$(TESTDIRS) Tests/$(NISTTESTDEF_2) Tests/$(MSTTESTDEF) Tests/$(SUNTESTDEF):
+ -@(if [ ! -d Tests ] ; then \
+ mkdir Tests ; \
+ fi)
+ -@(if [ ! -f $(TARBALL) ] ; then \
+ echo "Missing the test suite description (2002-01-16), trying to fetch it" ;\
+ if [ -x /usr/bin/wget ] ; then \
+ wget $(TARBALLURL) ; \
else echo "Dont' know how to fetch $(TARBALLURL)" ; fi ; fi)
- -@(if [ -f $(TARBALL) ] ; then \
- echo -n "extracting tests directories..." ; \
- $(TAR) -xzf $(TARBALL) $(TESTDIRS) ; \
- echo "done" ; \
- fi);
- -@(if [ -x fixup-tests.py ] ; then \
- chmod -R u+w msxsdtest; \
- echo "## Microsoft tests fixups"; \
- PYTHONPATH="../python:../python/.libs:..:../libs:$$PYTHONPATH" ;\
- export PYTHONPATH; \
- LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
- $(PYTHON) fixup-tests.py ; fi)
+ -@(if [ -f $(TARBALL) ] ; then \
+ echo -n "extracting test data (Sun, Microsoft)..." ; \
+ $(TAR) -C Tests --strip-path 1 -xzf $(TARBALL) '*/suntest' '*/msxsdtest' '*/$(MSTESTDEF)' '*/$(SUNTESTDEF)' ; \
+ echo "done" ; \
+ fi)
+ -@(if [ ! -f $(TARBALL_2) ] ; then \
+ echo "Missing the test suite description (2004-01-14), trying to fetch it" ;\
+ if [ -x /usr/bin/wget ] ; then \
+ wget $(TARBALLURL_2) ; \
+ else echo "Dont' know how to fetch $(TARBALLURL_2)" ; fi ; fi)
+ -@(if [ -f $(TARBALL_2) ] ; then \
+ echo -n "extracting test data (NIST)..." ; \
+ $(TAR) -C Tests --strip-path 1 -xzf $(TARBALL_2) '*/Datatypes' ; \
+ $(TAR) -C Tests --strip-path 2 -xzf $(TARBALL_2) '*/Metadata/$(NISTTESTDEF_2)' ; \
+ echo "done" ; \
+ fi)
+
+#
+# The python tests are generated via XSLT
+#
+nist-test.py: Tests/$(NISTTESTDEF_2) xstc-to-python.xsl
+ -@(if [ -x $(XSLTPROC) ] ; then \
+ echo "Rebuilding script (NIST)" $@ ; \
+ $(XSLTPROC) --nonet --stringparam vendor NIST-2 \
+ $(srcdir)/xstc-to-python.xsl \
+ $(srcdir)/Tests/$(NISTTESTDEF_2) > $@ ; \
+ chmod +x $@ ; fi )
+
+ms-test.py: Tests/$(MSTTESTDEF) xstc-to-python.xsl
+ -@(if [ -x $(XSLTPROC) ] ; then \
+ echo "Rebuilding script (Microsoft)" $@ ; \
+ $(XSLTPROC) --nonet --stringparam vendor MS \
+ $(srcdir)/xstc-to-python.xsl \
+ $(srcdir)/Tests/$(MSTESTDEF) > $@ ; \
+ chmod +x $@ ; fi )
+
+sun-test.py: Tests/$(SUNTESTDEF) xstc-to-python.xsl
+ -@(if [ -x $(XSLTPROC) ] ; then \
+ echo "Rebuilding script (Sun)" $@ ; \
+ $(XSLTPROC) --nonet --stringparam vendor SUN \
+ $(srcdir)/xstc-to-python.xsl \
+ $(srcdir)/Tests/$(SUNTESTDEF) > $@ ; \
+ chmod +x $@ ; fi )
#
# The actual test run if present. PYTHONPATH is updated to make sure
# we run the version from the loacl build and not preinstalled bindings
#
pytests: $(PYSCRIPTS) $(TESTDIRS)
- -@(if [ -x nist-test.py -a -d nisttest ] ; then \
- echo "## Running NIST Schemas tests"; \
+ -@(if [ -x nist-test.py -a -d $(TESTDIR)/Datatypes ] ; then \
+ echo "## Running XML Schema tests (NIST)"; \
PYTHONPATH="../python:../python/.libs:..:../libs:$$PYTHONPATH" ;\
export PYTHONPATH; \
LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
export LD_LIBRARY_PATH; \
$(CHECKER) $(PYTHON) nist-test.py -s -b $(srcdir) ; fi)
- -@(if [ -x sun-test.py -a -d suntest ] ; then \
- echo "## Running Sun Schemas tests"; \
+ -@(if [ -x sun-test.py -a -d $(TESTDIR)/suntest ] ; then \
+ echo "## Running Schema tests (Sun)"; \
PYTHONPATH="../python:../python/.libs:..:../libs:$$PYTHONPATH" ;\
export PYTHONPATH; \
LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
export LD_LIBRARY_PATH; \
$(CHECKER) $(PYTHON) sun-test.py -s -b $(srcdir) ; fi)
- -@(if [ -x ms-test.py -a -d msxsdtest ] ; then \
- echo "## Running Microsoft Schemas tests"; \
+ -@(if [ -x ms-test.py -a -d $(TESTDIR)/msxsdtest ] ; then \
+ echo "## Running Schema tests (Microsoft)"; \
PYTHONPATH="../python:../python/.libs:..:../libs:$$PYTHONPATH" ;\
export PYTHONPATH; \
LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \