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

3
## Copyright (C) 2005-2012 Red Hat, Inc.
4 5
## See COPYING.LIB for the License of this software

6 7
SHELL = $(PREFERABLY_POSIX_SHELL)

K
Karel Zak 已提交
8
INCLUDES = \
9
	-I$(top_builddir) -I$(top_srcdir) \
10 11 12
	-I$(top_builddir)/gnulib/lib -I$(top_srcdir)/gnulib/lib \
	-I$(top_builddir)/include -I$(top_srcdir)/include \
	-I$(top_builddir)/src -I$(top_srcdir)/src \
13
	-I$(top_srcdir)/src/util \
14 15
	-I$(top_srcdir)/src/conf \
	$(GETTEXT_CPPFLAGS)
E
Eric Blake 已提交
16 17

AM_CFLAGS = \
18 19
	$(LIBXML_CFLAGS) \
	$(GNUTLS_CFLAGS) \
20
	$(SASL_CFLAGS) \
21
	$(SELINUX_CFLAGS) \
J
Jamie Strandboge 已提交
22
	$(APPARMOR_CFLAGS) \
23
	$(YAJL_CFLAGS) \
E
Eric Blake 已提交
24 25
	$(COVERAGE_CFLAGS) \
	$(WARN_CFLAGS)
26

27 28 29 30 31
if WITH_DRIVER_MODULES
INCLUDES += \
	-DTEST_DRIVER_DIR=\"$(top_builddir)/src/.libs\"
endif

32
PROBES_O =
33
if WITH_DTRACE_PROBES
34
PROBES_O += ../src/libvirt_probes.lo
35 36
endif

K
Karel Zak 已提交
37
LDADDS = \
38
        $(WARN_CFLAGS) \
39
	$(PROBES_O) \
40 41
	../src/libvirt.la \
	../gnulib/lib/libgnu.la
K
Karel Zak 已提交
42

43
EXTRA_DIST =		\
44
	capabilityschemadata \
E
Eric Blake 已提交
45 46 47 48
	capabilityschematest \
	commanddata \
	confdata \
	cputestdata \
49
	domainschemadata \
E
Eric Blake 已提交
50 51 52 53
	domainschematest \
	domainsnapshotschematest \
	domainsnapshotxml2xmlin \
	domainsnapshotxml2xmlout \
54
	interfaceschemadata \
55
	lxcxml2xmldata \
E
Eric Blake 已提交
56 57 58
	networkschematest \
	networkxml2xmlin \
	networkxml2xmlout \
59
	networkxml2confdata \
E
Eric Blake 已提交
60 61 62 63 64 65 66 67 68 69
	nodedevschemadata \
	nodedevschematest \
	nodeinfodata     \
	nwfilterschematest \
	nwfilterxml2xmlin \
	nwfilterxml2xmlout \
	oomtrace.pl \
	qemuhelpdata \
	qemuxml2argvdata \
	qemuxml2xmloutdata \
P
Philipp Hahn 已提交
70
	qemuxmlnsdata \
71
	securityselinuxlabeldata \
E
Eric Blake 已提交
72 73
	schematestutils.sh \
	sexpr2xmldata \
74
	storagepoolschematest \
75
	storagepoolxml2xmlin \
E
Eric Blake 已提交
76
	storagepoolxml2xmlout \
77
	storagevolschematest \
78
	storagevolxml2xmlin \
E
Eric Blake 已提交
79
	storagevolxml2xmlout \
V
Viktor Mihajlovski 已提交
80
	sysinfodata \
E
Eric Blake 已提交
81
	test-lib.sh	\
82
	vmx2xmldata \
E
Eric Blake 已提交
83 84 85
	xencapsdata \
	xmconfigdata \
	xml2sexprdata \
86 87
	xml2vmxdata \
	.valgrind.supp
K
Karel Zak 已提交
88

89 90
test_helpers = commandhelper ssh conftest
test_programs = virshtest sockettest \
E
Eric Blake 已提交
91
	nodeinfotest virbuftest \
92 93
	commandtest seclabeltest \
	virhashtest virnetmessagetest virnetsockettest \
94
	viratomictest \
95
	utiltest shunloadtest \
96
	virtimetest viruritest virkeyfiletest \
