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

3
## Copyright (C) 2005-2015 Red Hat, Inc.
E
Eric Blake 已提交
4 5 6 7 8 9 10 11 12 13 14 15 16 17
##
## 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/>.
18

19 20 21 22
# old automake does not provide abs_{src,build}dir variables
abs_builddir = $(shell pwd)
abs_srcdir = $(shell cd $(srcdir) && pwd)

23 24
SHELL = $(PREFERABLY_POSIX_SHELL)

K
Karel Zak 已提交
25
INCLUDES = \
26
	-I$(top_builddir) -I$(top_srcdir) \
27 28 29
	-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 \
30
	-I$(top_srcdir)/src/util \
31 32
	-I$(top_srcdir)/src/conf \
	$(GETTEXT_CPPFLAGS)
E
Eric Blake 已提交
33 34

AM_CFLAGS = \
35 36
	-Dabs_builddir="\"$(abs_builddir)\"" \
	-Dabs_srcdir="\"$(abs_srcdir)\"" \
37
	$(LIBXML_CFLAGS) \
38
	$(LIBNL_CFLAGS) \
39
	$(GNUTLS_CFLAGS) \
40
	$(SASL_CFLAGS) \
41
	$(SELINUX_CFLAGS) \
J
Jamie Strandboge 已提交
42
	$(APPARMOR_CFLAGS) \
43
	$(YAJL_CFLAGS) \
E
Eric Blake 已提交
44 45
	$(COVERAGE_CFLAGS) \
	$(WARN_CFLAGS)
46

47 48 49
AM_LDFLAGS = \
	-export-dynamic

50 51 52 53
MOCKLIBS_LDFLAGS = -module -avoid-version \
	-rpath /evil/libtool/hack/to/force/shared/lib/creation \
	$(MINGW_EXTRA_LDFLAGS)

54 55 56
if WITH_DRIVER_MODULES
INCLUDES += \
	-DTEST_DRIVER_DIR=\"$(top_builddir)/src/.libs\"
57
endif WITH_DRIVER_MODULES
58

59
PROBES_O =
60
if WITH_DTRACE_PROBES
61
PROBES_O += ../src/libvirt_probes.lo
62
endif WITH_DTRACE_PROBES
63

64 65 66
GNULIB_LIBS = \
       ../gnulib/lib/libgnu.la

K
Karel Zak 已提交
67
LDADDS = \
68
        $(WARN_CFLAGS) \
69
	$(NO_INDIRECT_LDFLAGS) \
70
	$(PROBES_O) \
71 72
	$(GNULIB_LIBS) \
	../src/libvirt.la
K
Karel Zak 已提交
73

74
EXTRA_DIST =		\
R
Roman Bogorodskiy 已提交
75
	bhyvexml2argvdata \
76
	bhyvexml2xmloutdata \
77
	capabilityschemadata \
E
Eric Blake 已提交
78 79 80 81
	capabilityschematest \
	commanddata \
	confdata \
	cputestdata \
M
Michal Privoznik 已提交
82 83
	domaincapsschemadata \
	domaincapsschematest \
84
	domainconfdata \
85
	domainschemadata \
E
Eric Blake 已提交
86 87 88 89
	domainschematest \
	domainsnapshotschematest \
	domainsnapshotxml2xmlin \
	domainsnapshotxml2xmlout \
O
Osier Yang 已提交
90
	fchostdata \
91
	interfaceschemadata \
92
	lxcconf2xmldata \
93
	lxcxml2xmldata \
94
	lxcxml2xmloutdata \
E
Eric Blake 已提交
95 96 97
	networkschematest \
	networkxml2xmlin \
	networkxml2xmlout \
98
	networkxml2confdata \
J
Ján Tomko 已提交
99 100
	networkxml2xmlupdatein \
	networkxml2xmlupdateout \
101
	networkxml2firewalldata \
E
Eric Blake 已提交
102 103 104 105
	nodedevschemadata \
	nodedevschematest \
	nodeinfodata     \
	nwfilterschematest \
106
	nwfilterxml2firewalldata \
E
Eric Blake 已提交
107 108 109
	nwfilterxml2xmlin \
	nwfilterxml2xmlout \
	oomtrace.pl \
110
	qemuagentdata \
111
	qemucapabilitiesdata \
112
	qemucaps2xmldata \
E
Eric Blake 已提交
113
	qemuhelpdata \
114
	qemuhotplugtestdata \
115
	qemumonitorjsondata \
E
Eric Blake 已提交
116 117
	qemuxml2argvdata \
	qemuxml2xmloutdata \
P
Philipp Hahn 已提交
118
	qemuxmlnsdata \
J
Ján Tomko 已提交
119
	secretxml2xmlin \
120
	securityselinuxhelperdata \
121
	securityselinuxlabeldata \
E
Eric Blake 已提交
122 123
	schematestutils.sh \
	sexpr2xmldata \
124
	storagepoolschemadata \
125
	storagepoolschematest \
126
	storagepoolxml2xmlin \
E
Eric Blake 已提交
127
	storagepoolxml2xmlout \
128
	storagevolxml2argvdata \
129
	storagevolschemadata \
130
	storagevolschematest \
131
	storagevolxml2xmlin \
E
Eric Blake 已提交
132
	storagevolxml2xmlout \
V
Viktor Mihajlovski 已提交
133
	sysinfodata \
E
Eric Blake 已提交
134
	test-lib.sh	\
135
	vircaps2xmldata \
Y
Yohan BELLEGUIC 已提交
136
	vboxsnapshotxmldata \
137
	virsh-uriprecedence \
138
	vircgroupdata \
139
	virfiledata \
140
	virnetdevtestdata \
141
	virnetserverdata \
142
	virpcitestdata \
O
Osier Yang 已提交
143
	virscsidata \
144
	virusbtestdata \
145
	vmx2xmldata \
E
Eric Blake 已提交
146 147
	xencapsdata \
	xmconfigdata \
148
	xlconfigdata \
E
Eric Blake 已提交
149
	xml2sexprdata \
150
	xml2vmxdata \
151
	vmwareverdata \
152 153
	.valgrind.supp \
	virmock.h
K
Karel Zak 已提交
154

G
Gene Czarcinski 已提交
155
test_helpers = commandhelper ssh test_conf
156
test_programs = virshtest sockettest \
E
Eric Blake 已提交
157
	nodeinfotest virbuftest \
158
	commandtest seclabeltest \
E
Eric Blake 已提交
159 160
	virhashtest \
	viratomictest \
161
	utiltest shunloadtest \
162
	virtimetest viruritest virkeyfiletest \
163
	viralloctest \
H
Hu Tao 已提交
164
	virauthconfigtest \
165 166
	virbitmaptest \
	vircgrouptest \
167
	vircryptotest \
M
Michal Privoznik 已提交
168
	virpcitest \
169
	virendiantest \
170
	virfiletest \
171
	virfirewalltest \
J
Ján Tomko 已提交
172
	viriscsitest \
173
	virkeycodetest \
174
	virlockspacetest \
175
	virlogtest \
176
	virstringtest \
177
	virportallocatortest \
V
Viktor Mihajlovski 已提交
178
	sysinfotest \
179
	virkmodtest \
180
	vircapstest \
M
Michal Privoznik 已提交
181
	domaincapstest \
182
	domainconftest \
183
	virhostdevtest \
184
	vircaps2xmltest \
M
Michal Privoznik 已提交
185
	virnetdevtest \
186
	$(NULL)
187

E
Eric Blake 已提交
188 189 190 191
if WITH_REMOTE
test_programs += \
	virnetmessagetest \
	virnetsockettest \
192
	virnetdaemontest \
E
Eric Blake 已提交
193 194 195 196 197 198 199
	virnetserverclienttest \
	$(NULL)
if WITH_GNUTLS
test_programs += virnettlscontexttest virnettlssessiontest
endif WITH_GNUTLS
endif WITH_REMOTE

200 201
if WITH_LINUX
test_programs += fchosttest
202
test_programs += scsihosttest
203 204
endif WITH_LINUX

205 206 207 208
if WITH_LIBVIRTD
test_programs += fdstreamtest
endif WITH_LIBVIRTD

209
if WITH_DBUS
210
test_programs += virdbustest \
211 212 213 214 215
                 virsystemdtest \
                 $(NULL)
if WITH_POLKIT1
test_programs += virpolkittest
endif WITH_POLKIT1
216
endif WITH_DBUS
217

218
if WITH_SECDRIVER_SELINUX
219
if WITH_ATTR
220 221
test_programs += securityselinuxtest \
                 viridentitytest
222
if WITH_QEMU
223
test_programs += securityselinuxlabeltest
224 225 226
endif WITH_QEMU
endif WITH_ATTR
endif WITH_SECDRIVER_SELINUX
227

228 229
if WITH_DRIVER_MODULES
test_programs += virdrivermoduletest
230
endif WITH_DRIVER_MODULES
231

232 233 234
# This is a fake SSH we use from virnetsockettest
ssh_SOURCES = ssh.c
ssh_LDADD = $(COVERAGE_LDFLAGS)
235

236
if WITH_XEN
237
test_programs += xml2sexprtest sexpr2xmltest \
238
	xmconfigtest xencapstest statstest reconnect
239
endif WITH_XEN
240 241 242 243 244

if WITH_LIBXL
test_programs += xlconfigtest
endif WITH_LIBXL

245
if WITH_QEMU
246
test_programs += qemuxml2argvtest qemuxml2xmltest qemuxmlnstest \
247
	qemuargv2xmltest qemuhelptest domainsnapshotxml2xmltest \
P
Peter Krempa 已提交
248
	qemumonitortest qemumonitorjsontest qemuhotplugtest \
249 250
	qemuagenttest qemucapabilitiestest qemucaps2xmltest \
	qemucommandutiltest
251
endif WITH_QEMU
252

253
if WITH_LXC
254
test_programs += lxcxml2xmltest lxcconf2xmltest
255
endif WITH_LXC
256

257
if WITH_OPENVZ
258
test_programs += openvzutilstest
259
endif WITH_OPENVZ
260

261
if WITH_ESX
262
test_programs += esxutilstest
263
endif WITH_ESX
264

Y
Yohan BELLEGUIC 已提交
265 266 267 268
if WITH_VBOX
test_programs += vboxsnapshotxmltest
endif WITH_VBOX

269
if WITH_VMX
270
test_programs += vmx2xmltest xml2vmxtest
271
endif WITH_VMX
272

273 274 275 276
if WITH_VMWARE
test_programs += vmwarevertest
endif WITH_VMWARE

R
Roman Bogorodskiy 已提交
277
if WITH_BHYVE
278
test_programs += bhyvexml2argvtest bhyvexml2xmltest
R
Roman Bogorodskiy 已提交
279 280
endif WITH_BHYVE

281
if WITH_CIL
282
test_programs += objectlocking
283
endif WITH_CIL
284

285
if WITH_YAJL
286
test_programs += jsontest
287
endif WITH_YAJL
288

289 290 291 292
test_programs += \
		networkxml2xmltest \
		networkxml2xmlupdatetest \
		$(NULL)
293

294
if WITH_NETWORK
295 296 297 298
test_programs += \
		networkxml2conftest \
		networkxml2firewalltest \
		$(NULL)
299
endif WITH_NETWORK
300

301 302
if WITH_STORAGE_SHEEPDOG
test_programs += storagebackendsheepdogtest
303
endif WITH_STORAGE_SHEEPDOG
304

305
test_programs += nwfilterxml2xmltest
306

307 308
if WITH_NWFILTER
test_programs += nwfilterebiptablestest
309
test_programs += nwfilterxml2firewalltest
310 311
endif WITH_NWFILTER

312
if WITH_STORAGE
313
test_programs += storagevolxml2argvtest
314
endif WITH_STORAGE
315

316 317
if WITH_STORAGE_FS
test_programs += virstoragetest
318
endif WITH_STORAGE_FS
319

O
Osier Yang 已提交
320 321 322 323
if WITH_LINUX
test_programs += virscsitest
endif WITH_LINUX

324
test_programs += storagevolxml2xmltest storagepoolxml2xmltest
325

326
test_programs += nodedevxml2xmltest
M
Mark McLoughlin 已提交
327

328
test_programs += interfacexml2xmltest
329

330
test_programs += cputest
331

P
Peter Krempa 已提交
332 333
test_programs += metadatatest

J
Ján Tomko 已提交
334 335
test_programs += secretxml2xmltest

336
if WITH_LINUX
337 338 339
test_programs += virusbtest \
	virnetdevbandwidthtest \
	$(NULL)
340 341
endif WITH_LINUX

342 343
test_scripts = \
	capabilityschematest \
344
	interfaceschematest \
345 346 347
	networkschematest \
	storagepoolschematest \
	storagevolschematest \
M
Michal Privoznik 已提交
348
	domaincapsschematest \
349
	domainschematest \
350
	nodedevschematest \
351
	nwfilterschematest \
J
Ján Tomko 已提交
352 353
	domainsnapshotschematest \
	secretschematest
354

A
Atsushi SAKAI 已提交
355
if WITH_LIBVIRTD
356 357 358 359 360
test_scripts +=				\
	test_conf.sh			\
	cpuset				\
	define-dev-segfault		\
	int-overflow			\
J
Jim Meyering 已提交
361 362
	libvirtd-fail			\
	libvirtd-pool			\
363 364 365
	read-bufsiz			\
	read-non-seekable		\
	start				\
366
	virsh-uriprecedence		\
367 368
	vcpupin				\
	virsh-all			\
369
	virsh-optparse			\
370
	virsh-schedinfo			\
371 372 373
	virsh-synopsis			\
	virsh-undefine			\
	$(NULL)
374

375 376 377
test_programs += 			\
	eventtest			\
	libvirtdconftest
378
else ! WITH_LIBVIRTD
379 380 381 382 383 384 385 386 387 388 389 390 391 392
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			\
393 394 395
	virsh-synopsis			\
	virsh-undefine			\
	$(NULL)
396
endif ! WITH_LIBVIRTD
397

398 399
test_programs += objecteventtest

J
Jamie Strandboge 已提交
400 401
if WITH_SECDRIVER_APPARMOR
test_scripts += virt-aa-helper-test
402
else ! WITH_SECDRIVER_APPARMOR
403
EXTRA_DIST += virt-aa-helper-test
404
endif ! WITH_SECDRIVER_APPARMOR
405

406 407
EXTRA_DIST += $(test_scripts)

D
Daniel P. Berrange 已提交
408 409
test_libraries = libshunload.la \
		libvirportallocatormock.la \
410
		virnetserverclientmock.la \
411
		vircgroupmock.la \
M
Michal Privoznik 已提交
412
		virpcimock.la \
M
Michal Privoznik 已提交
413
		virnetdevmock.la \
D
Daniel P. Berrange 已提交
414
		$(NULL)
415
if WITH_QEMU
416 417
test_libraries += libqemumonitortestutils.la \
		qemuxml2argvmock.la \
P
Pavel Hrdina 已提交
418
		qemucaps2xmlmock.la \
419
		$(NULL)
420
endif WITH_QEMU
421

R
Roman Bogorodskiy 已提交
422 423 424 425
if WITH_BHYVE
test_libraries += bhyvexml2argvmock.la
endif WITH_BHYVE

426
if WITH_DBUS
427
test_libraries += \
428
		virmockdbus.la
429
endif WITH_DBUS
430

431
if WITH_LINUX
432 433 434
test_libraries += virusbmock.la \
		virnetdevbandwidthmock.la \
		$(NULL)
435 436
endif WITH_LINUX

437 438
if WITH_TESTS
noinst_PROGRAMS = $(test_programs) $(test_helpers)
439
noinst_LTLIBRARIES = $(test_libraries)
440
else ! WITH_TESTS
441
check_PROGRAMS = $(test_programs) $(test_helpers)
442
check_LTLIBRARIES = $(test_libraries)
443
endif ! WITH_TESTS
444

445 446
TESTS = $(test_programs) \
	$(test_scripts)
447

448
# NB, automake < 1.10 does not provide the real
449
# abs_top_{src/build}dir or builddir variables, so don't rely
450
# on them here. Fake them with 'pwd'
451 452 453
# 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

454
lv_abs_top_builddir=$(shell cd '$(top_builddir)' && pwd)
455 456
path_add = $(subst :,$(PATH_SEPARATOR),\
	$(subst !,$(lv_abs_top_builddir)/,!daemon:!tools:!tests))
457

458
VIR_TEST_EXPENSIVE ?= $(VIR_TEST_EXPENSIVE_DEFAULT)
459
TESTS_ENVIRONMENT =				\
460
  abs_top_builddir=$(lv_abs_top_builddir)	\
J
Jim Meyering 已提交
461
  abs_top_srcdir=`cd '$(top_srcdir)'; pwd`	\
462 463 464
  abs_builddir=$(abs_builddir)			\
  abs_srcdir=$(abs_srcdir)			\
  CONFIG_HEADER="$(lv_abs_top_builddir)/config.h"	\
J
Jim Meyering 已提交
465
  PATH="$(path_add)$(PATH_SEPARATOR)$$PATH"	\
466
  SHELL="$(SHELL)"				\
467
  LIBVIRT_DRIVER_DIR="$(lv_abs_top_builddir)/src/.libs" \
468
  LIBVIRT_AUTOSTART=0				\
469
  LC_ALL=C					\
470
  VIR_TEST_EXPENSIVE=$(VIR_TEST_EXPENSIVE)	\
471 472
  $(VG)

473

474 475
VALGRIND = valgrind --quiet --leak-check=full \
	--suppressions=$(srcdir)/.valgrind.supp
476
valgrind:
477
	$(MAKE) check VG="libtool --mode=execute $(VALGRIND)"
478

479 480 481
sockettest_SOURCES = \
	sockettest.c \
	testutils.c testutils.h
482
sockettest_LDADD = $(LDADDS)
483

484
if WITH_XEN
E
Eric Blake 已提交
485
xen_LDADDS = ../src/libvirt_driver_xen_impl.la
486 487
xen_LDADDS += $(LDADDS)

488
xml2sexprtest_SOURCES = \
489
	xml2sexprtest.c testutilsxen.c testutilsxen.h \
490
	testutils.c testutils.h
491
xml2sexprtest_LDADD = $(xen_LDADDS)
492 493

sexpr2xmltest_SOURCES = \
494
	sexpr2xmltest.c testutilsxen.c testutilsxen.h \
495
	testutils.c testutils.h
496
sexpr2xmltest_LDADD = $(xen_LDADDS)
497

498
xmconfigtest_SOURCES = \
499
	xmconfigtest.c testutilsxen.c testutilsxen.h \
500
	testutils.c testutils.h
501
xmconfigtest_LDADD = $(xen_LDADDS)
502

503 504
xencapstest_SOURCES = \
	xencapstest.c testutils.h testutils.c
505
xencapstest_LDADD = $(xen_LDADDS)
506 507

reconnect_SOURCES = \
508
	reconnect.c testutils.h testutils.c
509 510
reconnect_LDADD = $(LDADDS)

511 512
statstest_SOURCES = \
	statstest.c testutils.h testutils.c
513
statstest_LDADD = $(xen_LDADDS)
514

515
else ! WITH_XEN
516 517 518
EXTRA_DIST += xml2sexprtest.c sexpr2xmltest.c xmconfigtest.c \
	xencapstest.c reconnect.c \
	testutilsxen.c testutilsxen.h
519
endif ! WITH_XEN
520

521 522 523 524 525 526 527 528 529 530 531 532
if WITH_LIBXL
libxl_LDADDS = ../src/libvirt_driver_libxl_impl.la
libxl_LDADDS += $(LDADDS)

xlconfigtest_SOURCES = \
	xlconfigtest.c testutilsxen.c testutilsxen.h \
	testutils.c testutils.h
xlconfigtest_LDADD =$(libxl_LDADDS)
else ! WITH_LIBXL
EXTRA_DIST += xlconfigtest.c
endif ! WITH_LIBXL

533 534 535 536 537
QEMUMONITORTESTUTILS_SOURCES = \
	qemumonitortestutils.c \
	qemumonitortestutils.h \
	$(NULL)

538
if WITH_QEMU
539

540 541
libqemumonitortestutils_la_SOURCES = $(QEMUMONITORTESTUTILS_SOURCES)

542
qemu_LDADDS = ../src/libvirt_driver_qemu_impl.la
543
if WITH_NETWORK
E
Eric Blake 已提交
544
qemu_LDADDS += ../src/libvirt_driver_network_impl.la
545
endif WITH_NETWORK
546 547 548
if WITH_STORAGE
qemu_LDADDS += ../src/libvirt_driver_storage_impl.la
endif WITH_STORAGE
549
if WITH_DTRACE_PROBES
550
qemu_LDADDS += ../src/libvirt_qemu_probes.lo
551
endif WITH_DTRACE_PROBES
552

553
qemuxml2argvtest_SOURCES = \
554
	qemuxml2argvtest.c testutilsqemu.c testutilsqemu.h \
555
	testutils.c testutils.h
556
qemuxml2argvtest_LDADD = $(qemu_LDADDS) $(LDADDS) $(LIBXML_LIBS)
557

558 559 560
qemuxml2argvmock_la_SOURCES = \
	qemuxml2argvmock.c
qemuxml2argvmock_la_CFLAGS = $(AM_CFLAGS)
561
qemuxml2argvmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
562

563
qemuxml2xmltest_SOURCES = \
564
	qemuxml2xmltest.c testutilsqemu.c testutilsqemu.h \
565
	testutils.c testutils.h
566
qemuxml2xmltest_LDADD = $(qemu_LDADDS) $(LDADDS)
567

P
Philipp Hahn 已提交
568 569 570
qemuxmlnstest_SOURCES = \
	qemuxmlnstest.c testutilsqemu.c testutilsqemu.h \
	testutils.c testutils.h
571
qemuxmlnstest_LDADD = $(qemu_LDADDS) $(LDADDS)
P
Philipp Hahn 已提交
572

573 574 575
qemuargv2xmltest_SOURCES = \
	qemuargv2xmltest.c testutilsqemu.c testutilsqemu.h \
	testutils.c testutils.h
576
qemuargv2xmltest_LDADD = $(qemu_LDADDS) $(LDADDS)
577 578

qemuhelptest_SOURCES = qemuhelptest.c testutils.c testutils.h
579
qemuhelptest_LDADD = $(qemu_LDADDS) $(LDADDS)
580

581 582 583 584 585 586
qemumonitortest_SOURCES = \
	qemumonitortest.c \
	testutils.c testutils.h \
	testutilsqemu.c testutilsqemu.h
qemumonitortest_LDADD = libqemumonitortestutils.la \
	$(qemu_LDADDS) $(LDADDS)
587

588 589 590 591 592
qemumonitorjsontest_SOURCES = \
	qemumonitorjsontest.c \
	testutils.c testutils.h \
	testutilsqemu.c testutilsqemu.h \
	$(NULL)
593 594
qemumonitorjsontest_LDADD = libqemumonitortestutils.la \
	$(qemu_LDADDS) $(LDADDS)
595

596 597 598 599 600
qemucapabilitiestest_SOURCES = \
	qemucapabilitiestest.c \
	testutils.c testutils.h \
	testutilsqemu.c testutilsqemu.h \
	$(NULL)
601 602
qemucapabilitiestest_LDADD = libqemumonitortestutils.la \
	$(qemu_LDADDS) $(LDADDS)
603

604 605 606 607 608 609 610 611
qemucommandutiltest_SOURCES = \
	qemucommandutiltest.c \
	testutils.c testutils.h \
	testutilsqemu.c testutilsqemu.h \
	$(NULL)
qemucommandutiltest_LDADD = libqemumonitortestutils.la \
	$(qemu_LDADDS) $(LDADDS)

612 613 614 615
qemucaps2xmltest_SOURCES = \
	qemucaps2xmltest.c \
	testutils.c testutils.h \
	$(NULL)
616
qemucaps2xmltest_LDADD = $(qemu_LDADDS) $(LDADDS)
617

P
Pavel Hrdina 已提交
618 619 620
qemucaps2xmlmock_la_SOURCES = \
	qemucaps2xmlmock.c
qemucaps2xmlmock_la_CFLAGS = $(AM_CFLAGS)
621
qemucaps2xmlmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
P
Pavel Hrdina 已提交
622

P
Peter Krempa 已提交
623 624 625 626 627
qemuagenttest_SOURCES = \
	qemuagenttest.c \
	testutils.c testutils.h \
	testutilsqemu.c testutilsqemu.h \
	$(NULL)
628
qemuagenttest_LDADD = libqemumonitortestutils.la $(qemu_LDADDS) $(LDADDS)
P
Peter Krempa 已提交
629

630 631 632 633 634
qemuhotplugtest_SOURCES = \
	qemuhotplugtest.c \
	testutils.c testutils.h \
	testutilsqemu.c testutilsqemu.h \
	$(NULL)
635
qemuhotplugtest_LDADD = libqemumonitortestutils.la $(qemu_LDADDS) $(LDADDS)
636

637 638 639
domainsnapshotxml2xmltest_SOURCES = \
	domainsnapshotxml2xmltest.c testutilsqemu.c testutilsqemu.h \
	testutils.c testutils.h
640
domainsnapshotxml2xmltest_LDADD = $(qemu_LDADDS) $(LDADDS)
641
else ! WITH_QEMU
642 643
EXTRA_DIST += qemuxml2argvtest.c qemuxml2xmltest.c qemuargv2xmltest.c \
	qemuxmlnstest.c qemuhelptest.c domainsnapshotxml2xmltest.c \
644
	qemumonitortest.c testutilsqemu.c testutilsqemu.h \
645
	qemumonitorjsontest.c qemuhotplugtest.c \
646
	qemuagenttest.c qemucapabilitiestest.c \
647
	qemucaps2xmltest.c qemucommandutiltest.c \
648
	$(QEMUMONITORTESTUTILS_SOURCES)
649
endif ! WITH_QEMU
650

651 652
if WITH_LXC

E
Eric Blake 已提交
653
lxc_LDADDS = ../src/libvirt_driver_lxc_impl.la
654
if WITH_NETWORK
E
Eric Blake 已提交
655
lxc_LDADDS += ../src/libvirt_driver_network_impl.la
656
endif WITH_NETWORK
657
lxc_LDADDS += $(LDADDS)
658 659 660 661

lxcxml2xmltest_SOURCES = \
	lxcxml2xmltest.c testutilslxc.c testutilslxc.h \
	testutils.c testutils.h
662
lxcxml2xmltest_LDADD = $(lxc_LDADDS)
663 664 665 666 667

lxcconf2xmltest_SOURCES = \
	lxcconf2xmltest.c \
	testutils.c testutils.h
lxcconf2xmltest_LDADD = $(lxc_LDADDS)
668
else ! WITH_LXC
669
EXTRA_DIST += lxcxml2xmltest.c testutilslxc.c testutilslxc.h
670
endif ! WITH_LXC
671

672 673 674 675
if WITH_OPENVZ
openvzutilstest_SOURCES = \
	openvzutilstest.c \
	testutils.c testutils.h
676
openvzutilstest_LDADD = $(LDADDS)
677
else ! WITH_OPENVZ
678
EXTRA_DIST += openvzutilstest.c
679
endif ! WITH_OPENVZ
680 681
EXTRA_DIST += openvzutilstest.conf

