File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / libxml2 / xstc / Makefile.am
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Sun Jun 15 19:53:38 2014 UTC (10 years, 9 months ago) by misho
Branches: libxml2, MAIN
CVS tags: v2_9_1p0, v2_9_1, HEAD
libxml2 2.9.1

    1: #
    2: # Definition for the tests from W3C
    3: #
    4: PYSCRIPTS=nist-test.py ms-test.py sun-test.py
    5: TESTDIR=Tests
    6: TESTDIRS=$(TESTDIR)/msxsdtest $(TESTDIR)/suntest $(TESTDIR)/Datatypes
    7: TARBALL=xsts-2002-01-16.tar.gz
    8: TARBALL_2=xsts-2004-01-14.tar.gz
    9: TSNAME=xmlschema2002-01-16
   10: TSNAME_2=xmlschema2004-01-14
   11: TARBALLURL=http://www.w3.org/XML/2004/xml-schema-test-suite/$(TSNAME)/$(TARBALL)
   12: TARBALLURL_2=http://www.w3.org/XML/2004/xml-schema-test-suite/$(TSNAME_2)/$(TARBALL_2)
   13: MSTESTDEF=MSXMLSchema1-0-20020116.testSet
   14: SUNTESTDEF=SunXMLSchema1-0-20020116.testSet
   15: NISTTESTDEF=NISTXMLSchema1-0-20020116.testSet
   16: NISTTESTDEF_2=NISTXMLSchemaDatatypes.testSet
   17: 
   18: #
   19: # The local data and scripts
   20: #
   21: EXTRA_DIST=xstc.py xstc-to-python.xsl
   22: #
   23: # Nothing is done by make, only make tests and
   24: # only if Python and Schemas are enabled.
   25: #
   26: all:
   27: 
   28: #
   29: # Rule to load the test description and extract the informations
   30: #
   31: $(TESTDIRS) Tests/Metadata/$(NISTTESTDEF_2) Tests/Metadata/$(MSTTESTDEF) Tests/Metadata/$(SUNTESTDEF):
   32: 	-@(if [ ! -d Tests ] ; then \
   33: 	   mkdir Tests ; \
   34: 	   fi)
   35: 	-@(if [ ! -f $(TARBALL_2) ] ; then \
   36: 	   if [ -f $(srcdir)/$(TARBALL_2) ] ; then \
   37: 	   $(LN_S) $(srcdir)/$(TARBALL_2) $(TARBALL_2) ; else \
   38: 	   echo "Missing the test suite description (2004-01-14), trying to fetch it" ;\
   39: 	   if [ -x "$(WGET)" ] ; then \
   40: 	   $(WGET) $(TARBALLURL_2) ; \
   41: 	   else echo "Dont' know how to fetch $(TARBALLURL_2)" ; fi ; fi ; fi)
   42: 	-@(if [ -f $(TARBALL_2) ] ; then \
   43: 	   echo -n "extracting test data (NIST)..." ; \
   44: 	   $(TAR) -xzf $(TARBALL_2) --wildcards '*/Datatypes' '*/Metadata/$(NISTTESTDEF_2)' ; \
   45: 	   echo "done" ; \
   46: 	   fi)
   47: 	-@(if [ ! -f $(TARBALL) ] ; then \
   48: 	   if [ -f $(srcdir)/$(TARBALL) ] ; then \
   49: 	   $(LN_S) $(srcdir)/$(TARBALL) $(TARBALL) ; else \
   50: 	   echo "Missing the test suite description (2002-01-16), trying to fetch it" ;\
   51: 	   if [ -x "$(WGET)" ] ; then \
   52: 	   $(WGET) $(TARBALLURL) ; \
   53: 	   else echo "Dont' know how to fetch $(TARBALLURL)" ; fi ; fi ; fi)
   54: 	-@(if [ -f $(TARBALL) ] ; then \
   55: 	   echo -n "extracting test data (Sun, Microsoft)..." ; \
   56: 	   $(TAR) -C Tests -xzf $(TARBALL) --wildcards '*/suntest' '*/msxsdtest' '*/$(MSTESTDEF)' '*/$(SUNTESTDEF)' ; \
   57: 	   if [ -d Tests/suntest ] ; then rm -r Tests/suntest ; fi ; \
   58: 	   if [ -d Tests/msxsdtest ] ; then rm -r Tests/msxsdtest ; fi ; \
   59: 	   mv Tests/xmlschema2002-01-16/* Tests ; \
   60: 	   mv Tests/*.testSet Tests/Metadata ; \
   61: 	   rm -r Tests/xmlschema2002-01-16 ; \
   62: 	   echo "done" ; \
   63: 	   fi)
   64: 
   65: #
   66: # The python tests are generated via XSLT
   67: #
   68: nist-test.py: Tests/Metadata/$(NISTTESTDEF_2) xstc-to-python.xsl
   69: 	-@(if [ -x $(XSLTPROC) ] ; then \
   70: 	  echo "Rebuilding script (NIST)" $@ ; \
   71: 	  $(XSLTPROC) --nonet --stringparam vendor NIST-2 \
   72: 	                     $(srcdir)/xstc-to-python.xsl \
   73: 	                     $(srcdir)/Tests/Metadata/$(NISTTESTDEF_2) > $@ ; \
   74: 	  chmod +x $@ ; fi )
   75: 
   76: ms-test.py: Tests/Metadata/$(MSTTESTDEF) xstc-to-python.xsl
   77: 	-@(if [ -x $(XSLTPROC) ] ; then \
   78: 	  echo "Rebuilding script (Microsoft)" $@ ; \
   79: 	  $(XSLTPROC) --nonet --stringparam vendor MS \
   80: 	                     $(srcdir)/xstc-to-python.xsl \
   81: 	                     $(srcdir)/Tests/Metadata/$(MSTESTDEF) > $@ ; \
   82: 	  chmod +x $@ ; fi )
   83: 
   84: sun-test.py: Tests/Metadata/$(SUNTESTDEF) xstc-to-python.xsl
   85: 	-@(if [ -x $(XSLTPROC) ] ; then \
   86: 	  echo "Rebuilding script (Sun)" $@ ; \
   87: 	  $(XSLTPROC) --nonet --stringparam vendor SUN \
   88: 	                     $(srcdir)/xstc-to-python.xsl \
   89: 	                     $(srcdir)/Tests/Metadata/$(SUNTESTDEF) > $@ ; \
   90: 	  chmod +x $@ ; fi )
   91: 
   92: #
   93: # The actual test run if present. PYTHONPATH is updated to make sure
   94: # we run the version from the loacl build and not preinstalled bindings
   95: #
   96: pytests: $(PYSCRIPTS) $(TESTDIRS)
   97: 	-@(if [ -x nist-test.py -a -d $(TESTDIR)/Datatypes ] ; then 		\
   98: 	   echo "## Running XML Schema tests (NIST)";			\
   99: 	   PYTHONPATH="../python:../python/.libs:..:../.libs:$$PYTHONPATH" ;\
  100: 	   export PYTHONPATH;						\
  101: 	   LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ;	\
  102: 	   export LD_LIBRARY_PATH;					\
  103: 	   $(CHECKER) $(PYTHON) nist-test.py -s -b $(srcdir) ; fi)
  104: 	-@(if [ -x sun-test.py -a -d $(TESTDIR)/suntest ] ; then 			\
  105: 	   echo "## Running Schema tests (Sun)";				\
  106: 	   PYTHONPATH="../python:../python/.libs:..:../.libs:$$PYTHONPATH" ;\
  107: 	   export PYTHONPATH;						\
  108: 	   LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ;	\
  109: 	   export LD_LIBRARY_PATH;					\
  110: 	   $(CHECKER) $(PYTHON) sun-test.py -s -b $(srcdir) ; fi)
  111: 	-@(if [ -x ms-test.py -a -d $(TESTDIR)/msxsdtest ] ; then 			\
  112: 	   echo "## Running Schema tests (Microsoft)";			\
  113: 	   PYTHONPATH="../python:../python/.libs:..:../.libs:$$PYTHONPATH" ;\
  114: 	   export PYTHONPATH;						\
  115: 	   LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ;	\
  116: 	   export LD_LIBRARY_PATH;					\
  117: 	   $(CHECKER) $(PYTHON) ms-test.py -s -b $(srcdir) ; fi)
  118: 
  119: tests:
  120: 	-@(if [ -x $(PYTHON) ] ; then 					\
  121: 	   $(MAKE) pytests ; fi);
  122: 
  123: #
  124: # Heavy, works well only on RHEL3
  125: #
  126: valgrind:
  127: 	-@(if [ -x $(PYTHON) ] ; then 					\
  128: 	   echo '## Running the regression tests under Valgrind' ;	\
  129: 	   $(MAKE) CHECKER='valgrind -q' pytests ; fi);
  130: 
  131: CLEANFILES=$(PYSCRIPTS) test.log
  132: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>