H
Hu Tao 已提交
97
	virauthconfigtest \
98 99
	virbitmaptest \
	virlockspacetest \
100
	virstringtest \
D
Daniel P. Berrange 已提交
101
        virportallocatortest \
V
Viktor Mihajlovski 已提交
102
	sysinfotest \
103
	$(NULL)
104

105
if WITH_GNUTLS
106 107 108
test_programs += virnettlscontexttest
endif

109 110
if WITH_SECDRIVER_SELINUX
test_programs += securityselinuxtest
111 112 113
if WITH_ATTR
test_programs += securityselinuxlabeltest
endif
114 115
endif

116 117 118 119
if WITH_DRIVER_MODULES
test_programs += virdrivermoduletest
endif

120 121 122
# This is a fake SSH we use from virnetsockettest
ssh_SOURCES = ssh.c
ssh_LDADD = $(COVERAGE_LDFLAGS)
123

124
if WITH_XEN
125
test_programs += xml2sexprtest sexpr2xmltest \
126
	xmconfigtest xencapstest statstest reconnect
127
endif
128
if WITH_QEMU
129
test_programs += qemuxml2argvtest qemuxml2xmltest qemuxmlnstest \
130
	qemuargv2xmltest qemuhelptest domainsnapshotxml2xmltest \
131
	qemumonitortest qemumonitorjsontest
132 133
endif

134
if WITH_LXC
135
test_programs += lxcxml2xmltest
136 137
endif

138
if WITH_OPENVZ
139
test_programs += openvzutilstest
140 141
endif

142
if WITH_ESX
143
test_programs += esxutilstest
144 145 146
endif

if WITH_VMX
147
test_programs += vmx2xmltest xml2vmxtest
148 149
endif

150
if WITH_CIL
151
test_programs += object-locking
152 153
endif

154
if WITH_YAJL
155
test_programs += jsontest
156 157
endif

158
test_programs += networkxml2xmltest
159

160
if WITH_NETWORK
161
test_programs += networkxml2conftest
162
endif
163

164 165 166 167
if WITH_STORAGE_SHEEPDOG
test_programs += storagebackendsheepdogtest
endif

168
test_programs += nwfilterxml2xmltest
169

170
test_programs += storagevolxml2xmltest storagepoolxml2xmltest
171

172
test_programs += nodedevxml2xmltest
M
Mark McLoughlin 已提交
173

174
test_programs += interfacexml2xmltest
175

176
test_programs += cputest
177

178 179
test_scripts = \
	capabilityschematest \
180
	interfaceschematest \
181 182 183 184
	networkschematest \
	storagepoolschematest \
	storagevolschematest \
	domainschematest \
185
	nodedevschematest \
186 187
	nwfilterschematest \
	domainsnapshotschematest
188

A
Atsushi SAKAI 已提交
189
if WITH_LIBVIRTD
190 191 192 193 194
test_scripts +=				\
	test_conf.sh			\
	cpuset				\
	define-dev-segfault		\
	int-overflow			\
J
Jim Meyering 已提交
195 196
	libvirtd-fail			\
	libvirtd-pool			\
197 198 199 200 201
	read-bufsiz			\
	read-non-seekable		\
	start				\
	vcpupin				\
	virsh-all			\
202
	virsh-optparse			\
203
	virsh-schedinfo			\
204 205 206
	virsh-synopsis			\
	virsh-undefine			\
	$(NULL)
207

208 209 210
test_programs += 			\
	eventtest			\
	libvirtdconftest
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225
else
EXTRA_DIST += 				\
	test_conf.sh			\
	cpuset				\
	define-dev-segfault		\
	int-overflow			\
	libvirtd-fail			\
	libvirtd-pool			\
	read-bufsiz			\
	read-non-seekable		\
	start				\
	vcpupin				\
	virsh-all			\
	virsh-optparse			\
	virsh-schedinfo			\
226 227 228
	virsh-synopsis			\
	virsh-undefine			\
	$(NULL)
A
Atsushi SAKAI 已提交
229
endif
230

J
Jamie Strandboge 已提交
231 232
if WITH_SECDRIVER_APPARMOR
test_scripts += virt-aa-helper-test
233 234
else
EXTRA_DIST += virt-aa-helper-test
J
Jamie Strandboge 已提交
235
endif
236

