Re: [libosinfo] tests: skip schema check if xmllint is missing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 01, 2012 at 11:04:01PM +0200, Guido Günther wrote:
> ---
> This makes it more obvious why the test fails/isn't being run.
> Cheers,
>  -- Guido
> 
>  test/test-xml-validate |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/test/test-xml-validate b/test/test-xml-validate
> index e5be325..93a2d6b 100755
> --- a/test/test-xml-validate
> +++ b/test/test-xml-validate
> @@ -45,4 +45,8 @@ exit $ret
>  DIRS="oses hypervisors devices"
>  SCHEMA="libosinfo.rng"
>  
> -check_schema "$DIRS" "$SCHEMA"
> +if xmllint --version >/dev/null 2>&1; then
> +        check_schema "$DIRS" "$SCHEMA"
> +else
> +        skip_test_ 'xmllint not found'
> +fi

I think we should be adding a check for 'xmllint' to the configure
script, to make it obvious to people that xmllint is required. We
could still allow the tests to be skipped if xmllint is not found
by configure though.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux