Makefile.am 4.8 KB
Newer Older
K
Karel Zak 已提交
1 2
## Process this file with automake to produce Makefile.in

3 4
SHELL = $(PREFERABLY_POSIX_SHELL)

5
SUBDIRS = confdata sexpr2xmldata \
6
  xml2sexprdata xmconfigdata xencapsdata
7

K
Karel Zak 已提交
8
INCLUDES = \
9
	-I$(top_srcdir)/gnulib/lib -I../gnulib/lib \
K
Karel Zak 已提交
10 11
	-I$(top_builddir)/include \
	-I$(top_builddir)/src \
12 13
	-I$(top_srcdir)/include \
	-I$(top_srcdir)/src \
14 15
	$(LIBXML_CFLAGS) \
	$(GNUTLS_CFLAGS) \
16
	$(SASL_CFLAGS) \
17
	$(SELINUX_CFLAGS) \
18
        -DGETTEXT_PACKAGE=\"$(PACKAGE)\" \
19
         $(COVERAGE_CFLAGS) \
20
         $(WARN_CFLAGS)
21

22 23 24 25 26
if WITH_DRIVER_MODULES
INCLUDES += \
	-DTEST_DRIVER_DIR=\"$(top_builddir)/src/.libs\"
endif

K
Karel Zak 已提交
27 28
LDADDS = \
	@STATIC_BINARIES@ \
29 30
	$(LIBXML_LIBS) \
        $(GNUTLS_LIBS) \
31
        $(SASL_LIBS) \
32
        $(SELINUX_LIBS) \
33
        $(WARN_CFLAGS) \
34
	../src/libvirt_test.la \
35
	../gnulib/lib/libgnu.la \
J
John Levon 已提交
36
	$(LIBSOCKET) \
37
        $(COVERAGE_LDFLAGS)
K
Karel Zak 已提交
38

39
EXTRA_DIST =		\
40
        oomtrace.pl     \
41
	test-lib.sh	\
42
	qemuxml2argvdata \
43
	nodeinfodata     \
44 45 46
	capabilityschematest \
	capabilityschemadata \
	networkschematest \
J
Jim Meyering 已提交
47
	domainschematest \
48 49 50 51 52 53 54
	domainschemadata \
	storagepoolschematest \
	storagepoolschemadata \
	storagevolschematest \
	storagevolschemadata \
	nodedevschematest \
	nodedevschemadata
K
Karel Zak 已提交
55

J
Jim Meyering 已提交
56
noinst_PROGRAMS = virshtest conftest \
57
        nodeinfotest statstest qparamtest
58

59 60 61 62
if WITH_XEN
noinst_PROGRAMS += xml2sexprtest sexpr2xmltest \
	reconnect xmconfigtest xencapstest
endif
63 64 65 66
if WITH_QEMU
noinst_PROGRAMS += qemuxml2argvtest qemuxml2xmltest
endif

M
Mark McLoughlin 已提交
67 68
noinst_PROGRAMS += nodedevxml2xmltest

69 70 71 72 73 74 75 76
test_scripts = \
	capabilityschematest \
	networkschematest \
	storagepoolschematest \
	storagevolschematest \
	domainschematest \
	nodedevschematest

A
Atsushi SAKAI 已提交
77
if WITH_LIBVIRTD
78 79 80 81 82 83
test_scripts +=				\
	test_conf.sh			\
	cpuset				\
	daemon-conf			\
	define-dev-segfault		\
	int-overflow			\
J
Jim Meyering 已提交
84
	libvirtd-fail			\
J
Jim Meyering 已提交
85
	libvirtd-net-persist		\
J
Jim Meyering 已提交
86
	libvirtd-pool			\
87 88 89 90 91 92
	read-bufsiz			\
	read-non-seekable		\
	start				\
	undefine			\
	vcpupin				\
	virsh-all			\
J
Jim Meyering 已提交
93
	virsh-synopsis
A
Atsushi SAKAI 已提交
94
endif
95

96 97
EXTRA_DIST += $(test_scripts)

98 99 100 101 102 103 104 105 106 107 108
TESTS = virshtest \
        nodeinfotest \
	statstest \
	qparamtest \
	$(test_scripts)

if WITH_XEN
TESTS += xml2sexprtest \
	sexpr2xmltest \
	xmconfigtest \
	xencapstest
109
if ENABLE_XEN_TESTS
110 111
TESTS += reconnect
endif
112
endif
113

114 115 116
if WITH_QEMU
TESTS += qemuxml2argvtest qemuxml2xmltest
endif
K
Karel Zak 已提交
117

M
Mark McLoughlin 已提交
118 119
TESTS += nodedevxml2xmltest