237 238
EXTRA_DIST += $(test_scripts)

D
Daniel P. Berrange 已提交
239 240 241
test_libraries = libshunload.la \
		libvirportallocatormock.la \
		$(NULL)
242 243 244 245
if WITH_QEMU
test_libraries += libqemumonitortestutils.la
endif

246 247
if WITH_TESTS
noinst_PROGRAMS = $(test_programs) $(test_helpers)
248
noinst_LTLIBRARIES = $(test_libraries)
249 250
else
check_PROGRAMS = $(test_programs) $(test_helpers)
251
check_LTLIBRARIES = $(test_libraries)
252
endif
253

254 255
TESTS = $(test_programs) \
	$(test_scripts)
256

257
# NB, automake < 1.10 does not provide the real
258
# abs_top_{src/build}dir or builddir variables, so don't rely
259
# on them here. Fake them with 'pwd'
260 261 262 263 264 265
# Also, BSD sh doesn't like 'a=b b=$$a', so we can't use an
# intermediate shell variable, but must do all the expansion in make

lv_abs_top_builddir=`cd '$(top_builddir)'; pwd`
path_add = $(lv_abs_top_builddir)/daemon$(PATH_SEPARATOR)$(lv_abs_top_builddir)/tools$(PATH_SEPARATOR)$(lv_abs_top_builddir)/tests

266
TESTS_ENVIRONMENT =				\
267
  abs_top_builddir=$(lv_abs_top_builddir)	\
J
Jim Meyering 已提交
268
  abs_top_srcdir=`cd '$(top_srcdir)'; pwd`	\
269
  abs_builddir=`pwd`				\
270
  abs_srcdir=`cd '$(srcdir)'; pwd`		\
271
  CONFIG_HEADER="`cd '$(top_builddir)'; pwd`/config.h"	\
J
Jim Meyering 已提交
272
  PATH="$(path_add)$(PATH_SEPARATOR)$$PATH"	\
273
  SHELL="$(SHELL)"				\
274
  LIBVIRT_DRIVER_DIR="$(abs_top_builddir)/src/.libs" \
275
  LIBVIRT_AUTOSTART=0				\
276
  LC_ALL=C					\
277 278
  $(VG)

279

280
valgrind:
281
	$(MAKE) check VG="libtool --mode=execute valgrind --quiet --leak-check=full --suppressions=$(srcdir)/.valgrind.supp"
282

283 284 285
sockettest_SOURCES = \
	sockettest.c \
	testutils.c testutils.h
286
sockettest_LDADD = $(LDADDS)
287

288
if WITH_XEN
E
Eric Blake 已提交
289
xen_LDADDS = ../src/libvirt_driver_xen_impl.la
290 291
xen_LDADDS += $(LDADDS)

292
xml2sexprtest_SOURCES = \
293
	xml2sexprtest.c testutilsxen.c testutilsxen.h \
294
	testutils.c testutils.h
295
xml2sexprtest_LDADD = $(xen_LDADDS)
296 297

sexpr2xmltest_SOURCES = \
298
	sexpr2xmltest.c testutilsxen.c testutilsxen.h \
299
	testutils.c testutils.h
300
sexpr2xmltest_LDADD = $(xen_LDADDS)
301

302
xmconfigtest_SOURCES = \
303
	xmconfigtest.c testutilsxen.c testutilsxen.h \
304
	testutils.c testutils.h
305
xmconfigtest_LDADD = $(xen_LDADDS)
306

307 308
xencapstest_SOURCES = \
	xencapstest.c testutils.h testutils.c
309
xencapstest_LDADD = $(xen_LDADDS)
310 311

reconnect_SOURCES = \
312
	reconnect.c testutils.h testutils.c
313 314
reconnect_LDADD = $(LDADDS)

315 316
statstest_SOURCES = \
	statstest.c testutils.h testutils.c
317
statstest_LDADD = $(xen_LDADDS)
318

319 320 321 322 323 324
else
EXTRA_DIST += xml2sexprtest.c sexpr2xmltest.c xmconfigtest.c \
	xencapstest.c reconnect.c \
	testutilsxen.c testutilsxen.h
endif

