blob: a5db6c1dcf40a80229932761e1458bdbfcc19d62 [file] [log] [blame]
Daniel Veillardb1da40c2004-09-06 11:57:44 +00001PYSCRIPTS=nist-test.py ms-test.py sun-test.py
2TESTDIRS=msxsdtest nisttest suntest
3TARBALL=XSTC-20020116.tar.gz
4TARBALLURL=http://www.w3.org/2001/05/xmlschema-test-collection/$(TARBALL)
5
6all:
7
8nist-test.py: nist-test-def.xml xstc-to-python.xsl
9 -@(if [ -x $(bindir)/xsltproc ] ; then \
10 echo "Rebuilding script" $@ ; \
11 $(bindir)/xsltproc --nonet $(srcdir)/xstc-to-python.xsl \
12 $(srcdir)/nist-test-def.xml > $@ ; \
13 chmod +x $@ ; fi )
14
15ms-test.py: ms-test-def.xml xstc-to-python.xsl
16 -@(if [ -x $(bindir)/xsltproc ] ; then \
17 echo "Rebuilding script" $@ ; \
18 $(bindir)/xsltproc --nonet $(srcdir)/xstc-to-python.xsl \
19 $(srcdir)/ms-test-def.xml > $@ ; \
20 chmod +x $@ ; fi )
21
22sun-test.py: sun-test-def.xml xstc-to-python.xsl
23 -@(if [ -x $(bindir)/xsltproc ] ; then \
24 echo "Rebuilding script" $@ ; \
25 $(bindir)/xsltproc --nonet $(srcdir)/xstc-to-python.xsl \
26 $(srcdir)/sun-test-def.xml > $@ ; \
27 chmod +x $@ ; fi )
28
29$(TESTDIRS):
30 -@(if [ ! -f $(TARBALL) ] ; then \
31 echo "Missing the test suite description, trying to fetch it" ;\
32 if [ -x /usr/bin/wget ] ; then \
33 wget $(TARBALLURL) ; \
34 else echo "Dont' know how to fetch $(TARBALLURL)" ; fi ; fi)
35 -@(if [ -f $(TARBALL) ] ; then \
36 echo -n "extracting tests directories..." ; \
37 $(TAR) -xzf $(TARBALL) $(TESTDIRS) ; \
38 echo "done" ; \
39 fi);
40
41pytests: $(PYSCRIPTS) $(TESTDIRS)
42 -@(if [ -x nist-test.py -a -d nisttest ] ; then \
43 echo "# Running NIST Schemas tests"; \
44 ./nist-test.py -s ; fi)
45 -@(if [ -x sun-test.py -a -d suntest ] ; then \
46 echo "# Running Sun Schemas tests"; \
47 ./sun-test.py -s ; fi)
48 -@(if [ -x ms-test.py -a -d msxsdtest ] ; then \
49 echo "# Running Microsoft Schemas tests"; \
50 ./ms-test.py -s ; fi)
51
52tests:
53 -@(if [ -x $(PYTHON) ] ; then \
54 $(MAKE) MAKEFLAGS+=--silent pytests ; fi);
55
56clean:
57 rm -f $(PYSCRIPTS)
58
59distclean:
60 rm -rf $(PYSCRIPTS) $(TESTDIRS)