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

E
Eric Blake 已提交
3
## Copyright (C) 2005-2013 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
	-Dabs_builddir="\"`pwd`\"" \
19 20
	$(LIBXML_CFLAGS) \
	$(GNUTLS_CFLAGS) \
21
	$(SASL_CFLAGS) \
22
	$(SELINUX_CFLAGS) \
J
Jamie Strandboge 已提交
23
	$(APPARMOR_CFLAGS) \
24
	$(YAJL_CFLAGS) \
E
Eric Blake 已提交
25 26
	$(COVERAGE_CFLAGS) \
	$(WARN_CFLAGS)
27

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

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

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

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

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

108
if WITH_GNUTLS
109 110 111
test_programs += virnettlscontexttest
endif

112 113
if WITH_SECDRIVER_SELINUX
test_programs += securityselinuxtest
114
if WITH_QEMU
115 116 117
if WITH_ATTR
test_programs += securityselinuxlabeltest
endif
118
endif
119
endif
120

121 122 123 124
if WITH_DRIVER_MODULES
test_programs += virdrivermoduletest
endif

125 126 127
# This is a fake SSH we use from virnetsockettest
ssh_SOURCES = ssh.c
ssh_LDADD = $(COVERAGE_LDFLAGS)
128

129
if WITH_XEN
130
test_programs += xml2sexprtest sexpr2xmltest \
131
	xmconfigtest xencapstest statstest reconnect
132
endif
133
if WITH_QEMU
134
test_programs += qemuxml2argvtest qemuxml2xmltest qemuxmlnstest \
135
	qemuargv2xmltest qemuhelptest domainsnapshotxml2xmltest \
136
	qemumonitortest qemumonitorjsontest
137 138
endif

139
if WITH_LXC
140
test_programs += lxcxml2xmltest
141 142
endif

143
if WITH_OPENVZ
144
test_programs += openvzutilstest
145 146
endif

147
if WITH_ESX
148
test_programs += esxutilstest
149 150 151
endif

if WITH_VMX
152
test_programs += vmx2xmltest xml2vmxtest
153 154
endif

155
if WITH_CIL
156
test_programs += object-locking
157 158
endif

159
if WITH_YAJL
160
test_programs += jsontest
161 162
endif

163
test_programs += networkxml2xmltest
164

165
if WITH_NETWORK
166
test_programs += networkxml2conftest
167
endif
168

169 170 171 172
if WITH_STORAGE_SHEEPDOG
test_programs += storagebackendsheepdogtest
endif

173
test_programs += nwfilterxml2xmltest
174

175 176
test_programs += storagevolxml2argvtest

177
test_programs += storagevolxml2xmltest storagepoolxml2xmltest
178

179
test_programs += nodedevxml2xmltest
M
Mark McLoughlin 已提交
180

181
test_programs += interfacexml2xmltest
182

183
test_programs += cputest
184

185 186
test_scripts = \
	capabilityschematest \
187
	interfaceschematest \
188 189 190 191
	networkschematest \
	storagepoolschematest \
	storagevolschematest \
	domainschematest \
192
	nodedevschematest \
193 194
	nwfilterschematest \
	domainsnapshotschematest
195

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

215 216 217
test_programs += 			\
	eventtest			\
	libvirtdconftest
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232
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			\
233 234 235
	virsh-synopsis			\
	virsh-undefine			\
	$(NULL)
A
Atsushi SAKAI 已提交
236
endif
237

J
Jamie Strandboge 已提交
238 239
if WITH_SECDRIVER_APPARMOR
test_scripts += virt-aa-helper-test
240 241
else
EXTRA_DIST += virt-aa-helper-test
J
Jamie Strandboge 已提交
242
endif
243

244 245
EXTRA_DIST += $(test_scripts)

D
Daniel P. Berrange 已提交
246 247 248
test_libraries = libshunload.la \
		libvirportallocatormock.la \
		$(NULL)
249 250 251 252
if WITH_QEMU
test_libraries += libqemumonitortestutils.la
endif

253 254
if WITH_TESTS
noinst_PROGRAMS = $(test_programs) $(test_helpers)
255
noinst_LTLIBRARIES = $(test_libraries)
256 257
else
check_PROGRAMS = $(test_programs) $(test_helpers)
258
check_LTLIBRARIES = $(test_libraries)
259
endif
260

261 262
TESTS = $(test_programs) \
	$(test_scripts)
263

264
# NB, automake < 1.10 does not provide the real
265
# abs_top_{src/build}dir or builddir variables, so don't rely
266
# on them here. Fake them with 'pwd'
267 268 269 270 271 272
# 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

