Daniel Veillard | b1da40c | 2004-09-06 11:57:44 +0000 | [diff] [blame] | 1 | PYSCRIPTS=nist-test.py ms-test.py sun-test.py |
| 2 | TESTDIRS=msxsdtest nisttest suntest |
| 3 | TARBALL=XSTC-20020116.tar.gz |
| 4 | TARBALLURL=http://www.w3.org/2001/05/xmlschema-test-collection/$(TARBALL) |
| 5 | |
| 6 | all: |
| 7 | |
| 8 | nist-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 | |
| 15 | ms-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 | |
| 22 | sun-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 | |
| 41 | pytests: $(PYSCRIPTS) $(TESTDIRS) |
| 42 | -@(if [ -x nist-test.py -a -d nisttest ] ; then \ |
Daniel Veillard | 2cdd2f3 | 2004-09-06 12:55:41 +0000 | [diff] [blame] | 43 | echo "## Running NIST Schemas tests"; \ |
Daniel Veillard | aa9a352 | 2004-09-06 13:20:05 +0000 | [diff] [blame] | 44 | PYTHONPATH="$$PYTHONPATH:../python:../python/.libs:..:../libs" ;\ |
| 45 | export PYTHONPATH; \ |
Daniel Veillard | f31187d | 2004-09-06 14:05:06 +0000 | [diff] [blame^] | 46 | $(CHECKER) $(PYTHON) nist-test.py -s -b $(srcdir) ; fi) |
Daniel Veillard | b1da40c | 2004-09-06 11:57:44 +0000 | [diff] [blame] | 47 | -@(if [ -x sun-test.py -a -d suntest ] ; then \ |
Daniel Veillard | 2cdd2f3 | 2004-09-06 12:55:41 +0000 | [diff] [blame] | 48 | echo "## Running Sun Schemas tests"; \ |
Daniel Veillard | aa9a352 | 2004-09-06 13:20:05 +0000 | [diff] [blame] | 49 | PYTHONPATH="$$PYTHONPATH:../python:../python/.libs:..:../libs" ;\ |
| 50 | export PYTHONPATH; \ |
Daniel Veillard | f31187d | 2004-09-06 14:05:06 +0000 | [diff] [blame^] | 51 | $(CHECKER) $(PYTHON) sun-test.py -s -b $(srcdir) ; fi) |
Daniel Veillard | b1da40c | 2004-09-06 11:57:44 +0000 | [diff] [blame] | 52 | -@(if [ -x ms-test.py -a -d msxsdtest ] ; then \ |
Daniel Veillard | 2cdd2f3 | 2004-09-06 12:55:41 +0000 | [diff] [blame] | 53 | echo "## Running Microsoft Schemas tests"; \ |
Daniel Veillard | aa9a352 | 2004-09-06 13:20:05 +0000 | [diff] [blame] | 54 | PYTHONPATH="$$PYTHONPATH:../python:../python/.libs:..:../libs" ;\ |
| 55 | export PYTHONPATH; \ |
Daniel Veillard | f31187d | 2004-09-06 14:05:06 +0000 | [diff] [blame^] | 56 | $(CHECKER) $(PYTHON) ms-test.py -s -b $(srcdir) ; fi) |
Daniel Veillard | b1da40c | 2004-09-06 11:57:44 +0000 | [diff] [blame] | 57 | |
| 58 | tests: |
| 59 | -@(if [ -x $(PYTHON) ] ; then \ |
| 60 | $(MAKE) MAKEFLAGS+=--silent pytests ; fi); |
| 61 | |
Daniel Veillard | f31187d | 2004-09-06 14:05:06 +0000 | [diff] [blame^] | 62 | valgrind: |
| 63 | -@(if [ -x $(PYTHON) ] ; then \ |
| 64 | echo '## Running the regression tests under Valgrind' ; \ |
| 65 | $(MAKE) CHECKER='valgrind -q' MAKEFLAGS+=--silent pytests ; fi); |
| 66 | |
Daniel Veillard | b1da40c | 2004-09-06 11:57:44 +0000 | [diff] [blame] | 67 | clean: |
Daniel Veillard | 2cdd2f3 | 2004-09-06 12:55:41 +0000 | [diff] [blame] | 68 | rm -f $(PYSCRIPTS) test.log |
Daniel Veillard | b1da40c | 2004-09-06 11:57:44 +0000 | [diff] [blame] | 69 | |
| 70 | distclean: |
Daniel Veillard | 2cdd2f3 | 2004-09-06 12:55:41 +0000 | [diff] [blame] | 71 | rm -rf $(PYSCRIPTS) $(TESTDIRS) test.log |