~ubuntu-branches/ubuntu/karmic/libvirt/karmic-proposed

« back to all changes in this revision

Viewing changes to tests/capabilityschematest

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2009-02-11 01:01:42 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090211010142-8zrm7z1u6ryfhkiq
Tags: 0.6.0-1ubuntu1
* Merge with Debian experimental. Remaining changes:
  - debian/control:
    + Don't build-depend on QEmu.
    + Add "XS-Debian-" prefix to Debian's Vcs headers.
    + Bump bridge-utils, dnsmasq-base, netcat-openbsd, and iptables
      to Depends of libvirt-bin.
    + s/interract/interact/g
    + Add versioned Conflicts/Replaces to libvirt0 for libvirt0-dbg,
      since we used to ship them as such.
  - Rename libvirt group to libvirtd.
  - 0005-delayed_iff_up_bridge.patch: Don't try to bring up the bridge
    before at least one interface has been added to it.
  - dont_clobber_existing_bridges.patch: Assign the name of the virtual
    bridge dynamically to avoid interfering with existing bridges.
  - better_default_uri_virsh.patch: Default to qemu:///system if the
    user has write access to the libvirt socket, otherwise
    qemu:///session.
  - We call libxen-dev libxen3-dev, so change all references.
  - Included (but did not enable) opennebula patch (since it's not in
    main yet).

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
DOMAINDIRS="capabilityschemadata xencapsdata"
 
7
 
 
8
 
 
9
n=0
 
10
f=0
 
11
for dir in $DOMAINDIRS
 
12
do
 
13
  XML=`find $abs_srcdir/$dir -name '*.xml'` || exit 1
 
14
 
 
15
  for xml in $XML
 
16
  do
 
17
    n=`expr $n + 1`
 
18
    printf "%4d) %.60s  " $n $(basename $(dirname $xml))"/"$(basename $xml)
 
19
    result=`xmllint --relaxng $srcdir/../docs/schemas/capability.rng --noout $xml 2>&1`
 
20
    ret=$?
 
21
    if test $ret = 0; then
 
22
        echo "OK"
 
23
    else
 
24
        echo "FAILED"
 
25
        echo $result
 
26
        f=`expr $f + 1`
 
27
    fi
 
28
  done
 
29
done
 
30
echo "Validated $n files, $f failed"
 
31
 
 
32
ret=0
 
33
test $f != 0 && ret=255
 
34
exit $ret