325 326 327 328 329
QEMUMONITORTESTUTILS_SOURCES = \
	qemumonitortestutils.c \
	qemumonitortestutils.h \
	$(NULL)

330
if WITH_QEMU
331

332 333 334 335 336
libqemumonitortestutils_la_SOURCES = $(QEMUMONITORTESTUTILS_SOURCES)
libqemumonitortestutils_la_CFLAGS = \
	-Dabs_builddir="\"`pwd`\"" $(AM_CFLAGS)


337
qemu_LDADDS = ../src/libvirt_driver_qemu_impl.la
338
if WITH_NETWORK
E
Eric Blake 已提交
339
qemu_LDADDS += ../src/libvirt_driver_network_impl.la
340
endif
341
if WITH_DTRACE_PROBES
342
qemu_LDADDS += ../src/libvirt_qemu_probes.lo
343
endif
344
qemu_LDADDS += $(LDADDS)
345

346
qemuxml2argvtest_SOURCES = \
347
	qemuxml2argvtest.c testutilsqemu.c testutilsqemu.h \
348
	testutils.c testutils.h
349
qemuxml2argvtest_LDADD = $(qemu_LDADDS)
350 351

qemuxml2xmltest_SOURCES = \
352
	qemuxml2xmltest.c testutilsqemu.c testutilsqemu.h \
353
	testutils.c testutils.h
354
qemuxml2xmltest_LDADD = $(qemu_LDADDS)
355

P
Philipp Hahn 已提交
356 357 358
qemuxmlnstest_SOURCES = \
	qemuxmlnstest.c testutilsqemu.c testutilsqemu.h \
	testutils.c testutils.h
359
qemuxmlnstest_LDADD = $(qemu_LDADDS)
P
Philipp Hahn 已提交
360

361 362 363
qemuargv2xmltest_SOURCES = \
	qemuargv2xmltest.c testutilsqemu.c testutilsqemu.h \
	testutils.c testutils.h
364
qemuargv2xmltest_LDADD = $(qemu_LDADDS)
365 366

qemuhelptest_SOURCES = qemuhelptest.c testutils.c testutils.h
367
qemuhelptest_LDADD = $(qemu_LDADDS)
368

369
qemumonitortest_SOURCES = qemumonitortest.c testutils.c testutils.h
370
qemumonitortest_LDADD = $(qemu_LDADDS)
371

372 373 374 375 376 377 378 379
qemumonitorjsontest_SOURCES = \
	qemumonitorjsontest.c \
	testutils.c testutils.h \
	testutilsqemu.c testutilsqemu.h \
	$(NULL)
qemumonitorjsontest_LDADD = $(qemu_LDADDS) libqemumonitortestutils.la
qemumonitorjsontest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\""  $(AM_CFLAGS)

380 381 382
domainsnapshotxml2xmltest_SOURCES = \
	domainsnapshotxml2xmltest.c testutilsqemu.c testutilsqemu.h \
	testutils.c testutils.h
383
domainsnapshotxml2xmltest_LDADD = $(qemu_LDADDS)
384
else
385 386
EXTRA_DIST += qemuxml2argvtest.c qemuxml2xmltest.c qemuargv2xmltest.c \
	qemuxmlnstest.c qemuhelptest.c domainsnapshotxml2xmltest.c \
387
	qemumonitortest.c testutilsqemu.c testutilsqemu.h \
388
	qemumonitorjsontest.c \
389
	$(QEMUMONITORTESTUTILS_SOURCES)
390
endif
391

392 393
if WITH_LXC

E
Eric Blake 已提交
394
lxc_LDADDS = ../src/libvirt_driver_lxc_impl.la
395
if WITH_NETWORK
E
Eric Blake 已提交
396
lxc_LDADDS += ../src/libvirt_driver_network_impl.la
397 398
endif
lxc_LDADDS += $(LDADDS)
399 400 401 402

lxcxml2xmltest_SOURCES = \
	lxcxml2xmltest.c testutilslxc.c testutilslxc.h \
	testutils.c testutils.h
403
lxcxml2xmltest_LDADD = $(lxc_LDADDS)
404 405 406 407
else
EXTRA_DIST += lxcxml2xmltest.c testutilslxc.c testutilslxc.h
endif