273
TESTS_ENVIRONMENT =				\
274
  abs_top_builddir=$(lv_abs_top_builddir)	\
J
Jim Meyering 已提交
275
  abs_top_srcdir=`cd '$(top_srcdir)'; pwd`	\
276
  abs_builddir=`pwd`				\
277
  abs_srcdir=`cd '$(srcdir)'; pwd`		\
278
  CONFIG_HEADER="`cd '$(top_builddir)'; pwd`/config.h"	\
J
Jim Meyering 已提交
279
  PATH="$(path_add)$(PATH_SEPARATOR)$$PATH"	\
280
  SHELL="$(SHELL)"				\
281
  LIBVIRT_DRIVER_DIR="$(abs_top_builddir)/src/.libs" \
282
  LIBVIRT_AUTOSTART=0				\
283
  LC_ALL=C					\
284 285
  $(VG)

286

287
valgrind:
288
	$(MAKE) check VG="libtool --mode=execute valgrind --quiet --leak-check=full --suppressions=$(srcdir)/.valgrind.supp"
289

290 291 292
sockettest_SOURCES = \
	sockettest.c \
	testutils.c testutils.h
293
sockettest_LDADD = $(LDADDS)
294

295
if WITH_XEN
E
Eric Blake 已提交
296
xen_LDADDS = ../src/libvirt_driver_xen_impl.la
297 298
xen_LDADDS += $(LDADDS)

299
xml2sexprtest_SOURCES = \
300
	xml2sexprtest.c testutilsxen.c testutilsxen.h \
301
	testutils.c testutils.h
302
xml2sexprtest_LDADD = $(xen_LDADDS)
303 304

sexpr2xmltest_SOURCES = \
305
	sexpr2xmltest.c testutilsxen.c testutilsxen.h \
306
	testutils.c testutils.h
307
sexpr2xmltest_LDADD = $(xen_LDADDS)
308

309
xmconfigtest_SOURCES = \
310
	xmconfigtest.c testutilsxen.c testutilsxen.h \
311
	testutils.c testutils.h
312
xmconfigtest_LDADD = $(xen_LDADDS)
313

314 315
xencapstest_SOURCES = \
	xencapstest.c testutils.h testutils.c
316
xencapstest_LDADD = $(xen_LDADDS)
317 318

reconnect_SOURCES = \
319
	reconnect.c testutils.h testutils.c
320 321
reconnect_LDADD = $(LDADDS)

322 323
statstest_SOURCES = \
	statstest.c testutils.h testutils.c
324
statstest_LDADD = $(xen_LDADDS)
325

326 327 328 329 330 331
else
EXTRA_DIST += xml2sexprtest.c sexpr2xmltest.c xmconfigtest.c \
	xencapstest.c reconnect.c \
	testutilsxen.c testutilsxen.h
endif

332 333 334 335 336
QEMUMONITORTESTUTILS_SOURCES = \
	qemumonitortestutils.c \
	qemumonitortestutils.h \
	$(NULL)

337
if WITH_QEMU
338

339 340
libqemumonitortestutils_la_SOURCES = $(QEMUMONITORTESTUTILS_SOURCES)

341
qemu_LDADDS = ../src/libvirt_driver_qemu_impl.la
342
if WITH_NETWORK
E
Eric Blake 已提交
343
qemu_LDADDS += ../src/libvirt_driver_network_impl.la
344
endif
345
if WITH_DTRACE_PROBES
346
qemu_LDADDS += ../src/libvirt_qemu_probes.lo
347
endif
348
qemu_LDADDS += $(LDADDS)
349

350
qemuxml2argvtest_SOURCES = \
351
	qemuxml2argvtest.c testutilsqemu.c testutilsqemu.h \
352
	testutils.c testutils.h
353
qemuxml2argvtest_LDADD = $(qemu_LDADDS)
354 355

qemuxml2xmltest_SOURCES = \
356
	qemuxml2xmltest.c testutilsqemu.c testutilsqemu.h \
357
	testutils.c testutils.h
358
qemuxml2xmltest_LDADD = $(qemu_LDADDS)
359

P
Philipp Hahn 已提交
360 361 362
qemuxmlnstest_SOURCES = \
	qemuxmlnstest.c testutilsqemu.c testutilsqemu.h \
	testutils.c testutils.h
363
qemuxmlnstest_LDADD = $(qemu_LDADDS)
P
Philipp Hahn 已提交
364

365 366 367
qemuargv2xmltest_SOURCES = \
	qemuargv2xmltest.c testutilsqemu.c testutilsqemu.h \
	testutils.c testutils.h
368
qemuargv2xmltest_LDADD = $(qemu_LDADDS)
369 370

qemuhelptest_SOURCES = qemuhelptest.c testutils.c testutils.h
371
qemuhelptest_LDADD = $(qemu_LDADDS)
372

373
qemumonitortest_SOURCES = qemumonitortest.c testutils.c testutils.h
374
qemumonitortest_LDADD = $(qemu_LDADDS)
375

376 377 378 379 380 381 382
qemumonitorjsontest_SOURCES = \
	qemumonitorjsontest.c \
	testutils.c testutils.h \
	testutilsqemu.c testutilsqemu.h \
	$(NULL)
qemumonitorjsontest_LDADD = $(qemu_LDADDS) libqemumonitortestutils.la

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

395 396
if WITH_LXC

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

lxcxml2xmltest_SOURCES = \
	lxcxml2xmltest.c testutilslxc.c testutilslxc.h \
	testutils.c testutils.h
406
lxcxml2xmltest_LDADD = $(lxc_LDADDS)
407 408 409 410
else
EXTRA_DIST += lxcxml2xmltest.c testutilslxc.c testutilslxc.h
endif

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

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

430
if WITH_VMX
431 432 433
vmx2xmltest_SOURCES = \
	vmx2xmltest.c \
	testutils.c testutils.h
434
vmx2xmltest_LDADD = $(LDADDS)
435 436 437 438

xml2vmxtest_SOURCES = \
	xml2vmxtest.c \
	testutils.c testutils.h
439
xml2vmxtest_LDADD = $(LDADDS)
440
else
441
EXTRA_DIST += vmx2xmltest.c xml2vmxtest.c
442 443
endif

444 445 446 447 448
networkxml2xmltest_SOURCES = \
	networkxml2xmltest.c \
	testutils.c testutils.h
networkxml2xmltest_LDADD = $(LDADDS)

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

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

468 469 470 471
nwfilterxml2xmltest_SOURCES = \
	nwfilterxml2xmltest.c \
	testutils.c testutils.h
nwfilterxml2xmltest_LDADD = $(LDADDS)
472 473 474 475 476 477

storagevolxml2argvtest_SOURCES = \
    storagevolxml2argvtest.c \
    testutils.c testutils.h
storagevolxml2argvtest_LDADD = \
	../src/libvirt_driver_storage_impl.la $(LDADDS)
478

479 480 481 482 483
storagevolxml2xmltest_SOURCES = \
	storagevolxml2xmltest.c \
	testutils.c testutils.h
storagevolxml2xmltest_LDADD = $(LDADDS)

484 485 486 487 488
storagepoolxml2xmltest_SOURCES = \
	storagepoolxml2xmltest.c \
	testutils.c testutils.h
storagepoolxml2xmltest_LDADD = $(LDADDS)

M
Mark McLoughlin 已提交
489 490 491
nodedevxml2xmltest_SOURCES = \
	nodedevxml2xmltest.c \
	testutils.c testutils.h
492
nodedevxml2xmltest_LDADD = $(LDADDS)
M
Mark McLoughlin 已提交
493

494 495 496 497 498
interfacexml2xmltest_SOURCES = \
	interfacexml2xmltest.c \
	testutils.c testutils.h
interfacexml2xmltest_LDADD = $(LDADDS)

499 500 501 502 503
cputest_SOURCES = \
	cputest.c \
	testutils.c testutils.h
cputest_LDADD = $(LDADDS)

504 505 506 507 508
virshtest_SOURCES = \
	virshtest.c \
	testutils.c testutils.h
virshtest_LDADD = $(LDADDS)

D
Daniel Veillard 已提交
509 510 511 512
conftest_SOURCES = \
	conftest.c
conftest_LDADD = $(LDADDS)

513 514 515 516
nodeinfotest_SOURCES = \
	nodeinfotest.c testutils.h testutils.c
nodeinfotest_LDADD = $(LDADDS)

517 518 519 520 521 522 523
commandtest_SOURCES = \
	commandtest.c testutils.h testutils.c
commandtest_LDADD = $(LDADDS)

commandhelper_SOURCES = \
	commandhelper.c
commandhelper_LDADD = $(LDADDS)
524
commandhelper_LDFLAGS = -static
525

