added test to Makefile to run xml validation on prov-xml testcases
authorStephan Zednik <zednis@rpi.edu>
Wed, 30 Jan 2013 14:47:50 -0700
changeset 5461 b1a7f53929cf
parent 5460 02e7bdfe51fe
child 5462 81cd981d4428
added test to Makefile to run xml validation on prov-xml testcases
testcases/Makefile
--- a/testcases/Makefile	Wed Jan 30 14:13:57 2013 -0500
+++ b/testcases/Makefile	Wed Jan 30 14:47:50 2013 -0700
@@ -1,6 +1,8 @@
 TXTFILES = rdf-tests.txt provn-tests.txt xml-tests.txt all-tests.txt
 BASE_URL = https://dvcs.w3.org/hg/prov/raw-file/default/testcases/
 
+XML_SCHEMA = ../xml/schema/prov.xsd
+
 all:	$(TXTFILES)
 
 rdf-tests.txt:
@@ -14,3 +16,10 @@
 
 all-tests.txt:
 	grep -Eo '[a-z]+/[a-zA-Z0-9-]+\.[ttl|provn|provx|trig]+' process.html | sed "s|^|$(BASE_URL)|" >> [email protected]
+
+run-xml-tests: xml-tests.txt
+	# for each record in xml-tests.txt
+	for i in `cat xml-tests.txt`; do \
+	j=`echo $$i | sed "s|$(BASE_URL)||"` ; \
+	xmllint --noout --schema $(XML_SCHEMA) $$j ; \
+	done