mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
tests: Disable some tests so they don't break when ./configure --without-libvirt
This commit is contained in:
@@ -29,6 +29,7 @@ from .tests_helper import *
|
||||
guestsdir = os.environ['guestsdir']
|
||||
|
||||
|
||||
@skipUnlessConfiguredWithLibvirt()
|
||||
@skipUnlessLibvirtHasCPointer()
|
||||
class Test910Libvirt(unittest.TestCase):
|
||||
def test_libvirt(self):
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# libguestfs Python bindings
|
||||
# Copyright (C) 2016 Red Hat Inc.
|
||||
# Copyright (C) 2016-2017 Red Hat Inc.
|
||||
# @configure_input@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -27,6 +28,14 @@ else:
|
||||
int_type = long
|
||||
|
||||
|
||||
def skipUnlessConfiguredWithLibvirt():
|
||||
"""
|
||||
Skip the current class/method if ./configure --without-libvirt
|
||||
"""
|
||||
if "@LIBVIRT_LIBS@" == "":
|
||||
return unittest.skip("configured --without-libvirt")
|
||||
return lambda func: func
|
||||
|
||||
def skipUnlessLibvirtHasCPointer():
|
||||
"""
|
||||
Skip the current class/method if:
|
||||
Reference in New Issue
Block a user