iotests: Skip 233 if certtool not installed
authorEric Blake <eblake@redhat.com>
Tue, 20 Nov 2018 22:52:41 +0000 (16:52 -0600)
committerKevin Wolf <kwolf@redhat.com>
Wed, 21 Nov 2018 14:17:37 +0000 (15:17 +0100)
The use of TLS while building qemu is optional. While the
'certtool' binary should be available on every platform that
supports building against TLS, that does not imply that the
developer has installed it.  Make the test gracefully skip
in that case.

Reported-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/common.tls

index 39f17c1b999fff49632851d84883681793dd724a..eae81789bbcc9b4ff44a0a2427c6a81a8a645776 100644 (file)
@@ -31,6 +31,9 @@ tls_x509_cleanup()
 
 tls_x509_init()
 {
+    (certtool --help) >/dev/null 2>&1 || \
+       _notrun "certtool utility not found, skipping test"
+
     mkdir -p "${tls_dir}"
 
     # use a fixed key so we don't waste system entropy on