[virt-tools-list] [libosinfo] tests: skip schema check if xmllint is missing

Daniel P. Berrange berrange at redhat.com
Wed May 2 09:14:26 UTC 2012


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 :|




More information about the virt-tools-list mailing list