682 683 684 685
if WITH_ESX
esxutilstest_SOURCES = \
	esxutilstest.c \
	testutils.c testutils.h
686
esxutilstest_LDADD = $(LDADDS)
687
else ! WITH_ESX
688
EXTRA_DIST += esxutilstest.c
689
endif ! WITH_ESX
690

Y
Yohan BELLEGUIC 已提交
691 692 693 694 695 696 697 698 699 700
if WITH_VBOX
vboxsnapshotxmltest_SOURCES = \
	vboxsnapshotxmltest.c \
	testutils.c testutils.h
vbox_LDADDS = ../src/libvirt_driver_vbox_impl.la
vboxsnapshotxmltest_LDADD = $(LDADDS) $(vbox_LDADDS)
else ! WITH_VBOX
EXTRA_DIST += vboxsnapshotxmltest.c
endif ! WITH_VBOX

701
if WITH_VMX
702 703 704
vmx2xmltest_SOURCES = \
	vmx2xmltest.c \
	testutils.c testutils.h
705
vmx2xmltest_LDADD = $(LDADDS)
706 707 708 709

xml2vmxtest_SOURCES = \
	xml2vmxtest.c \
	testutils.c testutils.h
710
xml2vmxtest_LDADD = $(LDADDS)
711
else ! WITH_VMX
712
EXTRA_DIST += vmx2xmltest.c xml2vmxtest.c
713
endif ! WITH_VMX
714

715 716 717 718 719 720 721 722 723
if WITH_VMWARE
vmwarevertest_SOURCES = \
    vmwarevertest.c \
    testutils.c testutils.h
vmwarevertest_LDADD = $(LDADDS)
else ! WITH_VMWARE
EXTRA_DIST += vmwarevertest.c
endif ! WITH_VMWARE

R
Roman Bogorodskiy 已提交
724 725 726 727
if WITH_BHYVE
bhyvexml2argvmock_la_SOURCES = \
	bhyvexml2argvmock.c
bhyvexml2argvmock_la_CFLAGS = $(AM_CFLAGS)
728
bhyvexml2argvmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
R
Roman Bogorodskiy 已提交
729 730

bhyve_LDADDS = ../src/libvirt_driver_bhyve_impl.la
R
Roman Bogorodskiy 已提交
731 732 733
if WITH_STORAGE
bhyve_LDADDS += ../src/libvirt_driver_storage_impl.la
endif WITH_STORAGE
R
Roman Bogorodskiy 已提交
734 735 736 737 738
bhyve_LDADDS += $(LDADDS)
bhyvexml2argvtest_SOURCES = \
	bhyvexml2argvtest.c \
	testutils.c testutils.h
bhyvexml2argvtest_LDADD = $(bhyve_LDADDS)
739 740 741 742 743

bhyvexml2xmltest_SOURCES = \
	bhyvexml2xmltest.c \
	testutils.c testutils.h
bhyvexml2xmltest_LDADD = $(bhyve_LDADDS)
R
Roman Bogorodskiy 已提交
744
else ! WITH_BHYVE
745
EXTRA_DIST += bhyvexml2argvtest.c bhyvexml2xmltest.c bhyvexml2argvmock.c
R
Roman Bogorodskiy 已提交
746 747
endif ! WITH_BHYVE

748 749 750 751 752
networkxml2xmltest_SOURCES = \
	networkxml2xmltest.c \
	testutils.c testutils.h
networkxml2xmltest_LDADD = $(LDADDS)

J
Ján Tomko 已提交
753 754 755 756 757
networkxml2xmlupdatetest_SOURCES = \
	networkxml2xmlupdatetest.c \
	testutils.c testutils.h
networkxml2xmlupdatetest_LDADD = $(LDADDS)

758
if WITH_NETWORK
759 760
networkxml2conftest_SOURCES = \
	networkxml2conftest.c \
761
	testutils.c testutils.h
762
networkxml2conftest_LDADD = ../src/libvirt_driver_network_impl.la $(LDADDS)
763 764 765 766 767 768

networkxml2firewalltest_SOURCES = \
	networkxml2firewalltest.c \
	testutils.c testutils.h
networkxml2firewalltest_LDADD = ../src/libvirt_driver_network_impl.la $(LDADDS)

769
else ! WITH_NETWORK
770
EXTRA_DIST += networkxml2conftest.c
771
endif !	WITH_NETWORK
772

773 774 775 776
if WITH_STORAGE_SHEEPDOG
storagebackendsheepdogtest_SOURCES = \
	storagebackendsheepdogtest.c \
	testutils.c testutils.h
777 778
storagebackendsheepdogtest_LDADD = \
	../src/libvirt_driver_storage_impl.la $(LDADDS)
779
else ! WITH_STORAGE_SHEEPDOG
780
EXTRA_DIST += storagebackendsheepdogtest.c
781
endif ! WITH_STORAGE_SHEEPDOG
782

783 784 785 786
nwfilterxml2xmltest_SOURCES = \
	nwfilterxml2xmltest.c \
	testutils.c testutils.h
nwfilterxml2xmltest_LDADD = $(LDADDS)
787

788 789 790 791 792
if WITH_NWFILTER
nwfilterebiptablestest_SOURCES = \
	nwfilterebiptablestest.c \
	testutils.c testutils.h
nwfilterebiptablestest_LDADD = ../src/libvirt_driver_nwfilter_impl.la $(LDADDS)
793 794 795 796 797 798

nwfilterxml2firewalltest_SOURCES = \
	nwfilterxml2firewalltest.c \
	testutils.c testutils.h
nwfilterxml2firewalltest_LDADD = \
	../src/libvirt_driver_nwfilter_impl.la $(LDADDS)
799 800
endif WITH_NWFILTER

J
Ján Tomko 已提交
801 802 803 804 805 806
secretxml2xmltest_SOURCES = \
	secretxml2xmltest.c \
	testutils.c testutils.h
secretxml2xmltest_LDADD = $(LDADDS)


807
if WITH_STORAGE
808 809 810 811
storagevolxml2argvtest_SOURCES = \
    storagevolxml2argvtest.c \
    testutils.c testutils.h
storagevolxml2argvtest_LDADD = \
G
Guido Günther 已提交
812
	$(LIBXML_LIBS) \
813
	../src/libvirt_driver_storage_impl.la $(LDADDS)
J
Ján Tomko 已提交
814

815
else ! WITH_STORAGE
816
EXTRA_DIST += storagevolxml2argvtest.c
817
endif ! WITH_STORAGE
818

819 820 821 822 823
storagevolxml2xmltest_SOURCES = \
	storagevolxml2xmltest.c \
	testutils.c testutils.h
storagevolxml2xmltest_LDADD = $(LDADDS)

824 825 826 827 828
storagepoolxml2xmltest_SOURCES = \
	storagepoolxml2xmltest.c \
	testutils.c testutils.h
storagepoolxml2xmltest_LDADD = $(LDADDS)