J
Jim Meyering 已提交
120 121
path_add = $$abs_top_builddir/src$(PATH_SEPARATOR)$$abs_top_builddir/qemud

122 123 124
# NB, automake < 1.10 does not provide the real
# abs_top_{src/build}dir variables, so don't rely
# on them here. Fake them with 'pwd'
125
TESTS_ENVIRONMENT =				\
J
Jim Meyering 已提交
126 127
  abs_top_builddir=`cd '$(top_builddir)'; pwd`	\
  abs_top_srcdir=`cd '$(top_srcdir)'; pwd`	\
128 129
  abs_builddir=`cd '$(builddir)'; pwd`		\
  abs_srcdir=`cd '$(srcdir)'; pwd`		\
130
  CONFIG_HEADER='$(abs_top_builddir)/config.h'	\
J
Jim Meyering 已提交
131
  PATH="$(path_add)$(PATH_SEPARATOR)$$PATH"	\
132
  SHELL="$(SHELL)"				\
133
  LIBVIRT_DRIVER_DIR="$(abs_top_builddir)/src/.libs" \
134
  LIBVIRT_DEBUG="error"				\
135
  LC_ALL=C					\
136 137
  $(VG)

138
valgrind:
139
	$(MAKE) check VG="valgrind --quiet --leak-check=full --suppressions=$(srcdir)/.valgrind.supp"
140

141
if WITH_XEN
142
xml2sexprtest_SOURCES = \
143
	xml2sexprtest.c testutilsxen.c testutilsxen.h \
144
	testutils.c testutils.h
145
xml2sexprtest_LDADD = ../src/libvirt_driver_xen.la $(LDADDS)
146 147

sexpr2xmltest_SOURCES = \
148
	sexpr2xmltest.c testutilsxen.c testutilsxen.h \
149
	testutils.c testutils.h
150
sexpr2xmltest_LDADD = ../src/libvirt_driver_xen.la $(LDADDS)
151

152
xmconfigtest_SOURCES = \
153
	xmconfigtest.c testutilsxen.c testutilsxen.h \
154
	testutils.c testutils.h
155
xmconfigtest_LDADD = ../src/libvirt_driver_xen.la $(LDADDS)
156

157 158 159 160 161 162 163 164 165 166 167 168 169 170
xencapstest_SOURCES = \
	xencapstest.c testutils.h testutils.c
xencapstest_LDADD = ../src/libvirt_driver_xen.la $(LDADDS)

reconnect_SOURCES = \
	reconnect.c
reconnect_LDADD = $(LDADDS)

else
EXTRA_DIST += xml2sexprtest.c sexpr2xmltest.c xmconfigtest.c \
	xencapstest.c reconnect.c \
	testutilsxen.c testutilsxen.h
endif

171
if WITH_QEMU
172
qemuxml2argvtest_SOURCES = \
173
	qemuxml2argvtest.c testutilsqemu.c testutilsqemu.h \
174
	testutils.c testutils.h
175
qemuxml2argvtest_LDADD = ../src/libvirt_driver_qemu.la $(LDADDS)
176 177

qemuxml2xmltest_SOURCES = \
178
	qemuxml2xmltest.c testutilsqemu.c testutilsqemu.h \
179
	testutils.c testutils.h
180
qemuxml2xmltest_LDADD = ../src/libvirt_driver_qemu.la $(LDADDS)
181 182 183
else
EXTRA_DIST += qemuxml2argvtest.c qemuxml2xmltest.c testutilsqemu.c testutilsqemu.h
endif
184

M
Mark McLoughlin 已提交
185 186 187 188 189
nodedevxml2xmltest_SOURCES = \
	nodedevxml2xmltest.c \
	testutils.c testutils.h
nodedevxml2xmltest_LDADD = ../src/libvirt_driver_qemu.la $(LDADDS)

190 191 192 193 194
virshtest_SOURCES = \
	virshtest.c \
	testutils.c testutils.h
virshtest_LDADD = $(LDADDS)

D
Daniel Veillard 已提交
195 196 197 198
conftest_SOURCES = \
	conftest.c
conftest_LDADD = $(LDADDS)

199 200 201 202
nodeinfotest_SOURCES = \
	nodeinfotest.c testutils.h testutils.c
nodeinfotest_LDADD = $(LDADDS)

203 204 205 206
statstest_SOURCES = \
	statstest.c testutils.h testutils.c
statstest_LDADD = $(LDADDS)

207 208 209 210
qparamtest_SOURCES = \
	qparamtest.c testutils.h testutils.c
qparamtest_LDADD = $(LDADDS)

211
CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda