From: Bart Van Assche Date: Thu, 13 Oct 2011 18:16:29 +0000 (+0000) Subject: drd, XML: add xsd schema description and a script to verify the DRD XML output agains... X-Git-Tag: svn/VALGRIND_3_7_0~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ee7cc8779d5b4ff2859c045f2ab937b610fece8;p=thirdparty%2Fvalgrind.git drd, XML: add xsd schema description and a script to verify the DRD XML output against the xsd git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12147 --- diff --git a/drd/Testing.txt b/drd/Testing.txt index d2428e9ac3..4581a06efa 100644 --- a/drd/Testing.txt +++ b/drd/Testing.txt @@ -83,3 +83,7 @@ How to test DRD drd/scripts/download-and-build-firefox Now run the following command: LD_LIBRARY_PATH=$HOME/software/mozilla-build/dist/lib: ./vg-in-place --tool=drd --check-stack-var=yes --trace-children=yes --show-confl-seg=no $HOME/software/mozilla-build/dist/bin/firefox-bin + +13. Verify that the XML output matches the DRD XML output XSD. + + drd/tests/verify-xml-output diff --git a/drd/docs/drd-xml-output.xsd b/drd/docs/drd-xml-output.xsd new file mode 100644 index 0000000000..5c7ae5ef94 --- /dev/null +++ b/drd/docs/drd-xml-output.xsd @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/drd/tests/verify-xml-output b/drd/tests/verify-xml-output new file mode 100755 index 0000000000..e0df6f8a2b --- /dev/null +++ b/drd/tests/verify-xml-output @@ -0,0 +1,22 @@ +#!/bin/sh + +cd "$(dirname $0)" || exit $? +for f in *.vgtest +do + b="${f%.vgtest}" + if [ ${b%_xml} != $b ]; then + continue + fi + echo === $b + prereq="$(sed -n 's/^prereq: //p' $f)" + if [ "$prereq" = "" ]; then + prereq="true" + fi + prog="$(sed -n 's/^prog: //p' $f)" + args="$(sed -n 's/^args: //p' $f)" + vgopts="$(sed -n 's/^vgopts: //p' $f)" + if eval $prereq; then + ../../vg-in-place --tool=drd --xml=yes --xml-file=$b.xml $vgopts ./$prog $args + xmllint --noout --schema ../docs/drd-xml-output.xsd $b.xml 2>&1 | tee $b.xmllint + fi +done