M
Mark McLoughlin 已提交
829 830 831
nodedevxml2xmltest_SOURCES = \
	nodedevxml2xmltest.c \
	testutils.c testutils.h
832
nodedevxml2xmltest_LDADD = $(LDADDS)
M
Mark McLoughlin 已提交
833

834 835 836 837 838
interfacexml2xmltest_SOURCES = \
	interfacexml2xmltest.c \
	testutils.c testutils.h
interfacexml2xmltest_LDADD = $(LDADDS)

839 840 841
cputest_SOURCES = \
	cputest.c \
	testutils.c testutils.h
842
cputest_LDADD = $(LDADDS) $(LIBXML_LIBS)
843

P
Peter Krempa 已提交
844 845 846 847 848
metadatatest_SOURCES = \
	metadatatest.c \
	testutils.c testutils.h
metadatatest_LDADD = $(LDADDS) $(LIBXML_LIBS)

849 850 851 852 853
virshtest_SOURCES = \
	virshtest.c \
	testutils.c testutils.h
virshtest_LDADD = $(LDADDS)

G
Gene Czarcinski 已提交
854 855 856
test_conf_SOURCES = \
	test_conf.c
test_conf_LDADD = $(LDADDS)
D
Daniel Veillard 已提交
857

858 859 860 861
nodeinfotest_SOURCES = \
	nodeinfotest.c testutils.h testutils.c
nodeinfotest_LDADD = $(LDADDS)

862 863 864 865 866 867
commandtest_SOURCES = \
	commandtest.c testutils.h testutils.c
commandtest_LDADD = $(LDADDS)

commandhelper_SOURCES = \
	commandhelper.c
868 869 870 871 872 873 874
commandhelper_LDADD = \
	$(WARN_CFLAGS) \
	$(NO_INDIRECT_LDFLAGS) \
	$(PROBES_O) \
	../src/libvirt_util.la \
	$(GNULIB_LIBS)

875
commandhelper_LDFLAGS = -static
876

877

878 879 880 881
virkmodtest_SOURCES = \
	virkmodtest.c testutils.h testutils.c
virkmodtest_LDADD = $(LDADDS)

882
vircapstest_SOURCES = \
883 884 885 886 887 888 889 890 891 892
	vircapstest.c testutils.h testutils.c
if WITH_LXC
vircapstest_SOURCES += testutilslxc.c testutilslxc.h
endif WITH_LXC
if WITH_QEMU
vircapstest_SOURCES += testutilsqemu.c testutilsqemu.h
endif WITH_QEMU
if WITH_XEN
vircapstest_SOURCES += testutilsxen.c testutilsxen.h
endif WITH_XEN
893
vircapstest_LDADD = $(qemu_LDADDS) $(LDADDS)
894

895 896 897 898
vircaps2xmltest_SOURCES = \
	vircaps2xmltest.c testutils.h testutils.c
vircaps2xmltest_LDADD = $(LDADDS)

M
Michal Privoznik 已提交
899 900 901 902
domaincapstest_SOURCES = \
	domaincapstest.c testutils.h testutils.c
domaincapstest_LDADD = $(LDADDS)

903 904
if WITH_QEMU
domaincapstest_SOURCES += testutilsqemu.c testutilsqemu.h
905
domaincapstest_LDADD += $(qemu_LDADDS) $(GNULIB_LIBS)
906 907
endif WITH_QEMU

908 909 910
if WITH_LIBVIRTD
libvirtdconftest_SOURCES = \
	libvirtdconftest.c testutils.h testutils.c \
911 912
	$(NULL)
libvirtdconftest_LDADD = ../daemon/libvirtd_conf.la $(LDADDS)
913
else ! WITH_LIBVIRTD
914
EXTRA_DIST += libvirtdconftest.c
915
endif ! WITH_LIBVIRTD
916

917 918
virnetmessagetest_SOURCES = \
	virnetmessagetest.c testutils.h testutils.c
919
virnetmessagetest_CFLAGS = $(XDR_CFLAGS) $(AM_CFLAGS)
920
virnetmessagetest_LDADD = $(LDADDS)
921

922 923
virnetsockettest_SOURCES = \
	virnetsockettest.c testutils.h testutils.c
924
virnetsockettest_LDADD = $(LDADDS)
925

926 927
virnetdaemontest_SOURCES = \
	virnetdaemontest.c \
928
	testutils.h testutils.c
929 930
virnetdaemontest_CFLAGS = $(XDR_CFLAGS) $(AM_CFLAGS)
virnetdaemontest_LDADD = $(LDADDS)
931

932 933 934
virnetserverclienttest_SOURCES = \
	virnetserverclienttest.c \
	testutils.h testutils.c
935
virnetserverclienttest_CFLAGS = $(XDR_CFLAGS) $(AM_CFLAGS)
936 937 938 939 940
virnetserverclienttest_LDADD = $(LDADDS)

virnetserverclientmock_la_SOURCES = \
	virnetserverclientmock.c
virnetserverclientmock_la_CFLAGS = $(AM_CFLAGS)
941
virnetserverclientmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
942
virnetserverclientmock_la_LIBADD = $(GNULIB_LIBS)
943

944
if WITH_GNUTLS
945
virnettlscontexttest_SOURCES = \
946 947 948
	virnettlscontexttest.c \
	virnettlshelpers.h virnettlshelpers.c \
	testutils.h testutils.c
949
virnettlscontexttest_LDADD = $(LDADDS) $(GNUTLS_LIBS)
950 951 952 953
virnettlssessiontest_SOURCES = \
	virnettlssessiontest.c \
	virnettlshelpers.h virnettlshelpers.c \
	testutils.h testutils.c
954
virnettlssessiontest_LDADD = $(LDADDS) $(GNUTLS_LIBS)
E
Eric Blake 已提交
955 956 957
if HAVE_LIBTASN1
virnettlscontexttest_SOURCES += pkix_asn1_tab.c
virnettlscontexttest_LDADD += -ltasn1
958 959
virnettlssessiontest_SOURCES += pkix_asn1_tab.c
virnettlssessiontest_LDADD += -ltasn1
960
else ! HAVE_LIBTASN1
E
Eric Blake 已提交
961
EXTRA_DIST += pkix_asn1_tab.c
962 963
endif ! HAVE_LIBTASN1
else ! WITH_GNUTLS
964
EXTRA_DIST += \
965 966 967
	virnettlscontexttest.c virnettlssessiontest.c \
	virnettlshelpers.h virnettlshelpers.c \
	testutils.h testutils.c pkix_asn1_tab.c
968
endif ! WITH_GNUTLS
969

970 971
virtimetest_SOURCES = \
	virtimetest.c testutils.h testutils.c
972
virtimetest_LDADD = $(LDADDS)
973

974 975 976 977
virstringtest_SOURCES = \
	virstringtest.c testutils.h testutils.c
virstringtest_LDADD = $(LDADDS)

978 979
virstoragetest_SOURCES = \
	virstoragetest.c testutils.h testutils.c
