2006-05-09 15:35:46 +00:00
|
|
|
## Process this file with automake to produce Makefile.in
|
|
|
|
|
2019-03-22 17:23:09 -05:00
|
|
|
## Copyright (C) 2005-2019 Red Hat, Inc.
|
2013-05-14 17:42:12 -06:00
|
|
|
##
|
|
|
|
## This library is free software; you can redistribute it and/or
|
|
|
|
## modify it under the terms of the GNU Lesser General Public
|
|
|
|
## License as published by the Free Software Foundation; either
|
|
|
|
## version 2.1 of the License, or (at your option) any later version.
|
|
|
|
##
|
|
|
|
## This library is distributed in the hope that it will be useful,
|
|
|
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
## Lesser General Public License for more details.
|
|
|
|
##
|
|
|
|
## You should have received a copy of the GNU Lesser General Public
|
|
|
|
## License along with this library. If not, see
|
|
|
|
## <http://www.gnu.org/licenses/>.
|
2011-07-28 12:56:24 -06:00
|
|
|
|
2008-11-18 12:46:13 +00:00
|
|
|
if WITH_QEMU
|
2016-04-26 15:04:55 +02:00
|
|
|
test_helpers += qemucapsprobe
|
2013-09-03 20:39:16 -06:00
|
|
|
endif WITH_QEMU
|
2008-11-18 12:46:13 +00:00
|
|
|
|
2014-05-19 14:47:31 +02:00
|
|
|
if WITH_VBOX
|
|
|
|
test_programs += vboxsnapshotxmltest
|
|
|
|
endif WITH_VBOX
|
|
|
|
|
2010-12-21 22:39:55 +01:00
|
|
|
if WITH_VMX
|
2012-03-27 16:35:01 +01:00
|
|
|
test_programs += vmx2xmltest xml2vmxtest
|
2013-09-03 20:39:16 -06:00
|
|
|
endif WITH_VMX
|
2009-09-23 14:25:52 +02:00
|
|
|
|
2013-09-18 09:30:35 -05:00
|
|
|
if WITH_VMWARE
|
|
|
|
test_programs += vmwarevertest
|
|
|
|
endif WITH_VMWARE
|
|
|
|
|
2018-08-13 13:40:18 +02:00
|
|
|
if WITH_YAJL
|
2017-06-26 16:47:26 +02:00
|
|
|
test_programs += virjsontest
|
2018-08-13 13:40:18 +02:00
|
|
|
endif WITH_YAJL
|
2011-06-30 15:08:29 +01:00
|
|
|
|
2016-03-19 19:56:02 +03:00
|
|
|
if WITH_NSS
|
2016-11-29 13:48:53 +01:00
|
|
|
test_helpers += nsslinktest nssguestlinktest
|
2016-03-19 19:56:02 +03:00
|
|
|
endif WITH_NSS
|
|
|
|
|
2016-06-07 18:54:43 +02:00
|
|
|
test_scripts =
|
2017-11-03 13:09:47 +01:00
|
|
|
libvirtd_test_scripts = \
|
|
|
|
libvirtd-fail \
|
|
|
|
libvirtd-pool \
|
2020-03-05 15:42:53 +00:00
|
|
|
virsh-auth \
|
2017-11-03 13:09:47 +01:00
|
|
|
virsh-cpuset \
|
|
|
|
virsh-define-dev-segfault \
|
|
|
|
virsh-int-overflow \
|
|
|
|
virsh-optparse \
|
|
|
|
virsh-read-bufsiz \
|
|
|
|
virsh-read-non-seekable \
|
|
|
|
virsh-schedinfo \
|
|
|
|
virsh-self-test \
|
|
|
|
virt-admin-self-test \
|
2019-07-06 10:48:59 -05:00
|
|
|
virsh-checkpoint \
|
2019-03-22 17:23:09 -05:00
|
|
|
virsh-snapshot \
|
2017-11-03 13:09:47 +01:00
|
|
|
virsh-start \
|
|
|
|
virsh-undefine \
|
|
|
|
virsh-uriprecedence \
|
|
|
|
virsh-vcpupin \
|
2012-09-12 11:25:51 -06:00
|
|
|
$(NULL)
|
2012-03-27 16:35:01 +01:00
|
|
|
|
2016-04-21 11:24:21 -04:00
|
|
|
if WITH_LIBVIRTD
|
|
|
|
test_scripts += $(libvirtd_test_scripts)
|
2020-07-13 14:59:41 +02:00
|
|
|
endif WITH_LIBVIRTD
|
2007-12-11 21:20:13 +00:00
|
|
|
|
2009-10-08 16:34:22 +02:00
|
|
|
if WITH_SECDRIVER_APPARMOR
|
2017-07-28 11:49:38 +02:00
|
|
|
if WITH_LIBVIRTD
|
2009-10-08 16:34:22 +02:00
|
|
|
test_scripts += virt-aa-helper-test
|
2017-07-28 11:49:38 +02:00
|
|
|
endif WITH_LIBVIRTD
|
|
|
|
endif WITH_SECDRIVER_APPARMOR
|
2007-11-14 10:35:58 +00:00
|
|
|
|
2016-04-18 16:15:35 +02:00
|
|
|
if WITH_LINUX
|
|
|
|
check-access: file-access-clean
|
|
|
|
VIR_TEST_FILE_ACCESS=1 $(MAKE) $(AM_MAKEFLAGS) check
|
2019-08-30 13:22:54 +01:00
|
|
|
$(RUNUTF8) $(PYTHON) $(top_srcdir)/scripts/check-file-access.py \
|
2019-12-04 14:58:04 +01:00
|
|
|
$(abs_builddir)/test_file_access.txt \
|
2020-06-16 09:39:12 +01:00
|
|
|
$(abs_srcdir)/permitted_file_access.txt | sort -u
|
2016-04-18 16:15:35 +02:00
|
|
|
|
|
|
|
file-access-clean:
|
|
|
|
> test_file_access.txt
|
|
|
|
endif WITH_LINUX
|
|
|
|
|
2012-03-27 16:35:01 +01:00
|
|
|
noinst_PROGRAMS = $(test_programs) $(test_helpers)
|
2011-06-24 12:04:37 +02:00
|
|
|
|
2012-03-27 16:35:01 +01:00
|
|
|
TESTS = $(test_programs) \
|
|
|
|
$(test_scripts)
|
2010-10-07 16:35:17 +02:00
|
|
|
|
2017-02-03 13:15:43 +01:00
|
|
|
VALGRIND = valgrind --quiet --leak-check=full --trace-children=yes \
|
2020-02-22 00:51:41 +01:00
|
|
|
--trace-children-skip="*/tools/virsh","*/tests/commandhelper","/usr/bin/*" \
|
2019-03-11 22:19:00 +09:00
|
|
|
--suppressions=$(abs_srcdir)/.valgrind.supp
|
2006-08-24 16:00:19 +00:00
|
|
|
valgrind:
|
2018-05-02 17:54:08 +01:00
|
|
|
$(MAKE) check VG="$(LIBTOOL) --mode=execute $(VALGRIND)"
|
2006-08-24 16:00:19 +00:00
|
|
|
|
2008-11-18 12:46:13 +00:00
|
|
|
if WITH_QEMU
|
2016-04-26 15:04:55 +02:00
|
|
|
qemucapsprobe_SOURCES = \
|
|
|
|
qemucapsprobe.c
|
|
|
|
qemucapsprobe_LDADD = \
|
|
|
|
libqemutestdriver.la $(LDADDS)
|
2020-07-13 14:59:41 +02:00
|
|
|
endif WITH_QEMU
|
2007-07-18 21:34:22 +00:00
|
|
|
|
2014-05-19 14:47:31 +02:00
|
|
|
if WITH_VBOX
|
|
|
|
vboxsnapshotxmltest_SOURCES = \
|
|
|
|
vboxsnapshotxmltest.c \
|
|
|
|
testutils.c testutils.h
|
|
|
|
vbox_LDADDS = ../src/libvirt_driver_vbox_impl.la
|
|
|
|
vboxsnapshotxmltest_LDADD = $(LDADDS) $(vbox_LDADDS)
|
2020-07-13 14:59:41 +02:00
|
|
|
endif WITH_VBOX
|
2014-05-19 14:47:31 +02:00
|
|
|
|
2010-12-21 22:39:55 +01:00
|
|
|
if WITH_VMX
|
2009-09-23 14:25:52 +02:00
|
|
|
vmx2xmltest_SOURCES = \
|
|
|
|
vmx2xmltest.c \
|
|
|
|
testutils.c testutils.h
|
2012-04-02 16:45:01 +01:00
|
|
|
vmx2xmltest_LDADD = $(LDADDS)
|
2009-09-23 14:25:52 +02:00
|
|
|
|
|
|
|
xml2vmxtest_SOURCES = \
|
|
|
|
xml2vmxtest.c \
|
|
|
|
testutils.c testutils.h
|
2012-04-02 16:45:01 +01:00
|
|
|
xml2vmxtest_LDADD = $(LDADDS)
|
2020-07-13 14:59:41 +02:00
|
|
|
endif WITH_VMX
|
2009-09-23 14:25:52 +02:00
|
|
|
|
2013-09-18 09:30:35 -05:00
|
|
|
if WITH_VMWARE
|
|
|
|
vmwarevertest_SOURCES = \
|
|
|
|
vmwarevertest.c \
|
|
|
|
testutils.c testutils.h
|
|
|
|
vmwarevertest_LDADD = $(LDADDS)
|
2020-07-13 14:59:41 +02:00
|
|
|
endif WITH_VMWARE
|
2013-09-18 09:30:35 -05:00
|
|
|
|
2016-12-25 15:02:48 +01:00
|
|
|
if WITH_NSS
|
2016-03-03 15:29:51 +01:00
|
|
|
## Intentionaly not linking with anything else.
|
|
|
|
## See the test source for more detailed explanation.
|
|
|
|
nsslinktest_SOURCES = nsslinktest.c
|
2017-11-03 13:09:47 +01:00
|
|
|
nsslinktest_CFLAGS = \
|
|
|
|
$(AM_CFLAGS) \
|
2016-03-03 15:29:51 +01:00
|
|
|
-I$(top_srcdir)/tools/nss
|
|
|
|
nsslinktest_LDADD = ../tools/nss/libnss_libvirt_impl.la
|
|
|
|
nsslinktest_LDFLAGS = $(NULL)
|
|
|
|
|
2016-11-29 13:48:53 +01:00
|
|
|
nssguestlinktest_SOURCES = nsslinktest.c
|
2017-11-03 13:09:47 +01:00
|
|
|
nssguestlinktest_CFLAGS = \
|
|
|
|
-DLIBVIRT_NSS_GUEST \
|
|
|
|
$(AM_CFLAGS) \
|
2016-11-29 13:48:53 +01:00
|
|
|
-I$(top_srcdir)/tools/nss
|
|
|
|
nssguestlinktest_LDADD = ../tools/nss/libnss_libvirt_guest_impl.la
|
|
|
|
nssguestlinktest_LDFLAGS = $(NULL)
|
2020-07-13 14:59:41 +02:00
|
|
|
endif WITH_NSS
|
2016-11-29 13:48:53 +01:00
|
|
|
|
2018-08-13 13:40:18 +02:00
|
|
|
if WITH_YAJL
|
2016-11-25 07:30:30 +01:00
|
|
|
virmacmaptest_SOURCES = \
|
|
|
|
virmacmaptest.c testutils.h testutils.c
|
|
|
|
virmacmaptest_LDADD = $(LDADDS)
|
|
|
|
|
2019-07-16 09:33:38 +02:00
|
|
|
virnetdevopenvswitchtest_SOURCES = \
|
|
|
|
virnetdevopenvswitchtest.c testutils.h testutils.c
|
|
|
|
virnetdevopenvswitchtest_LDADD = $(LDADDS)
|
|
|
|
|
|
|
|
test_programs += \
|
|
|
|
virmacmaptest \
|
|
|
|
virnetdevopenvswitchtest
|
2020-07-13 14:59:41 +02:00
|
|
|
endif WITH_YAJL
|
2016-12-25 10:13:31 +01:00
|
|
|
|
2017-06-26 16:47:26 +02:00
|
|
|
virjsontest_SOURCES = \
|
|
|
|
virjsontest.c testutils.h testutils.c
|
|
|
|
virjsontest_LDADD = $(LDADDS)
|