408 409 410 411
if WITH_OPENVZ
openvzutilstest_SOURCES = \
	openvzutilstest.c \
	testutils.c testutils.h
412
openvzutilstest_LDADD = $(LDADDS)
413 414 415 416 417
else
EXTRA_DIST += openvzutilstest.c
endif
EXTRA_DIST += openvzutilstest.conf

418 419 420 421
if WITH_ESX
esxutilstest_SOURCES = \
	esxutilstest.c \
	testutils.c testutils.h
422
esxutilstest_LDADD = $(LDADDS)
423 424 425
else
EXTRA_DIST += esxutilstest.c
endif
426

427
if WITH_VMX
428 429 430
vmx2xmltest_SOURCES = \
	vmx2xmltest.c \
	testutils.c testutils.h
431
vmx2xmltest_LDADD = $(LDADDS)
432 433 434 435

xml2vmxtest_SOURCES = \
	xml2vmxtest.c \
	testutils.c testutils.h
436
xml2vmxtest_LDADD = $(LDADDS)
437
else
438
EXTRA_DIST += vmx2xmltest.c xml2vmxtest.c
439 440
endif

441 442 443 444 445
networkxml2xmltest_SOURCES = \
	networkxml2xmltest.c \
	testutils.c testutils.h
networkxml2xmltest_LDADD = $(LDADDS)

446
if WITH_NETWORK
447 448
networkxml2conftest_SOURCES = \
	networkxml2conftest.c \
449
	testutils.c testutils.h
450
networkxml2conftest_LDADD = ../src/libvirt_driver_network_impl.la $(LDADDS)
451
else
452
EXTRA_DIST += networkxml2conftest.c
453
endif
454

455 456 457 458
if WITH_STORAGE_SHEEPDOG
storagebackendsheepdogtest_SOURCES = \
	storagebackendsheepdogtest.c \
	testutils.c testutils.h
459 460
storagebackendsheepdogtest_LDADD = \
	../src/libvirt_driver_storage_impl.la $(LDADDS)
461 462 463 464
else
EXTRA_DIST += storagebackendsheepdogtest.c
endif

465 466 467 468 469
nwfilterxml2xmltest_SOURCES = \
	nwfilterxml2xmltest.c \
	testutils.c testutils.h
nwfilterxml2xmltest_LDADD = $(LDADDS)

470 471 472 473 474
storagevolxml2xmltest_SOURCES = \
	storagevolxml2xmltest.c \
	testutils.c testutils.h
storagevolxml2xmltest_LDADD = $(LDADDS)

475 476 477 478 479
storagepoolxml2xmltest_SOURCES = \
	storagepoolxml2xmltest.c \
	testutils.c testutils.h
storagepoolxml2xmltest_LDADD = $(LDADDS)

M
Mark McLoughlin 已提交
480 481 482
nodedevxml2xmltest_SOURCES = \
	nodedevxml2xmltest.c \
	testutils.c testutils.h
483
nodedevxml2xmltest_LDADD = $(LDADDS)
M
Mark McLoughlin 已提交
484

485 486 487 488 489
interfacexml2xmltest_SOURCES = \
	interfacexml2xmltest.c \
	testutils.c testutils.h
interfacexml2xmltest_LDADD = $(LDADDS)

490 491 492 493 494
cputest_SOURCES = \
	cputest.c \
	testutils.c testutils.h
cputest_LDADD = $(LDADDS)

495 496 497 498 499
virshtest_SOURCES = \
	virshtest.c \
	testutils.c testutils.h
virshtest_LDADD = $(LDADDS)

D
Daniel Veillard 已提交
500 501 502 503
conftest_SOURCES = \
	conftest.c
conftest_LDADD = $(LDADDS)

504 505 506 507
nodeinfotest_SOURCES = \
	nodeinfotest.c testutils.h testutils.c
nodeinfotest_LDADD = $(LDADDS)

508 509
commandtest_SOURCES = \
	commandtest.c testutils.h testutils.c
E
Eric Blake 已提交
510
commandtest_CFLAGS = -Dabs_builddir="\"`pwd`\"" $(AM_CFLAGS)
511 512 513 514
commandtest_LDADD = $(LDADDS)

commandhelper_SOURCES = \
	commandhelper.c