980 981 982 983 984 985 986
virstoragetest_LDADD = $(LDADDS) \
	../src/libvirt.la \
	../src/libvirt_conf.la \
	../src/libvirt_util.la \
	../src/libvirt_driver_storage_impl.la \
	../gnulib/lib/libgnu.la \
	$(NULL)
987

988 989 990
viridentitytest_SOURCES = \
	viridentitytest.c testutils.h testutils.c
viridentitytest_LDADD = $(LDADDS)
991
if WITH_SELINUX
992
viridentitytest_LDADD += $(SELINUX_LIBS)
993 994 995
viridentitytest_DEPENDENCIES = libsecurityselinuxhelper.la \
	../src/libvirt.la
endif WITH_SELINUX
996

J
Ján Tomko 已提交
997 998 999 1000
viriscsitest_SOURCES = \
	viriscsitest.c testutils.h testutils.c
viriscsitest_LDADD = $(LDADDS)

1001 1002 1003 1004
virkeycodetest_SOURCES = \
	virkeycodetest.c testutils.h testutils.c
virkeycodetest_LDADD = $(LDADDS)

1005 1006 1007 1008
virlockspacetest_SOURCES = \
	virlockspacetest.c testutils.h testutils.c
virlockspacetest_LDADD = $(LDADDS)

1009 1010 1011 1012
virlogtest_SOURCES = \
	virlogtest.c testutils.h testutils.c
virlogtest_LDADD = $(LDADDS)

D
Daniel P. Berrange 已提交
1013 1014 1015 1016 1017 1018 1019
virportallocatortest_SOURCES = \
	virportallocatortest.c testutils.h testutils.c
virportallocatortest_LDADD = $(LDADDS)

libvirportallocatormock_la_SOURCES = \
	virportallocatortest.c
libvirportallocatormock_la_CFLAGS = $(AM_CFLAGS) -DMOCK_HELPER=1
1020
libvirportallocatormock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
D
Daniel P. Berrange 已提交
1021

1022 1023 1024 1025 1026 1027 1028
vircgrouptest_SOURCES = \
	vircgrouptest.c testutils.h testutils.c
vircgrouptest_LDADD = $(LDADDS)

vircgroupmock_la_SOURCES = \
	vircgroupmock.c
vircgroupmock_la_CFLAGS = $(AM_CFLAGS)
1029
vircgroupmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1030

1031 1032 1033 1034
vircryptotest_SOURCES = \
	vircryptotest.c testutils.h testutils.c
vircryptotest_LDADD = $(LDADDS)

1035 1036 1037 1038
virhostdevtest_SOURCES = \
	virhostdevtest.c testutils.h testutils.c
virhostdevtest_LDADD = $(LDADDS)

M
Michal Privoznik 已提交
1039 1040 1041 1042 1043 1044 1045
virpcitest_SOURCES = \
	virpcitest.c testutils.h testutils.c
virpcitest_LDADD = $(LDADDS)

virpcimock_la_SOURCES = \
	virpcimock.c
virpcimock_la_CFLAGS = $(AM_CFLAGS)
1046 1047
virpcimock_la_LIBADD = $(GNULIB_LIBS) \
					   ../src/libvirt.la
1048
virpcimock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
M
Michal Privoznik 已提交
1049

M
Michal Privoznik 已提交
1050 1051 1052 1053 1054 1055 1056 1057 1058 1059
virnetdevtest_SOURCES = \
	virnetdevtest.c testutils.h testutils.c
virnetdevtest_CFLAGS = $(AM_CFLAGS) $(LIBNL_CFLAGS)
virnetdevtest_LDADD = $(LDADDS)

virnetdevmock_la_SOURCES = \
	virnetdevmock.c
virnetdevmock_la_CFLAGS = $(AM_CFLAGS) $(LIBNL_CFLAGS)
virnetdevmock_la_LIBADD = $(GNULIB_LIBS) \
					   ../src/libvirt.la
1060
virnetdevmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
M
Michal Privoznik 已提交
1061

1062 1063 1064 1065 1066
if WITH_LINUX
virusbtest_SOURCES = \
	virusbtest.c testutils.h testutils.c
virusbtest_LDADD = $(LDADDS)

1067 1068 1069 1070
virnetdevbandwidthtest_SOURCES = \
	virnetdevbandwidthtest.c testutils.h testutils.c
virnetdevbandwidthtest_LDADD = $(LDADDS) $(LIBXML_LIBS)

1071 1072
virusbmock_la_SOURCES = virusbmock.c
virusbmock_la_CFLAGS = $(AM_CFLAGS)
1073
virusbmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1074 1075 1076 1077

virnetdevbandwidthmock_la_SOURCES = \
	virnetdevbandwidthmock.c
virnetdevbandwidthmock_la_CFLAGS = $(AM_CFLAGS)
1078
virnetdevbandwidthmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1079

1080
else ! WITH_LINUX
1081 1082
	EXTRA_DIST += virusbtest.c virusbmock.c \
		virnetdevbandwidthtest.c virnetdevbandwidthmock.c
1083 1084
endif ! WITH_LINUX

1085 1086 1087 1088
if WITH_DBUS
virdbustest_SOURCES = \
	virdbustest.c testutils.h testutils.c
virdbustest_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
1089
virdbustest_LDADD = $(LDADDS) $(DBUS_LIBS)
1090

1091 1092 1093
virmockdbus_la_SOURCES = \
	virmockdbus.c
virmockdbus_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
1094
virmockdbus_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1095

1096 1097 1098 1099 1100
virpolkittest_SOURCES = \
	virpolkittest.c testutils.h testutils.c
virpolkittest_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
virpolkittest_LDADD = $(LDADDS) $(DBUS_LIBS)

1101 1102
virsystemdtest_SOURCES = \
	virsystemdtest.c testutils.h testutils.c
1103
virsystemdtest_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
1104
virsystemdtest_LDADD = $(LDADDS) $(DBUS_LIBS)
1105

1106
else ! WITH_DBUS
1107
EXTRA_DIST += virdbustest.c virmockdbus.c virsystemdtest.c
1108
endif ! WITH_DBUS
D
Daniel P. Berrange 已提交
1109

1110 1111
viruritest_SOURCES = \
	viruritest.c testutils.h testutils.c
1112
viruritest_LDADD = $(LDADDS)
1113

1114 1115
virkeyfiletest_SOURCES = \
	virkeyfiletest.c testutils.h testutils.c
1116
virkeyfiletest_LDADD = $(LDADDS)
1117

1118 1119 1120 1121
viralloctest_SOURCES = \
	viralloctest.c testutils.h testutils.c
viralloctest_LDADD = $(LDADDS)

1122 1123
virauthconfigtest_SOURCES = \
	virauthconfigtest.c testutils.h testutils.c
1124
virauthconfigtest_LDADD = $(LDADDS)
1125

1126 1127
seclabeltest_SOURCES = \
	seclabeltest.c