526 527 528 529 530 531 532 533 534
if WITH_LIBVIRTD
libvirtdconftest_SOURCES = \
	libvirtdconftest.c testutils.h testutils.c \
	../daemon/libvirtd-config.c
libvirtdconftest_LDADD = $(LDADDS)
else
EXTRA_DIST += libvirtdconftest.c
endif

535 536
virnetmessagetest_SOURCES = \
	virnetmessagetest.c testutils.h testutils.c
537
virnetmessagetest_CFLAGS = $(XDR_CFLAGS) $(AM_CFLAGS)
538
virnetmessagetest_LDADD = $(LDADDS)
539

540 541
virnetsockettest_SOURCES = \
	virnetsockettest.c testutils.h testutils.c
542
virnetsockettest_LDADD = $(LDADDS)
543

544
if WITH_GNUTLS
545
virnettlscontexttest_SOURCES = \
E
Eric Blake 已提交
546
	virnettlscontexttest.c testutils.h testutils.c
547
virnettlscontexttest_LDADD = $(LDADDS)
E
Eric Blake 已提交
548 549 550 551 552 553
if HAVE_LIBTASN1
virnettlscontexttest_SOURCES += pkix_asn1_tab.c
virnettlscontexttest_LDADD += -ltasn1
else
EXTRA_DIST += pkix_asn1_tab.c
endif
554 555 556 557
else
EXTRA_DIST += \
	virnettlscontexttest.c testutils.h testutils.c pkix_asn1_tab.c
endif
558

559 560
virtimetest_SOURCES = \
	virtimetest.c testutils.h testutils.c
561
virtimetest_LDADD = $(LDADDS)
562

563 564 565 566
virstringtest_SOURCES = \
	virstringtest.c testutils.h testutils.c
virstringtest_LDADD = $(LDADDS)

567 568 569 570
virstoragetest_SOURCES = \
	virstoragetest.c testutils.h testutils.c
virstoragetest_LDADD = $(LDADDS)

571 572 573 574
virlockspacetest_SOURCES = \
	virlockspacetest.c testutils.h testutils.c
virlockspacetest_LDADD = $(LDADDS)

D
Daniel P. Berrange 已提交
575 576 577 578 579 580 581 582 583 584 585
virportallocatortest_SOURCES = \
	virportallocatortest.c testutils.h testutils.c
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


586 587
viruritest_SOURCES = \
	viruritest.c testutils.h testutils.c
588
viruritest_LDADD = $(LDADDS)
589

590 591
virkeyfiletest_SOURCES = \
	virkeyfiletest.c testutils.h testutils.c
592
virkeyfiletest_LDADD = $(LDADDS)
593

594 595
virauthconfigtest_SOURCES = \
	virauthconfigtest.c testutils.h testutils.c
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
if WITH_SECDRIVER_SELINUX
if WITH_TESTS
noinst_LTLIBRARIES += libsecurityselinuxhelper.la
else
check_LTLIBRARIES += libsecurityselinuxhelper.la
endif

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

securityselinuxtest_SOURCES = \
	securityselinuxtest.c testutils.h testutils.c
securityselinuxtest_LDADD = $(LDADDS)
617 618 619 620 621 622 623 624 625 626 627
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_LDADD = $(qemu_LDADDS)
securityselinuxlabeltest_DEPENDENCIES = libsecurityselinuxhelper.la ../src/libvirt.la
endif
endif
628
endif
629
EXTRA_DIST += securityselinuxtest.c securityselinuxlabeltest.c securityselinuxhelper.c
630

631 632 633 634
virbuftest_SOURCES = \
	virbuftest.c testutils.h testutils.c
virbuftest_LDADD = $(LDADDS)

635 636 637
virhashtest_SOURCES = \
	virhashtest.c virhashdata.h testutils.h testutils.c
virhashtest_LDADD = $(LDADDS)
638

639
viratomictest_SOURCES = \
L
Laine Stump 已提交
640
	viratomictest.c testutils.h testutils.c
641 642
viratomictest_LDADD = $(LDADDS)

H
Hu Tao 已提交
643 644 645 646
virbitmaptest_SOURCES = \
	virbitmaptest.c testutils.h testutils.c
virbitmaptest_LDADD = $(LDADDS)

E
Eric Blake 已提交
647 648 649 650
virendiantest_SOURCES = \
	virendiantest.c testutils.h testutils.c
virendiantest_LDADD = $(LDADDS)

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

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

659 660 661 662 663 664
if WITH_DRIVER_MODULES
virdrivermoduletest_SOURCES = \
	virdrivermoduletest.c testutils.h testutils.c
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