E
Eric Blake 已提交
515
commandhelper_CFLAGS = -Dabs_builddir="\"`pwd`\"" $(AM_CFLAGS)
516
commandhelper_LDADD = $(LDADDS)
517
commandhelper_LDFLAGS = -static
518

519 520 521 522 523 524 525 526 527 528
if WITH_LIBVIRTD
libvirtdconftest_SOURCES = \
	libvirtdconftest.c testutils.h testutils.c \
	../daemon/libvirtd-config.c
libvirtdconftest_CFLAGS = $(AM_CFLAGS)
libvirtdconftest_LDADD = $(LDADDS)
else
EXTRA_DIST += libvirtdconftest.c
endif

529 530
virnetmessagetest_SOURCES = \
	virnetmessagetest.c testutils.h testutils.c
E
Eric Blake 已提交
531 532
virnetmessagetest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" \
		$(XDR_CFLAGS) $(AM_CFLAGS)
533
virnetmessagetest_LDADD = $(LDADDS)
534

535 536
virnetsockettest_SOURCES = \
	virnetsockettest.c testutils.h testutils.c
E
Eric Blake 已提交
537
virnetsockettest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
538
virnetsockettest_LDADD = $(LDADDS)
539

540
if WITH_GNUTLS
541
virnettlscontexttest_SOURCES = \
E
Eric Blake 已提交
542
	virnettlscontexttest.c testutils.h testutils.c
543
virnettlscontexttest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
544
virnettlscontexttest_LDADD = $(LDADDS)
E
Eric Blake 已提交
545 546 547 548 549 550
if HAVE_LIBTASN1
virnettlscontexttest_SOURCES += pkix_asn1_tab.c
virnettlscontexttest_LDADD += -ltasn1
else
EXTRA_DIST += pkix_asn1_tab.c
endif
551 552 553 554
else
EXTRA_DIST += \
	virnettlscontexttest.c testutils.h testutils.c pkix_asn1_tab.c
endif
555

556 557 558
virtimetest_SOURCES = \
	virtimetest.c testutils.h testutils.c
virtimetest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
559
virtimetest_LDADD = $(LDADDS)
560

561 562 563 564 565
virstringtest_SOURCES = \
	virstringtest.c testutils.h testutils.c
virstringtest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
virstringtest_LDADD = $(LDADDS)

566 567 568 569 570
virlockspacetest_SOURCES = \
	virlockspacetest.c testutils.h testutils.c
virlockspacetest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
virlockspacetest_LDADD = $(LDADDS)

D
Daniel P. Berrange 已提交
571 572 573 574 575 576 577 578 579 580 581 582
virportallocatortest_SOURCES = \
	virportallocatortest.c testutils.h testutils.c
virportallocatortest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
virportallocatortest_LDADD = $(LDADDS)

libvirportallocatormock_la_SOURCES = \
	virportallocatortest.c
libvirportallocatormock_la_CFLAGS = $(AM_CFLAGS) -DMOCK_HELPER=1
libvirportallocatormock_la_LDFLAGS = -module -avoid-version \
        -rpath /evil/libtool/hack/to/force/shared/lib/creation


583 584 585
viruritest_SOURCES = \
	viruritest.c testutils.h testutils.c
viruritest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
586
viruritest_LDADD = $(LDADDS)
587

588 589 590
virkeyfiletest_SOURCES = \
	virkeyfiletest.c testutils.h testutils.c
virkeyfiletest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
591
virkeyfiletest_LDADD = $(LDADDS)
592

593 594 595
virauthconfigtest_SOURCES = \
	virauthconfigtest.c testutils.h testutils.c
virauthconfigtest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
596
virauthconfigtest_LDADD = $(LDADDS)
597

598 599
seclabeltest_SOURCES = \
	seclabeltest.c
600
seclabeltest_LDADD = $(LDADDS)
J
Jamie Strandboge 已提交
601

602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618
if WITH_SECDRIVER_SELINUX
if WITH_TESTS
noinst_LTLIBRARIES += libsecurityselinuxhelper.la
else
check_LTLIBRARIES += libsecurityselinuxhelper.la
endif

libsecurityselinuxhelper_la_SOURCES = \
	securityselinuxhelper.c