1128
seclabeltest_LDADD = $(LDADDS)
J
Jamie Strandboge 已提交
1129

1130
if WITH_SECDRIVER_SELINUX
1131
if WITH_ATTR
1132 1133
if WITH_TESTS
noinst_LTLIBRARIES += libsecurityselinuxhelper.la
1134
else ! WITH_TESTS
1135
check_LTLIBRARIES += libsecurityselinuxhelper.la
1136
endif ! WITH_TESTS
1137 1138 1139

libsecurityselinuxhelper_la_SOURCES = \
	securityselinuxhelper.c
1140
libsecurityselinuxhelper_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1141 1142 1143

securityselinuxtest_SOURCES = \
	securityselinuxtest.c testutils.h testutils.c
1144
securityselinuxtest_LDADD = $(LDADDS) $(SELINUX_LIBS)
1145 1146
securityselinuxtest_DEPENDENCIES = libsecurityselinuxhelper.la \
	../src/libvirt.la
1147 1148 1149 1150 1151

if WITH_QEMU
securityselinuxlabeltest_SOURCES = \
	securityselinuxlabeltest.c testutils.h testutils.c \
        testutilsqemu.h testutilsqemu.c
1152
securityselinuxlabeltest_LDADD = $(qemu_LDADDS) $(LDADDS) $(SELINUX_LIBS)
1153 1154
securityselinuxlabeltest_DEPENDENCIES = libsecurityselinuxhelper.la \
	../src/libvirt.la
1155 1156 1157
endif WITH_QEMU
endif WITH_ATTR
endif WITH_SECDRIVER_SELINUX
1158 1159
EXTRA_DIST += securityselinuxtest.c securityselinuxlabeltest.c \
	securityselinuxhelper.c
1160

1161 1162 1163 1164
virbuftest_SOURCES = \
	virbuftest.c testutils.h testutils.c
virbuftest_LDADD = $(LDADDS)

1165 1166 1167
virhashtest_SOURCES = \
	virhashtest.c virhashdata.h testutils.h testutils.c
virhashtest_LDADD = $(LDADDS)
1168

1169
viratomictest_SOURCES = \
L
Laine Stump 已提交
1170
	viratomictest.c testutils.h testutils.c
1171 1172
viratomictest_LDADD = $(LDADDS)

H
Hu Tao 已提交
1173 1174 1175 1176
virbitmaptest_SOURCES = \
	virbitmaptest.c testutils.h testutils.c
virbitmaptest_LDADD = $(LDADDS)

E
Eric Blake 已提交
1177 1178 1179 1180
virendiantest_SOURCES = \
	virendiantest.c testutils.h testutils.c
virendiantest_LDADD = $(LDADDS)

1181 1182 1183 1184
virfiletest_SOURCES = \
	virfiletest.c testutils.h testutils.c
virfiletest_LDADD = $(LDADDS)

1185 1186
virfirewalltest_SOURCES = \
	virfirewalltest.c testutils.h testutils.c
1187
virfirewalltest_LDADD = $(LDADDS) $(DBUS_LIBS)
1188 1189
virfirewalltest_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)

1190
jsontest_SOURCES = \
1191
	jsontest.c testutils.h testutils.c
1192 1193
jsontest_LDADD = $(LDADDS)

M
Matthias Bolte 已提交
1194 1195 1196 1197
utiltest_SOURCES = \
	utiltest.c testutils.h testutils.c
utiltest_LDADD = $(LDADDS)

1198 1199 1200 1201
if WITH_DRIVER_MODULES
virdrivermoduletest_SOURCES = \
	virdrivermoduletest.c testutils.h testutils.c
virdrivermoduletest_LDADD = $(LDADDS)
1202
endif WITH_DRIVER_MODULES
1203

1204 1205
if WITH_LIBVIRTD
eventtest_SOURCES = \
1206
	eventtest.c testutils.h testutils.c
1207
eventtest_LDADD = -lrt $(LDADDS)
1208
endif WITH_LIBVIRTD
1209

1210 1211
libshunload_la_SOURCES = shunloadhelper.c
libshunload_la_LIBADD = ../src/libvirt.la
1212
libshunload_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1213 1214 1215

shunloadtest_SOURCES = \
	shunloadtest.c
1216
shunloadtest_LDADD = $(LIB_PTHREAD)
1217 1218
shunloadtest_DEPENDENCIES = libshunload.la

V
Viktor Mihajlovski 已提交
1219 1220 1221 1222
sysinfotest_SOURCES = \
	sysinfotest.c testutils.h testutils.c
sysinfotest_LDADD = $(LDADDS)

1223 1224 1225 1226
domainconftest_SOURCES = \
	domainconftest.c testutils.h testutils.c
domainconftest_LDADD = $(LDADDS)

1227 1228 1229 1230
fdstreamtest_SOURCES = \
	fdstreamtest.c testutils.h testutils.c
fdstreamtest_LDADD = $(LDADDS)

1231 1232 1233 1234 1235
objecteventtest_SOURCES = \
	objecteventtest.c \
	testutils.c testutils.h
objecteventtest_LDADD = $(LDADDS)

1236
if WITH_LINUX
O
Osier Yang 已提交
1237 1238 1239 1240
fchosttest_SOURCES = \
       fchosttest.c testutils.h testutils.c
fchosttest_LDADD = $(LDADDS)

1241 1242 1243 1244
scsihosttest_SOURCES = \
       scsihosttest.c testutils.h testutils.c
scsihosttest_LDADD = $(LDADDS)

1245 1246
else ! WITH_LINUX
EXTRA_DIST += fchosttest.c
1247
EXTRA_DIST += scsihosttest.c
1248 1249
endif  ! WITH_LINUX

O
Osier Yang 已提交
1250 1251 1252 1253 1254 1255 1256 1257 1258
if WITH_LINUX
virscsitest_SOURCES = \
       virscsitest.c testutils.h testutils.c
virscsitest_LDADD = $(LDADDS)

else ! WITH_LINUX
EXTRA_DIST += virscsitest.c
endif  ! WITH_LINUX

1259 1260 1261 1262 1263 1264
if WITH_CIL
CILOPTFLAGS =
CILOPTINCS =
CILOPTPACKAGES = -package unix,str,cil
CILOPTLIBS = -linkpkg

M
Martin Kletzander 已提交
1265
objectlocking_SOURCES = objectlocking.ml
1266 1267 1268 1269

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

1270
objectlocking: objectlocking.cmx objectlocking-files.txt
1271 1272
	ocamlfind ocamlopt $(CILOPTFLAGS) $(CILOPTINCS) $(CILOPTPACKAGES) \
	  $(CILOPTLIBS) $< -o $@
1273

1274
objectlocking-files.txt:
1275 1276
	find $(top_builddir)/src/ -name '*.i' > $@

1277
else ! WITH_CIL
1278
EXTRA_DIST += objectlocking.ml
1279
endif ! WITH_CIL
1280

1281
CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.cmi *.cmx \
1282
	objectlocking-files.txt