~ubuntu-branches/ubuntu/maverick/libvirt/maverick

« back to all changes in this revision

Viewing changes to tests/networkschematest

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2009-02-11 01:01:42 UTC
  • mto: (3.4.1 sid) (1.2.1 upstream) (0.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090211010142-wk9mgtbw8bmp3zcb
Tags: upstream-0.6.0
ImportĀ upstreamĀ versionĀ 0.6.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
test -z "$srcdir" && srcdir=`pwd`
 
4
test -z "$abs_srcdir" && abs_srcdir=`pwd`
 
5
 
 
6
DIRS="../qemud"
 
7
 
 
8
n=0
 
9
f=0
 
10
for dir in $DIRS
 
11
do
 
12
  XML=`find $abs_srcdir/$dir -name '*.xml'` || exit 1
 
13
 
 
14
  for xml in $XML
 
15
  do
 
16
    n=`expr $n + 1`
 
17
    printf "%4d) %.60s  " $n $(basename $(dirname $xml))"/"$(basename $xml)
 
18
    result=`xmllint --relaxng $srcdir/../docs/schemas/network.rng --noout $xml 2>&1`
 
19
    ret=$?
 
20
    if test $ret = 0; then
 
21
        echo "OK"
 
22
    else
 
23
        echo "FAILED"
 
24
        echo $result
 
25
        f=`expr $f + 1`
 
26
    fi
 
27
  done
 
28
done
 
29
echo "Validated $n files, $f failed"
 
30
 
 
31
ret=0
 
32
test $f != 0 && ret=255
 
33
exit $ret