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

Guido Günther agx at sigxcpu.org
Tue May 1 21:04:01 UTC 2012


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




More information about the virt-tools-list mailing list