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:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -492,6 +492,7 @@ Makefile.in
|
||||
/python/__pycache__
|
||||
/python/setup.py
|
||||
/python/stamp-extra-files
|
||||
/python/t/tests_helper.py
|
||||
/python/utils.c
|
||||
/qemu-wrapper.sh
|
||||
/rescue/stamp-virt-rescue.pod
|
||||
|
||||
@@ -78,9 +78,13 @@ TESTS = \
|
||||
|
||||
if ENABLE_APPLIANCE
|
||||
TESTS += \
|
||||
test-virt-alignment-scan.sh \
|
||||
test-virt-alignment-scan.sh
|
||||
|
||||
if HAVE_LIBVIRT
|
||||
TESTS += \
|
||||
test-virt-alignment-scan-guests.sh
|
||||
endif
|
||||
endif
|
||||
|
||||
check-valgrind:
|
||||
$(MAKE) VG="@VG@" check
|
||||
|
||||
@@ -240,6 +240,7 @@ AC_CONFIG_FILES([Makefile
|
||||
python/Makefile
|
||||
python/examples/Makefile
|
||||
python/setup.py
|
||||
python/t/tests_helper.py
|
||||
rescue/Makefile
|
||||
resize/Makefile
|
||||
ruby/Makefile
|
||||
|
||||
@@ -82,8 +82,12 @@ TESTS = \
|
||||
|
||||
if ENABLE_APPLIANCE
|
||||
TESTS += \
|
||||
test-virt-df.sh \
|
||||
test-virt-df.sh
|
||||
|
||||
if HAVE_LIBVIRT
|
||||
TESTS += \
|
||||
test-virt-df-guests.sh
|
||||
endif
|
||||
endif ENABLE_APPLIANCE
|
||||
|
||||
check-valgrind:
|
||||
|
||||
@@ -277,15 +277,19 @@ TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
TESTS = \
|
||||
test-a.sh \
|
||||
test-add-domain.sh \
|
||||
test-add-uri.sh \
|
||||
test-d.sh \
|
||||
test-docs.sh \
|
||||
test-escapes.sh \
|
||||
test-events.sh \
|
||||
test-invalid-params.sh \
|
||||
test-tilde.sh
|
||||
|
||||
if HAVE_LIBVIRT
|
||||
TESTS += \
|
||||
test-add-domain.sh \
|
||||
test-d.sh
|
||||
endif
|
||||
|
||||
if ENABLE_APPLIANCE
|
||||
TESTS += \
|
||||
test-copy.sh \
|
||||
|
||||
@@ -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:
|
||||
@@ -19,9 +19,13 @@ include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-max-disks.pl \
|
||||
test-qemu-drive-libvirt.sh \
|
||||
test-qemu-drive.sh
|
||||
|
||||
if HAVE_LIBVIRT
|
||||
TESTS += \
|
||||
test-qemu-drive-libvirt.sh
|
||||
endif
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
$(top_builddir)/run --test
|
||||
|
||||
|
||||
@@ -255,21 +255,30 @@ TESTS = \
|
||||
test-v2v-i-ova-gz.sh \
|
||||
test-v2v-i-ova-subfolders.sh \
|
||||
test-v2v-i-ova-two-disks.sh \
|
||||
test-v2v-copy-to-local.sh \
|
||||
test-v2v-bad-networks-and-bridges.sh
|
||||
|
||||
if HAVE_LIBVIRT
|
||||
TESTS += \
|
||||
test-v2v-copy-to-local.sh
|
||||
endif
|
||||
|
||||
if HAVE_OCAML_PKG_OUNIT
|
||||
TESTS += v2v_unit_tests
|
||||
endif
|
||||
|
||||
if ENABLE_APPLIANCE
|
||||
TESTS += \
|
||||
test-v2v-cdrom.sh \
|
||||
test-v2v-floppy.sh \
|
||||
test-v2v-i-ova.sh \
|
||||
test-v2v-i-disk.sh \
|
||||
test-v2v-in-place.sh \
|
||||
test-v2v-machine-readable.sh \
|
||||
test-v2v-virtio-win-iso.sh \
|
||||
test-v2v-windows-conversion.sh
|
||||
|
||||
if HAVE_LIBVIRT
|
||||
TESTS += \
|
||||
test-v2v-cdrom.sh \
|
||||
test-v2v-floppy.sh \
|
||||
test-v2v-in-place.sh \
|
||||
test-v2v-networks-and-bridges.sh \
|
||||
test-v2v-no-copy.sh \
|
||||
test-v2v-o-glance.sh \
|
||||
@@ -283,9 +292,8 @@ TESTS += \
|
||||
test-v2v-on-option.sh \
|
||||
test-v2v-print-source.sh \
|
||||
test-v2v-sound.sh \
|
||||
test-v2v-virtio-win-iso.sh \
|
||||
test-v2v-windows-conversion.sh \
|
||||
$(SLOW_TESTS)
|
||||
endif
|
||||
endif ENABLE_APPLIANCE
|
||||
|
||||
check-valgrind:
|
||||
|
||||
Reference in New Issue
Block a user