libsecurityselinuxhelper_la_CFLAGS = $(AM_CFLAGS)
libsecurityselinuxhelper_la_LDFLAGS = -module -avoid-version \
        -rpath /evil/libtool/hack/to/force/shared/lib/creation

securityselinuxtest_SOURCES = \
	securityselinuxtest.c testutils.h testutils.c
securityselinuxtest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
securityselinuxtest_LDADD = $(LDADDS)
619 620 621 622 623 624 625 626 627 628 629 630
securityselinuxtest_DEPENDENCIES = libsecurityselinuxhelper.la ../src/libvirt.la

if WITH_QEMU
if WITH_ATTR
securityselinuxlabeltest_SOURCES = \
	securityselinuxlabeltest.c testutils.h testutils.c \
        testutilsqemu.h testutilsqemu.c
securityselinuxlabeltest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
securityselinuxlabeltest_LDADD = $(qemu_LDADDS)
securityselinuxlabeltest_DEPENDENCIES = libsecurityselinuxhelper.la ../src/libvirt.la
endif
endif
631
endif
632
EXTRA_DIST += securityselinuxtest.c securityselinuxlabeltest.c securityselinuxhelper.c
633

634 635 636 637
virbuftest_SOURCES = \
	virbuftest.c testutils.h testutils.c
virbuftest_LDADD = $(LDADDS)

638 639 640
virhashtest_SOURCES = \
	virhashtest.c virhashdata.h testutils.h testutils.c
virhashtest_LDADD = $(LDADDS)
641

642
viratomictest_SOURCES = \
L
Laine Stump 已提交
643
	viratomictest.c testutils.h testutils.c
644 645
viratomictest_LDADD = $(LDADDS)

H
Hu Tao 已提交
646 647 648 649
virbitmaptest_SOURCES = \
	virbitmaptest.c testutils.h testutils.c
virbitmaptest_LDADD = $(LDADDS)

650
jsontest_SOURCES = \
651
	jsontest.c testutils.h testutils.c
652 653
jsontest_LDADD = $(LDADDS)

M
Matthias Bolte 已提交
654 655 656 657
utiltest_SOURCES = \
	utiltest.c testutils.h testutils.c
utiltest_LDADD = $(LDADDS)

658 659 660 661 662 663 664
if WITH_DRIVER_MODULES
virdrivermoduletest_SOURCES = \
	virdrivermoduletest.c testutils.h testutils.c
virdrivermoduletest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
virdrivermoduletest_LDADD = $(LDADDS)
endif

665 666
if WITH_LIBVIRTD
eventtest_SOURCES = \
667
	eventtest.c testutils.h testutils.c
668 669 670
eventtest_LDADD = -lrt $(LDADDS)
endif

671 672 673 674 675 676
libshunload_la_SOURCES = shunloadhelper.c
libshunload_la_LIBADD = ../src/libvirt.la
libshunload_la_LDFLAGS = -module -avoid-version -rpath /evil/libtool/hack/to/force/shared/lib/creation

shunloadtest_SOURCES = \
	shunloadtest.c
677
shunloadtest_LDADD = $(LIB_PTHREAD)
678 679
shunloadtest_DEPENDENCIES = libshunload.la

V
Viktor Mihajlovski 已提交
680 681 682 683
sysinfotest_SOURCES = \
	sysinfotest.c testutils.h testutils.c
sysinfotest_LDADD = $(LDADDS)

684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704
if WITH_CIL
CILOPTFLAGS =
CILOPTINCS =
CILOPTPACKAGES = -package unix,str,cil
CILOPTLIBS = -linkpkg

object_locking_SOURCES = object-locking.ml

%.cmx: %.ml
	ocamlfind ocamlopt $(CILOPTFLAGS) $(CILOPTINCS) $(CILOPTPACKAGES) -c $<

object-locking: object-locking.cmx object-locking-files.txt
	ocamlfind ocamlopt $(CILOPTFLAGS) $(CILOPTINCS) $(CILOPTPACKAGES) $(CILOPTLIBS) $< -o $@

object-locking-files.txt:
	find $(top_builddir)/src/ -name '*.i' > $@

else
EXTRA_DIST += object-locking.ml
endif

705
CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.cmi *.cmx object-locking-files.txt