backup: Wire up qemu full pull backup commands over QMP
[libvirt/ericb.git] / tests / Makefile.am
blob5da4da8b85d65abc8ee4cc64382baab34b93c4eb
1 ## Process this file with automake to produce Makefile.in
3 ## Copyright (C) 2005-2019 Red Hat, Inc.
4 ##
5 ## This library is free software; you can redistribute it and/or
6 ## modify it under the terms of the GNU Lesser General Public
7 ## License as published by the Free Software Foundation; either
8 ## version 2.1 of the License, or (at your option) any later version.
9 ##
10 ## This library is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 ## Lesser General Public License for more details.
15 ## You should have received a copy of the GNU Lesser General Public
16 ## License along with this library.  If not, see
17 ## <http://www.gnu.org/licenses/>.
19 SHELL = $(PREFERABLY_POSIX_SHELL)
21 AM_CPPFLAGS = \
22         -I$(top_builddir) -I$(top_srcdir) \
23         -I$(top_builddir)/gnulib/lib -I$(top_srcdir)/gnulib/lib \
24         -I$(top_builddir)/include -I$(top_srcdir)/include \
25         -I$(top_builddir)/src -I$(top_srcdir)/src \
26         -I$(top_srcdir)/src/util \
27         -I$(top_srcdir)/src/conf \
28         $(NULL)
30 WARN_CFLAGS += $(RELAXED_FRAME_LIMIT_CFLAGS)
32 AM_CFLAGS = \
33         -Dabs_builddir="\"$(abs_builddir)\"" \
34         -Dabs_top_builddir="\"$(abs_top_builddir)\"" \
35         -Dabs_srcdir="\"$(abs_srcdir)\"" \
36         -Dabs_top_srcdir="\"$(abs_top_srcdir)\"" \
37         $(LIBXML_CFLAGS) \
38         $(LIBNL_CFLAGS) \
39         $(GNUTLS_CFLAGS) \
40         $(SASL_CFLAGS) \
41         $(SELINUX_CFLAGS) \
42         $(APPARMOR_CFLAGS) \
43         $(YAJL_CFLAGS) \
44         $(COVERAGE_CFLAGS) \
45         $(XDR_CFLAGS) \
46         $(WARN_CFLAGS)
48 AM_LDFLAGS = \
49         -export-dynamic
51 MOCKLIBS_LDFLAGS = -module -avoid-version \
52         -rpath /evil/libtool/hack/to/force/shared/lib/creation \
53         $(MINGW_EXTRA_LDFLAGS)
55 DRIVERLIB_LDFLAGS = \
56         -avoid-version \
57         -rpath /evil/libtool/hack/to/force/shared/lib/creation \
58         $(MINGW_EXTRA_LDFLAGS)
60 PROBES_O =
61 if WITH_DTRACE_PROBES
62 PROBES_O += ../src/libvirt_probes.lo
63 endif WITH_DTRACE_PROBES
65 GNULIB_LIBS = \
66        ../gnulib/lib/libgnu.la
68 LDADDS = \
69         $(NO_INDIRECT_LDFLAGS) \
70         $(PROBES_O) \
71         $(GNULIB_LIBS) \
72         ../src/libvirt.la
74 MOCKLIBS_LIBS = \
75         $(GNULIB_LIBS) \
76         ../src/libvirt.la
78 EXTRA_DIST = \
79         .valgrind.supp \
80         bhyvexml2argvdata \
81         bhyveargv2xmldata \
82         bhyvexml2xmloutdata \
83         capabilityschemadata \
84         commanddata \
85         cputestdata \
86         domainbackupxml2xmlin \
87         domainbackupxml2xmlout \
88         domaincapsschemadata \
89         domainconfdata \
90         domainschemadata \
91         fchostdata \
92         genericxml2xmlindata \
93         genericxml2xmloutdata \
94         interfaceschemadata \
95         libxlxml2domconfigdata \
96         lxcconf2xmldata \
97         lxcxml2xmldata \
98         lxcxml2xmloutdata \
99         networkxml2confdata \
100         networkxml2firewalldata \
101         networkxml2xmlin \
102         networkxml2xmlout \
103         networkxml2xmlupdatein \
104         networkxml2xmlupdateout \
105         nodedevschemadata \
106         virhostcpudata \
107         nssdata \
108         nwfilterxml2firewalldata \
109         nwfilterxml2xmlin \
110         nwfilterxml2xmlout \
111         oomtrace.pl \
112         qemuagentdata \
113         qemublocktestdata \
114         qemucapabilitiesdata \
115         qemucaps2xmloutdata \
116         qemudomaincheckpointxml2xmlin \
117         qemudomaincheckpointxml2xmlout \
118         qemudomainsnapshotxml2xmlin \
119         qemudomainsnapshotxml2xmlout \
120         qemuhotplugtestcpus \
121         qemuhotplugtestdevices \
122         qemuhotplugtestdomains \
123         qemumigparamsdata \
124         qemumonitorjsondata \
125         qemuxml2argvdata \
126         qemuxml2xmloutdata \
127         qemustatusxml2xmldata \
128         qemumemlockdata \
129         qemufirmwaredata \
130         secretxml2xmlin \
131         securityselinuxhelperdata \
132         securityselinuxlabeldata \
133         storagepoolcapsschemadata \
134         storagepoolschemadata \
135         storagepoolxml2xmlin \
136         storagepoolxml2xmlout \
137         storagepoolxml2argvdata \
138         storagevolschemadata \
139         storagevolxml2argvdata \
140         storagevolxml2xmlin \
141         storagevolxml2xmlout \
142         sysinfodata \
143         test-lib.sh \
144         vboxsnapshotxmldata \
145         vircaps2xmldata \
146         vircgroupdata \
147         virconfdata \
148         virfiledata \
149         virjsondata \
150         virmacmaptestdata \
151         virmock.h \
152         virmockstathelpers.c \
153         virnetdaemondata \
154         virnetdevtestdata \
155         virnetdevopenvswitchdata \
156         virnetworkportxml2xmldata \
157         virnwfilterbindingxml2xmldata \
158         virpcitestdata \
159         virscsidata \
160         virsh-uriprecedence \
161         virusbtestdata \
162         vmwareverdata \
163         vmx2xmldata \
164         xlconfigdata \
165         xmconfigdata \
166         xml2vmxdata \
167         virstorageutildata \
168         virfilecachedata \
169         virresctrldata \
170         $(NULL)
172 test_helpers = commandhelper ssh
173 test_programs = virshtest sockettest \
174         virhostcputest virbuftest \
175         commandtest seclabeltest \
176         virhashtest virconftest \
177         viratomictest \
178         utiltest shunloadtest \
179         virtimetest viruritest virkeyfiletest \
180         viralloctest \
181         virauthconfigtest \
182         virbitmaptest \
183         vircgrouptest \
184         vircryptotest \
185         virpcitest \
186         virendiantest \
187         virfiletest \
188         virfilecachetest \
189         virfirewalltest \
190         viriscsitest \
191         virkeycodetest \
192         virlockspacetest \
193         virlogtest \
194         virrotatingfiletest \
195         virschematest \
196         virstringtest \
197         virportallocatortest \
198         sysinfotest \
199         virkmodtest \
200         vircapstest \
201         domaincapstest \
202         domainconftest \
203         virhostdevtest \
204         virnetdevtest \
205         virtypedparamtest \
206         vshtabletest \
207         virerrortest \
208         $(NULL)
210 test_libraries = libshunload.la \
211         virportallocatormock.la \
212         virnetdaemonmock.la \
213         virnetserverclientmock.la \
214         vircgroupmock.la \
215         virpcimock.la \
216         virnetdevmock.la \
217         virrandommock.la \
218         virhostcpumock.la \
219         domaincapsmock.la \
220         virfilecachemock.la \
221         $(NULL)
223 if WITH_REMOTE
224 test_programs += \
225         virnetmessagetest \
226         virnetsockettest \
227         virnetdaemontest \
228         virnetserverclienttest \
229         virnettlscontexttest \
230         virnettlssessiontest \
231         $(NULL)
232 endif WITH_REMOTE
234 if WITH_LINUX
235 test_programs += fchosttest
236 test_programs += scsihosttest
237 test_programs += vircaps2xmltest
238 test_programs += virresctrltest
239 test_libraries += virusbmock.la \
240         virnetdevbandwidthmock.la \
241         virnumamock.la \
242         virtestmock.la \
243         virfilemock.la \
244         $(NULL)
245 endif WITH_LINUX
247 if WITH_LIBVIRTD
248 test_programs += fdstreamtest
249 endif WITH_LIBVIRTD
251 if WITH_DBUS
252 test_programs += virdbustest \
253                  virsystemdtest \
254                  $(NULL)
255 test_libraries += virdbusmock.la
256 if WITH_POLKIT
257 test_programs += virpolkittest
258 endif WITH_POLKIT
259 endif WITH_DBUS
261 if WITH_SECDRIVER_SELINUX
262 if WITH_ATTR
263 test_programs += securityselinuxtest \
264                  viridentitytest
265 if WITH_QEMU
266 test_programs += securityselinuxlabeltest
267 endif WITH_QEMU
268 endif WITH_ATTR
269 endif WITH_SECDRIVER_SELINUX
271 # This is a fake SSH we use from virnetsockettest
272 ssh_SOURCES = ssh.c
273 ssh_LDADD = $(COVERAGE_LDFLAGS)
275 if WITH_LIBXL
276 test_programs += xlconfigtest \
277         xmconfigtest libxlxml2domconfigtest
278 test_libraries += libxltestdriver.la libxlmock.la
279 endif WITH_LIBXL
281 if WITH_QEMU
282 test_programs += qemuxml2argvtest qemuxml2xmltest \
283         qemudomaincheckpointxml2xmltest qemudomainsnapshotxml2xmltest \
284         qemumonitorjsontest qemuhotplugtest \
285         qemuagenttest qemucapabilitiestest qemucaps2xmltest \
286         qemumemlocktest \
287         qemucommandutiltest \
288         qemublocktest \
289         qemumigparamstest \
290         qemusecuritytest \
291         qemufirmwaretest \
292         $(NULL)
293 test_helpers += qemucapsprobe
294 test_libraries += libqemumonitortestutils.la \
295                 libqemutestdriver.la \
296                 qemuxml2argvmock.la \
297                 qemucaps2xmlmock.la \
298                 qemucapsprobemock.la \
299                 qemucpumock.la \
300                 $(NULL)
301 endif WITH_QEMU
303 if WITH_LXC
304 test_programs += lxcxml2xmltest lxcconf2xmltest
305 endif WITH_LXC
307 if WITH_OPENVZ
308 test_programs += openvzutilstest
309 endif WITH_OPENVZ
311 if WITH_ESX
312 test_programs += esxutilstest
313 endif WITH_ESX
315 if WITH_VBOX
316 test_programs += vboxsnapshotxmltest
317 endif WITH_VBOX
319 if WITH_VMX
320 test_programs += vmx2xmltest xml2vmxtest
321 endif WITH_VMX
323 if WITH_VMWARE
324 test_programs += vmwarevertest
325 endif WITH_VMWARE
327 if WITH_BHYVE
328 test_programs += bhyvexml2argvtest bhyvexml2xmltest bhyveargv2xmltest
329 test_libraries += bhyvexml2argvmock.la bhyveargv2xmlmock.la
330 endif WITH_BHYVE
332 if WITH_CIL
333 test_programs += objectlocking
334 endif WITH_CIL
336 if WITH_YAJL
337 test_programs += virjsontest
338 endif WITH_YAJL
340 test_programs += \
341                 networkxml2xmlupdatetest \
342                 virnetworkportxml2xmltest \
343                 $(NULL)
345 if WITH_NETWORK
346 test_programs += \
347                 networkxml2xmltest \
348                 networkxml2conftest \
349                 networkxml2firewalltest \
350                 $(NULL)
351 endif WITH_NETWORK
353 if WITH_STORAGE_SHEEPDOG
354 test_programs += storagebackendsheepdogtest
355 endif WITH_STORAGE_SHEEPDOG
357 test_programs += nwfilterxml2xmltest
358 test_programs += virnwfilterbindingxml2xmltest
360 if WITH_NWFILTER
361 test_programs += nwfilterebiptablestest
362 test_programs += nwfilterxml2firewalltest
363 endif WITH_NWFILTER
365 if WITH_STORAGE
366 test_programs += storagevolxml2argvtest
367 test_programs += storagepoolxml2argvtest
368 test_programs += virstorageutiltest
369 test_programs += storagepoolxml2xmltest
370 test_programs += storagepoolcapstest
371 endif WITH_STORAGE
373 if WITH_STORAGE_FS
374 test_programs += virstoragetest
375 endif WITH_STORAGE_FS
377 if WITH_LINUX
378 test_programs += virscsitest
379 endif WITH_LINUX
381 if WITH_NSS
382 test_helpers += nsslinktest nssguestlinktest
383 test_programs += nsstest nssguesttest
384 test_libraries += nssmock.la
385 endif WITH_NSS
387 test_programs += storagevolxml2xmltest
389 test_programs += nodedevxml2xmltest
391 test_programs += interfacexml2xmltest
393 test_programs += cputest
395 test_programs += metadatatest
397 test_programs += secretxml2xmltest
399 test_programs += genericxml2xmltest
401 if WITH_LINUX
402 test_programs += virusbtest \
403         virnetdevbandwidthtest \
404         $(NULL)
405 endif WITH_LINUX
407 test_scripts =
408 libvirtd_test_scripts = \
409         libvirtd-fail \
410         libvirtd-pool \
411         virsh-cpuset \
412         virsh-define-dev-segfault \
413         virsh-int-overflow \
414         virsh-optparse \
415         virsh-read-bufsiz \
416         virsh-read-non-seekable \
417         virsh-schedinfo \
418         virsh-self-test \
419         virt-admin-self-test \
420         virsh-checkpoint \
421         virsh-snapshot \
422         virsh-start \
423         virsh-undefine \
424         virsh-uriprecedence \
425         virsh-vcpupin \
426         $(NULL)
428 if WITH_LIBVIRTD
429 test_scripts += $(libvirtd_test_scripts)
431 test_programs += \
432         eventtest \
433         virdrivermoduletest
434 else ! WITH_LIBVIRTD
435 EXTRA_DIST += $(libvirtd_test_scripts)
436 endif ! WITH_LIBVIRTD
438 test_programs += objecteventtest
440 if WITH_SECDRIVER_APPARMOR
441 if WITH_LIBVIRTD
442 test_scripts += virt-aa-helper-test
443 endif WITH_LIBVIRTD
444 endif WITH_SECDRIVER_APPARMOR
445 EXTRA_DIST += virt-aa-helper-test
447 EXTRA_DIST += $(test_scripts)
449 if WITH_LINUX
450 check-access: file-access-clean
451         VIR_TEST_FILE_ACCESS=1 $(MAKE) $(AM_MAKEFLAGS) check
452         $(PERL) check-file-access.pl | sort -u
454 file-access-clean:
455         > test_file_access.txt
456 endif WITH_LINUX
458 EXTRA_DIST += \
459         check-file-access.pl \
460         file_access_whitelist.txt
462 if WITH_TESTS
463 noinst_PROGRAMS = $(test_programs) $(test_helpers)
464 noinst_LTLIBRARIES = $(test_libraries)
465 else ! WITH_TESTS
466 check_PROGRAMS = $(test_programs) $(test_helpers)
467 check_LTLIBRARIES = $(test_libraries)
468 endif ! WITH_TESTS
470 TESTS = $(test_programs) \
471         $(test_scripts)
473 VIR_TEST_EXPENSIVE ?= $(VIR_TEST_EXPENSIVE_DEFAULT)
474 TESTS_ENVIRONMENT = \
475   abs_top_builddir="$(abs_top_builddir)" \
476   abs_top_srcdir="$(abs_top_srcdir)" \
477   abs_builddir="$(abs_builddir)" \
478   abs_srcdir="$(abs_srcdir)" \
479   SHELL="$(SHELL)" \
480   LIBVIRT_AUTOSTART=0 \
481   LC_ALL=C \
482   VIR_TEST_EXPENSIVE=$(VIR_TEST_EXPENSIVE) \
483   $(VG)
486 VALGRIND = valgrind --quiet --leak-check=full --trace-children=yes \
487         --trace-children-skip="*/tools/virsh","*/tests/commandhelper" \
488         --suppressions=$(abs_srcdir)/.valgrind.supp
489 valgrind:
490         $(MAKE) check VG="$(LIBTOOL) --mode=execute $(VALGRIND)"
492 sockettest_SOURCES = \
493         sockettest.c \
494         testutils.c testutils.h
495 sockettest_LDADD = $(LDADDS)
497 if WITH_LIBXL
498 libxl_LDADDS = ../src/libvirt_driver_libxl_impl.la
499 if WITH_NETWORK
500 libxl_LDADDS += ../src/libvirt_driver_network_impl.la
501 endif WITH_NETWORK
502 libxl_LDADDS += $(LDADDS)
504 libxltestdriver_la_SOURCES =
505 libxltestdriver_la_LDFLAGS = $(DRIVERLIB_LDFLAGS)
506 libxltestdriver_la_LIBADD = $(libxl_LDADDS)
508 xlconfigtest_SOURCES = \
509         xlconfigtest.c testutilsxen.c testutilsxen.h \
510         testutils.c testutils.h
511 xlconfigtest_LDADD =$(libxl_LDADDS)
513 xmconfigtest_SOURCES = \
514         xmconfigtest.c testutilsxen.c testutilsxen.h \
515         testutils.c testutils.h
516 xmconfigtest_LDADD = $(libxl_LDADDS)
518 libxlxml2domconfigtest_SOURCES = \
519         libxlxml2domconfigtest.c testutilsxen.c testutilsxen.h \
520         testutils.c testutils.h
521 libxlxml2domconfigtest_LDADD = $(libxl_LDADDS) $(LIBXML_LIBS)
523 libxlmock_la_SOURCES = \
524         libxlmock.c
525 libxlmock_la_CFLAGS = $(LIBXL_CFLAGS) $(LIBXML_CFLAGS)
526 libxlmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
527 libxlmock_la_LIBADD = $(MOCKLIBS_LIBS)
529 else ! WITH_LIBXL
530 EXTRA_DIST += xlconfigtest.c \
531         xmconfigtest.c libxlxml2domconfigtest.c
532 endif ! WITH_LIBXL
534 QEMUMONITORTESTUTILS_SOURCES = \
535         qemumonitortestutils.c \
536         qemumonitortestutils.h \
537         testutilsqemuschema.h testutilsqemuschema.c \
538         $(NULL)
540 if WITH_QEMU
542 libqemumonitortestutils_la_SOURCES = $(QEMUMONITORTESTUTILS_SOURCES)
544 qemu_LDADDS = ../src/libvirt_driver_qemu_impl.la
545 if WITH_NETWORK
546 qemu_LDADDS += ../src/libvirt_driver_network_impl.la
547 endif WITH_NETWORK
548 if WITH_STORAGE
549 qemu_LDADDS += ../src/libvirt_driver_storage_impl.la
550 endif WITH_STORAGE
551 if WITH_DTRACE_PROBES
552 qemu_LDADDS += ../src/libvirt_qemu_probes.lo
553 endif WITH_DTRACE_PROBES
554 qemu_LDADDS += $(LDADDS)
556 libqemutestdriver_la_SOURCES =
557 libqemutestdriver_la_LDFLAGS = $(DRIVERLIB_LDFLAGS)
558 libqemutestdriver_la_LIBADD = $(qemu_LDADDS)
560 qemucpumock_la_SOURCES = \
561         qemucpumock.c testutilshostcpus.h
562 qemucpumock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
563 qemucpumock_la_LIBADD = $(MOCKLIBS_LIBS)
565 qemuxml2argvtest_SOURCES = \
566         qemuxml2argvtest.c testutilsqemu.c testutilsqemu.h \
567         testutils.c testutils.h \
568         virfilewrapper.c virfilewrapper.h \
569         $(NULL)
570 qemuxml2argvtest_LDADD = libqemutestdriver.la \
571         $(LDADDS) $(LIBXML_LIBS)
573 qemuxml2argvmock_la_SOURCES = \
574         qemuxml2argvmock.c
575 qemuxml2argvmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
576 qemuxml2argvmock_la_LIBADD = $(MOCKLIBS_LIBS)
578 qemuxml2xmltest_SOURCES = \
579         qemuxml2xmltest.c testutilsqemu.c testutilsqemu.h \
580         testutils.c testutils.h \
581         virfilewrapper.c virfilewrapper.h
582 qemuxml2xmltest_LDADD = $(qemu_LDADDS)
584 qemumonitorjsontest_SOURCES = \
585         qemumonitorjsontest.c \
586         testutils.c testutils.h \
587         testutilsqemu.c testutilsqemu.h \
588         $(NULL)
589 qemumonitorjsontest_LDADD = libqemumonitortestutils.la \
590         $(qemu_LDADDS)
592 qemucapabilitiestest_SOURCES = \
593         qemucapabilitiestest.c \
594         testutils.c testutils.h \
595         testutilsqemu.c testutilsqemu.h \
596         $(NULL)
597 qemucapabilitiestest_LDADD = libqemumonitortestutils.la \
598         $(qemu_LDADDS)
600 qemucapsprobe_SOURCES = \
601         qemucapsprobe.c
602 qemucapsprobe_LDADD = \
603         libqemutestdriver.la $(LDADDS)
605 qemucapsprobemock_la_SOURCES = \
606         qemucapsprobemock.c
607 qemucapsprobemock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
608 qemucapsprobemock_la_LIBADD = $(MOCKLIBS_LIBS)
610 qemucommandutiltest_SOURCES = \
611         qemucommandutiltest.c \
612         testutils.c testutils.h \
613         testutilsqemu.c testutilsqemu.h \
614         $(NULL)
615 qemucommandutiltest_LDADD = libqemumonitortestutils.la \
616         $(qemu_LDADDS)
618 qemucaps2xmltest_SOURCES = \
619         qemucaps2xmltest.c \
620         testutils.c testutils.h \
621         testutilsqemu.c testutilsqemu.h \
622         $(NULL)
623 qemucaps2xmltest_LDADD = $(qemu_LDADDS)
625 qemucaps2xmlmock_la_SOURCES = \
626         qemucaps2xmlmock.c
627 qemucaps2xmlmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
628 qemucaps2xmlmock_la_LIBADD = $(MOCKLIBS_LIBS)
630 qemuagenttest_SOURCES = \
631         qemuagenttest.c \
632         testutils.c testutils.h \
633         testutilsqemu.c testutilsqemu.h \
634         $(NULL)
635 qemuagenttest_LDADD = libqemumonitortestutils.la $(qemu_LDADDS)
637 qemuhotplugtest_SOURCES = \
638         qemuhotplugtest.c \
639         testutils.c testutils.h \
640         testutilsqemu.c testutilsqemu.h \
641         $(NULL)
642 qemuhotplugtest_LDADD = libqemumonitortestutils.la $(qemu_LDADDS)
644 qemublocktest_SOURCES = \
645         qemublocktest.c \
646         testutils.h testutils.c \
647         testutilsqemu.h testutilsqemu.c \
648         $(NULL)
649 qemublocktest_LDADD = \
650         libqemumonitortestutils.la \
651         ../src/libvirt_conf.la \
652         ../src/libvirt_util.la \
653         $(qemu_LDADDS) \
654         $(NULL)
656 qemudomaincheckpointxml2xmltest_SOURCES = \
657         qemudomaincheckpointxml2xmltest.c testutilsqemu.c testutilsqemu.h \
658         testutils.c testutils.h
659 qemudomaincheckpointxml2xmltest_LDADD = $(qemu_LDADDS)
661 qemudomainsnapshotxml2xmltest_SOURCES = \
662         qemudomainsnapshotxml2xmltest.c testutilsqemu.c testutilsqemu.h \
663         testutils.c testutils.h
664 qemudomainsnapshotxml2xmltest_LDADD = $(qemu_LDADDS)
666 qemumemlocktest_SOURCES = \
667         qemumemlocktest.c \
668         testutilsqemu.c testutilsqemu.h \
669         testutils.c testutils.h
670 qemumemlocktest_LDADD = $(qemu_LDADDS)
672 qemumigparamstest_SOURCES = \
673         qemumigparamstest.c \
674         testutils.c testutils.h \
675         testutilsqemu.c testutilsqemu.h \
676         $(NULL)
677 qemumigparamstest_LDADD = libqemumonitortestutils.la \
678         $(qemu_LDADDS)
680 qemusecuritytest_SOURCES = \
681         qemusecuritytest.c qemusecuritytest.h \
682         qemusecuritymock.c \
683         testutils.h testutils.c \
684         testutilsqemu.h testutilsqemu.c
685 qemusecuritytest_LDADD = $(qemu_LDADDS)
687 qemufirmwaretest_SOURCES = \
688         qemufirmwaretest.c \
689         testutils.h testutils.c \
690         virfilewrapper.c virfilewrapper.h \
691         $(NULL)
692 qemufirmwaretest_LDADD = $(qemu_LDADDS)
694 else ! WITH_QEMU
695 EXTRA_DIST += qemuxml2argvtest.c qemuxml2xmltest.c \
696         qemudomaincheckpointxml2xmltest.c qemudomainsnapshotxml2xmltest.c \
697         testutilsqemu.c testutilsqemu.h \
698         testutilsqemuschema.c testutilsqemuschema.h \
699         qemumonitorjsontest.c qemuhotplugtest.c \
700         qemuagenttest.c qemucapabilitiestest.c \
701         qemucaps2xmltest.c qemucommandutiltest.c \
702         qemumemlocktest.c qemucpumock.c testutilshostcpus.h \
703         qemublocktest.c \
704         qemumigparamstest.c \
705         qemusecuritytest.c qemusecuritytest.h \
706         qemusecuritymock.c \
707         qemufirmwaretest.c \
708         $(QEMUMONITORTESTUTILS_SOURCES)
709 endif ! WITH_QEMU
711 if WITH_LXC
713 lxc_LDADDS = ../src/libvirt_driver_lxc_impl.la
714 if WITH_NETWORK
715 lxc_LDADDS += ../src/libvirt_driver_network_impl.la
716 endif WITH_NETWORK
717 lxc_LDADDS += $(LDADDS)
719 lxcxml2xmltest_SOURCES = \
720         lxcxml2xmltest.c testutilslxc.c testutilslxc.h \
721         testutils.c testutils.h
722 lxcxml2xmltest_LDADD = $(lxc_LDADDS)
724 lxcconf2xmltest_SOURCES = \
725         lxcconf2xmltest.c testutilslxc.c testutilslxc.h \
726         testutils.c testutils.h
727 lxcconf2xmltest_LDADD = $(lxc_LDADDS)
728 else ! WITH_LXC
729 EXTRA_DIST += lxcxml2xmltest.c testutilslxc.c testutilslxc.h
730 endif ! WITH_LXC
732 if WITH_OPENVZ
733 openvzutilstest_SOURCES = \
734         openvzutilstest.c \
735         testutils.c testutils.h
736 openvzutilstest_LDADD = $(LDADDS)
737 else ! WITH_OPENVZ
738 EXTRA_DIST += openvzutilstest.c
739 endif ! WITH_OPENVZ
740 EXTRA_DIST += openvzutilstest.conf
742 if WITH_ESX
743 esxutilstest_SOURCES = \
744         esxutilstest.c \
745         testutils.c testutils.h
746 esxutilstest_LDADD = $(LDADDS)
747 else ! WITH_ESX
748 EXTRA_DIST += esxutilstest.c
749 endif ! WITH_ESX
751 if WITH_VBOX
752 vboxsnapshotxmltest_SOURCES = \
753         vboxsnapshotxmltest.c \
754         testutils.c testutils.h
755 vbox_LDADDS = ../src/libvirt_driver_vbox_impl.la
756 vboxsnapshotxmltest_LDADD = $(LDADDS) $(vbox_LDADDS)
757 else ! WITH_VBOX
758 EXTRA_DIST += vboxsnapshotxmltest.c
759 endif ! WITH_VBOX
761 if WITH_VMX
762 vmx2xmltest_SOURCES = \
763         vmx2xmltest.c \
764         testutils.c testutils.h
765 vmx2xmltest_LDADD = $(LDADDS)
767 xml2vmxtest_SOURCES = \
768         xml2vmxtest.c \
769         testutils.c testutils.h
770 xml2vmxtest_LDADD = $(LDADDS)
771 else ! WITH_VMX
772 EXTRA_DIST += vmx2xmltest.c xml2vmxtest.c
773 endif ! WITH_VMX
775 if WITH_VMWARE
776 vmwarevertest_SOURCES = \
777     vmwarevertest.c \
778     testutils.c testutils.h
779 vmwarevertest_LDADD = $(LDADDS)
780 else ! WITH_VMWARE
781 EXTRA_DIST += vmwarevertest.c
782 endif ! WITH_VMWARE
784 if WITH_BHYVE
785 bhyvexml2argvmock_la_SOURCES = \
786         bhyvexml2argvmock.c
787 bhyvexml2argvmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
788 bhyvexml2argvmock_la_LIBADD = $(MOCKLIBS_LIBS)
790 bhyveargv2xmlmock_la_SOURCES = \
791         bhyveargv2xmlmock.c
792 bhyveargv2xmlmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
793 bhyveargv2xmlmock_la_LIBADD = $(MOCKLIBS_LIBS)
795 bhyve_LDADDS = ../src/libvirt_driver_bhyve_impl.la
796 if WITH_STORAGE
797 bhyve_LDADDS += ../src/libvirt_driver_storage_impl.la
798 endif WITH_STORAGE
799 bhyve_LDADDS += $(LDADDS)
800 bhyvexml2argvtest_SOURCES = \
801         bhyvexml2argvtest.c \
802         testutils.c testutils.h
803 bhyvexml2argvtest_LDADD = $(bhyve_LDADDS)
805 bhyvexml2xmltest_SOURCES = \
806         bhyvexml2xmltest.c \
807         testutils.c testutils.h
808 bhyvexml2xmltest_LDADD = $(bhyve_LDADDS)
810 bhyveargv2xmltest_SOURCES = \
811         bhyveargv2xmltest.c \
812         testutils.c testutils.h
813 bhyveargv2xmltest_LDADD = $(bhyve_LDADDS)
814 else ! WITH_BHYVE
815 EXTRA_DIST += \
816         bhyvexml2argvtest.c \
817         bhyveargv2xmltest.c \
818         bhyvexml2xmltest.c \
819         bhyvexml2argvmock.c \
820         bhyveargv2xmlmock.c
821 endif ! WITH_BHYVE
823 networkxml2xmlupdatetest_SOURCES = \
824         networkxml2xmlupdatetest.c \
825         testutils.c testutils.h
826 networkxml2xmlupdatetest_LDADD = $(LDADDS)
828 virnetworkportxml2xmltest_SOURCES = \
829         virnetworkportxml2xmltest.c \
830         testutils.c testutils.h
831 virnetworkportxml2xmltest_LDADD = $(LDADDS)
833 if WITH_NETWORK
834 networkxml2xmltest_SOURCES = \
835         networkxml2xmltest.c \
836         testutils.c testutils.h
837 networkxml2xmltest_LDADD = ../src/libvirt_driver_network_impl.la $(LDADDS)
839 networkxml2conftest_SOURCES = \
840         networkxml2conftest.c \
841         testutils.c testutils.h
842 networkxml2conftest_LDADD = ../src/libvirt_driver_network_impl.la $(LDADDS)
844 networkxml2firewalltest_SOURCES = \
845         networkxml2firewalltest.c \
846         testutils.c testutils.h
847 networkxml2firewalltest_LDADD = ../src/libvirt_driver_network_impl.la $(LDADDS)
849 else ! WITH_NETWORK
850 EXTRA_DIST += networkxml2xmltest.c networkxml2conftest.c
851 endif ! WITH_NETWORK
853 if WITH_STORAGE_SHEEPDOG
854 storagebackendsheepdogtest_SOURCES = \
855         storagebackendsheepdogtest.c \
856         testutils.c testutils.h
857 storagebackendsheepdogtest_LDADD = \
858         ../src/libvirt_storage_backend_sheepdog_priv.la \
859         ../src/libvirt_driver_storage_impl.la \
860         $(LDADDS)
861 else ! WITH_STORAGE_SHEEPDOG
862 EXTRA_DIST += storagebackendsheepdogtest.c
863 endif ! WITH_STORAGE_SHEEPDOG
865 nwfilterxml2xmltest_SOURCES = \
866         nwfilterxml2xmltest.c \
867         testutils.c testutils.h
868 nwfilterxml2xmltest_LDADD = $(LDADDS)
870 virnwfilterbindingxml2xmltest_SOURCES = \
871         virnwfilterbindingxml2xmltest.c \
872         testutils.c testutils.h
873 virnwfilterbindingxml2xmltest_LDADD = $(LDADDS)
875 if WITH_NWFILTER
876 nwfilterebiptablestest_SOURCES = \
877         nwfilterebiptablestest.c \
878         testutils.c testutils.h
879 nwfilterebiptablestest_LDADD = ../src/libvirt_driver_nwfilter_impl.la $(LDADDS)
881 nwfilterxml2firewalltest_SOURCES = \
882         nwfilterxml2firewalltest.c \
883         testutils.c testutils.h
884 nwfilterxml2firewalltest_LDADD = \
885         ../src/libvirt_driver_nwfilter_impl.la $(LDADDS)
886 endif WITH_NWFILTER
888 secretxml2xmltest_SOURCES = \
889         secretxml2xmltest.c \
890         testutils.c testutils.h
891 secretxml2xmltest_LDADD = $(LDADDS)
893 genericxml2xmltest_SOURCES = \
894         genericxml2xmltest.c \
895         testutils.c testutils.h
896 genericxml2xmltest_LDADD = $(LDADDS)
899 if WITH_STORAGE
900 virstorageutiltest_SOURCES = \
901         virstorageutiltest.c \
902         testutils.c \
903         testutils.h \
904         $(NULL)
905 virstorageutiltest_LDADD = \
906         ../src/libvirt_driver_storage_impl.la \
907         $(LDADDS) \
908         $(NULL)
910 storagevolxml2argvtest_SOURCES = \
911     storagevolxml2argvtest.c \
912     testutils.c testutils.h
913 storagevolxml2argvtest_LDADD = \
914         $(LIBXML_LIBS) \
915         ../src/libvirt_driver_storage_impl.la \
916         ../src/libvirt_conf.la \
917         ../src/libvirt_util.la \
918         $(LDADDS)
920 storagepoolxml2argvtest_SOURCES = \
921     storagepoolxml2argvtest.c \
922     testutils.c testutils.h
923 storagepoolxml2argvtest_LDADD = \
924         $(LIBXML_LIBS) \
925         ../src/libvirt_driver_storage_impl.la \
926         ../src/libvirt_conf.la \
927         ../src/libvirt_util.la \
928         $(LDADDS)
930 storagepoolxml2xmltest_SOURCES = \
931         storagepoolxml2xmltest.c \
932         testutils.c testutils.h
933 storagepoolxml2xmltest_LDADD = $(LDADDS) \
934         ../src/libvirt_driver_storage_impl.la \
935         $(GNULIB_LIBS)
937 storagepoolcapstest_SOURCES = \
938         storagepoolcapstest.c testutils.h testutils.c
939 storagepoolcapstest_LDADD = $(LDADDS)
941 else ! WITH_STORAGE
942 EXTRA_DIST += storagevolxml2argvtest.c
943 EXTRA_DIST += virstorageutiltest.c
944 EXTRA_DIST += storagepoolxml2argvtest.c
945 EXTRA_DIST += storagepoolxml2xmltest.c
946 EXTRA_DIST += storagepoolcapstest.c
947 endif ! WITH_STORAGE
949 storagevolxml2xmltest_SOURCES = \
950         storagevolxml2xmltest.c \
951         testutils.c testutils.h
952 storagevolxml2xmltest_LDADD = $(LDADDS)
954 nodedevxml2xmltest_SOURCES = \
955         nodedevxml2xmltest.c \
956         testutils.c testutils.h
957 nodedevxml2xmltest_LDADD = $(LDADDS)
959 interfacexml2xmltest_SOURCES = \
960         interfacexml2xmltest.c \
961         testutils.c testutils.h
962 interfacexml2xmltest_LDADD = $(LDADDS)
964 cputest_SOURCES = \
965         cputest.c \
966         testutils.c testutils.h
967 cputest_LDADD = $(LIBXML_LIBS)
968 if WITH_QEMU
969 cputest_SOURCES += testutilsqemu.c testutilsqemu.h
970 cputest_LDADD += libqemumonitortestutils.la $(qemu_LDADDS)
971 else ! WITH_QEMU
972 cputest_LDADD += $(LDADDS)
973 endif ! WITH_QEMU
975 metadatatest_SOURCES = \
976         metadatatest.c \
977         testutils.c testutils.h
978 metadatatest_LDADD = $(LDADDS) $(LIBXML_LIBS)
980 virerrortest_SOURCES = \
981         virerrortest.c \
982         testutils.c testutils.h
983 virerrortest_LDADD = $(LDADDS)
985 vshtabletest_SOURCES = \
986         vshtabletest.c \
987         testutils.c testutils.h
988 vshtabletest_LDADD = \
989         $(LDADDS) \
990         ../tools/libvirt_shell.la
992 virshtest_SOURCES = \
993         virshtest.c \
994         testutils.c testutils.h
995 virshtest_LDADD = $(LDADDS)
997 virconftest_SOURCES = \
998         virconftest.c testutils.h testutils.c
999 virconftest_LDADD = $(LDADDS)
1001 virhostcputest_SOURCES = \
1002         virhostcputest.c testutils.h testutils.c virfilewrapper.h virfilewrapper.c
1003 virhostcputest_LDADD = $(LDADDS)
1005 commandtest_SOURCES = \
1006         commandtest.c testutils.h testutils.c
1007 commandtest_LDADD = $(LDADDS)
1009 # Must not link to any libvirt modules - libc / gnulib only
1010 # otherwise external libraries might unexpectedly leak
1011 # file descriptors into commandhelper invalidating the
1012 # test logic assumptions
1013 commandhelper_SOURCES = \
1014         commandhelper.c
1015 commandhelper_LDADD = \
1016         $(NO_INDIRECT_LDFLAGS) \
1017         $(GNULIB_LIBS)
1019 commandhelper_LDFLAGS = -static
1022 virkmodtest_SOURCES = \
1023         virkmodtest.c testutils.h testutils.c
1024 virkmodtest_LDADD = $(LDADDS)
1026 vircapstest_SOURCES = \
1027         vircapstest.c testutils.h testutils.c
1028 if WITH_LXC
1029 vircapstest_SOURCES += testutilslxc.c testutilslxc.h
1030 endif WITH_LXC
1031 if WITH_QEMU
1032 vircapstest_SOURCES += testutilsqemu.c testutilsqemu.h
1033 endif WITH_QEMU
1034 if WITH_QEMU
1035 vircapstest_LDADD = $(qemu_LDADDS)
1036 else ! WITH_QEMU
1037 vircapstest_LDADD = $(LDADDS)
1038 endif ! WITH_QEMU
1040 domaincapsmock_la_SOURCES = domaincapsmock.c
1041 domaincapsmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1042 domaincapsmock_la_LIBADD = $(MOCKLIBS_LIBS)
1044 domaincapstest_SOURCES = \
1045         domaincapstest.c testutils.h testutils.c \
1046         virfilewrapper.c virfilewrapper.h \
1047         $(NULL)
1048 domaincapstest_LDADD = $(LDADDS)
1050 if WITH_QEMU
1051 domaincapstest_SOURCES += testutilsqemu.c testutilsqemu.h
1052 domaincapstest_LDADD += libqemutestdriver.la $(GNULIB_LIBS)
1053 endif WITH_QEMU
1055 if WITH_LIBXL
1056 domaincapstest_SOURCES += testutilsxen.c testutilsxen.h
1057 domaincapstest_LDADD += libxltestdriver.la $(GNULIB_LIBS)
1058 endif WITH_LIBXL
1060 if WITH_BHYVE
1061 domaincapstest_LDADD += ../src/libvirt_driver_bhyve_impl.la $(GNULIB_LIBS)
1062 endif WITH_BHYVE
1064 virnetmessagetest_SOURCES = \
1065         virnetmessagetest.c testutils.h testutils.c
1066 virnetmessagetest_LDADD = $(LDADDS)
1068 virnetsockettest_SOURCES = \
1069         virnetsockettest.c testutils.h testutils.c
1070 virnetsockettest_LDADD = $(LDADDS)
1072 virnetdaemontest_SOURCES = \
1073         virnetdaemontest.c \
1074         testutils.h testutils.c
1075 virnetdaemontest_LDADD = $(LDADDS)
1077 virnetdaemonmock_la_SOURCES = \
1078         virnetdaemonmock.c
1079 virnetdaemonmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1080 virnetdaemonmock_la_LIBADD = $(MOCKLIBS_LIBS)
1082 virnetserverclienttest_SOURCES = \
1083         virnetserverclienttest.c \
1084         testutils.h testutils.c
1085 virnetserverclienttest_LDADD = $(LDADDS)
1087 virnetserverclientmock_la_SOURCES = \
1088         virnetserverclientmock.c
1089 virnetserverclientmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1090 virnetserverclientmock_la_LIBADD = $(MOCKLIBS_LIBS)
1092 virnettlscontexttest_SOURCES = \
1093         virnettlscontexttest.c \
1094         virnettlshelpers.h virnettlshelpers.c \
1095         testutils.h testutils.c
1096 virnettlscontexttest_LDADD = $(LDADDS) $(GNUTLS_LIBS)
1097 virnettlssessiontest_SOURCES = \
1098         virnettlssessiontest.c \
1099         virnettlshelpers.h virnettlshelpers.c \
1100         testutils.h testutils.c
1101 virnettlssessiontest_LDADD = $(LDADDS) $(GNUTLS_LIBS)
1102 if HAVE_LIBTASN1
1103 virnettlscontexttest_SOURCES += pkix_asn1_tab.c
1104 virnettlscontexttest_LDADD += -ltasn1
1105 virnettlssessiontest_SOURCES += pkix_asn1_tab.c
1106 virnettlssessiontest_LDADD += -ltasn1
1107 else ! HAVE_LIBTASN1
1108 EXTRA_DIST += pkix_asn1_tab.c
1109 endif ! HAVE_LIBTASN1
1111 virtimetest_SOURCES = \
1112         virtimetest.c testutils.h testutils.c
1113 virtimetest_LDADD = $(LDADDS)
1115 virschematest_SOURCES = \
1116         virschematest.c testutils.h testutils.c
1117 virschematest_LDADD = $(LDADDS) $(LIBXML_LIBS)
1119 virstringtest_SOURCES = \
1120         virstringtest.c testutils.h testutils.c
1121 virstringtest_LDADD = $(LDADDS)
1123 virstoragetest_SOURCES = \
1124         virstoragetest.c testutils.h testutils.c
1125 virstoragetest_LDADD = $(LDADDS) \
1126         ../src/libvirt.la \
1127         ../src/libvirt_conf.la \
1128         ../src/libvirt_util.la \
1129         ../src/libvirt_driver_storage_impl.la \
1130         ../gnulib/lib/libgnu.la \
1131         $(NULL)
1133 viridentitytest_SOURCES = \
1134         viridentitytest.c testutils.h testutils.c
1135 viridentitytest_LDADD = $(LDADDS)
1136 if WITH_SELINUX
1137 viridentitytest_LDADD += $(SELINUX_LIBS)
1138 viridentitytest_DEPENDENCIES = libsecurityselinuxhelper.la \
1139         ../src/libvirt.la
1140 endif WITH_SELINUX
1142 viriscsitest_SOURCES = \
1143         viriscsitest.c testutils.h testutils.c
1144 viriscsitest_LDADD = $(LDADDS)
1146 virkeycodetest_SOURCES = \
1147         virkeycodetest.c testutils.h testutils.c
1148 virkeycodetest_LDADD = $(LDADDS)
1150 virlockspacetest_SOURCES = \
1151         virlockspacetest.c testutils.h testutils.c
1152 virlockspacetest_LDADD = $(LDADDS)
1154 virlogtest_SOURCES = \
1155         virlogtest.c testutils.h testutils.c
1156 virlogtest_LDADD = $(LDADDS)
1158 virportallocatortest_SOURCES = \
1159         virportallocatortest.c testutils.h testutils.c
1160 virportallocatortest_LDADD = $(LDADDS)
1162 virportallocatormock_la_SOURCES = \
1163         virportallocatormock.c
1164 virportallocatormock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1165 virportallocatormock_la_LIBADD = $(MOCKLIBS_LIBS)
1167 vircgrouptest_SOURCES = \
1168         vircgrouptest.c testutils.h testutils.c
1169 vircgrouptest_LDADD = $(LDADDS)
1171 vircgroupmock_la_SOURCES = \
1172         vircgroupmock.c
1173 vircgroupmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1174 vircgroupmock_la_LIBADD = $(MOCKLIBS_LIBS)
1176 vircryptotest_SOURCES = \
1177         vircryptotest.c testutils.h testutils.c
1178 vircryptotest_LDADD = $(LDADDS)
1180 virhostdevtest_SOURCES = \
1181         virhostdevtest.c testutils.h testutils.c
1182 virhostdevtest_LDADD = $(LDADDS)
1184 virpcitest_SOURCES = \
1185         virpcitest.c testutils.h testutils.c
1186 virpcitest_LDADD = $(LDADDS)
1188 virpcimock_la_SOURCES = \
1189         virpcimock.c
1190 virpcimock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1191 virpcimock_la_LIBADD = $(MOCKLIBS_LIBS)
1193 virrandommock_la_SOURCES = \
1194         virrandommock.c
1195 virrandommock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1196 virrandommock_la_LIBADD = $(MOCKLIBS_LIBS)
1198 virhostcpumock_la_SOURCES = \
1199         virhostcpumock.c
1200 virhostcpumock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1201 virhostcpumock_la_LIBADD = $(MOCKLIBS_LIBS)
1203 virfilecachemock_la_SOURCES = \
1204         virfilecachemock.c
1205 virfilecachemock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1206 virfilecachemock_la_LIBADD = $(MOCKLIBS_LIBS)
1208 if WITH_LINUX
1209 vircaps2xmltest_SOURCES = \
1210         vircaps2xmltest.c testutils.h testutils.c virfilewrapper.h virfilewrapper.c
1211 vircaps2xmltest_LDADD = $(LDADDS)
1213 virnumamock_la_SOURCES = \
1214         virnumamock.c
1215 virnumamock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1216 virnumamock_la_LIBADD = $(MOCKLIBS_LIBS)
1218 virresctrltest_SOURCES = \
1219         virresctrltest.c testutils.h testutils.c virfilewrapper.h virfilewrapper.c
1220 virresctrltest_LDADD = $(LDADDS)
1222 virfilemock_la_SOURCES = \
1223         virfilemock.c
1224 virfilemock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1225 virfilemock_la_LIBADD = $(MOCKLIBS_LIBS)
1226 else ! WITH_LINUX
1227 EXTRA_DIST += vircaps2xmltest.c virnumamock.c virfilewrapper.c \
1228                           virfilewrapper.h virresctrltest.c virfilemock.c
1229 endif ! WITH_LINUX
1231 if WITH_NSS
1232 nsstest_SOURCES = \
1233         nsstest.c testutils.h testutils.c
1234 nsstest_CFLAGS = \
1235         $(AM_CFLAGS) \
1236         -I$(top_srcdir)/tools/nss
1237 nsstest_LDADD = \
1238         $(LDADDS) \
1239         ../tools/nss/libnss_libvirt_impl.la
1241 nssguesttest_SOURCES = \
1242         nsstest.c testutils.h testutils.c
1243 nssguesttest_CFLAGS = \
1244         -DLIBVIRT_NSS_GUEST \
1245         $(AM_CFLAGS) \
1246         -I$(top_srcdir)/tools/nss
1247 nssguesttest_LDADD = \
1248         $(LDADDS) \
1249         ../tools/nss/libnss_libvirt_guest_impl.la
1251 nssmock_la_SOURCES = \
1252         nssmock.c
1253 nssmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1254 nssmock_la_LIBADD = $(MOCKLIBS_LIBS)
1256 ## Intentionaly not linking with anything else.
1257 ## See the test source for more detailed explanation.
1258 nsslinktest_SOURCES = nsslinktest.c
1259 nsslinktest_CFLAGS = \
1260         $(AM_CFLAGS) \
1261         -I$(top_srcdir)/tools/nss
1262 nsslinktest_LDADD = ../tools/nss/libnss_libvirt_impl.la
1263 nsslinktest_LDFLAGS = $(NULL)
1265 nssguestlinktest_SOURCES = nsslinktest.c
1266 nssguestlinktest_CFLAGS = \
1267         -DLIBVIRT_NSS_GUEST \
1268         $(AM_CFLAGS) \
1269         -I$(top_srcdir)/tools/nss
1270 nssguestlinktest_LDADD = ../tools/nss/libnss_libvirt_guest_impl.la
1271 nssguestlinktest_LDFLAGS = $(NULL)
1272 else ! WITH_NSS
1273 EXTRA_DIST += nsstest.c nssmock.c nsslinktest.c
1274 endif ! WITH_NSS
1276 virdeterministichashmock_la_SOURCES = \
1277         virdeterministichashmock.c
1278 virdeterministichashmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1279 virdeterministichashmock_la_LIBADD = $(MOCKLIBS_LIBS)
1281 test_libraries += virdeterministichashmock.la
1283 if WITH_YAJL
1284 virmacmaptest_SOURCES = \
1285         virmacmaptest.c testutils.h testutils.c
1286 virmacmaptest_LDADD = $(LDADDS)
1288 virnetdevopenvswitchtest_SOURCES = \
1289         virnetdevopenvswitchtest.c testutils.h testutils.c
1290 virnetdevopenvswitchtest_LDADD = $(LDADDS)
1292 test_programs += \
1293         virmacmaptest \
1294         virnetdevopenvswitchtest
1295 else ! WITH_YAJL
1296 EXTRA_DIST += \
1297         virmacmaptest.c \
1298         virnetdevopenvswitchtest.c
1299 endif ! WITH_YAJL
1301 virnetdevtest_SOURCES = \
1302         virnetdevtest.c testutils.h testutils.c
1303 virnetdevtest_CFLAGS = $(AM_CFLAGS) $(LIBNL_CFLAGS)
1304 virnetdevtest_LDADD = $(LDADDS)
1306 virnetdevmock_la_SOURCES = \
1307         virnetdevmock.c
1308 virnetdevmock_la_CFLAGS = $(AM_CFLAGS) $(LIBNL_CFLAGS)
1309 virnetdevmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1310 virnetdevmock_la_LIBADD = $(MOCKLIBS_LIBS)
1312 virrotatingfiletest_SOURCES = \
1313         virrotatingfiletest.c testutils.h testutils.c
1314 virrotatingfiletest_LDADD = $(LDADDS)
1316 if WITH_LINUX
1317 virusbtest_SOURCES = \
1318         virusbtest.c testutils.h testutils.c
1319 virusbtest_LDADD = $(LDADDS)
1321 virnetdevbandwidthtest_SOURCES = \
1322         virnetdevbandwidthtest.c testutils.h testutils.c
1323 virnetdevbandwidthtest_LDADD = $(LDADDS) $(LIBXML_LIBS)
1325 virusbmock_la_SOURCES = virusbmock.c
1326 virusbmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1327 virusbmock_la_LIBADD = $(MOCKLIBS_LIBS) \
1328         $(PROBES_O) \
1329         ../src/libvirt_util.la
1331 virnetdevbandwidthmock_la_SOURCES = \
1332         virnetdevbandwidthmock.c
1333 virnetdevbandwidthmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1334 virnetdevbandwidthmock_la_LIBADD = $(MOCKLIBS_LIBS)
1336 virtestmock_la_SOURCES = \
1337         virtestmock.c
1338 virtestmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1339 virtestmock_la_LIBADD = \
1340         $(MOCKLIBS_LIBS) \
1341         $(PROBES_O) \
1342         ../src/libvirt_util.la
1343 else ! WITH_LINUX
1344         EXTRA_DIST += virusbtest.c virusbmock.c \
1345                 virnetdevbandwidthtest.c virnetdevbandwidthmock.c \
1346                 virtestmock.c
1347 endif ! WITH_LINUX
1349 if WITH_DBUS
1350 virdbustest_SOURCES = \
1351         virdbustest.c testutils.h testutils.c
1352 virdbustest_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
1353 virdbustest_LDADD = $(LDADDS) $(DBUS_LIBS)
1355 virdbusmock_la_SOURCES = \
1356         virdbusmock.c
1357 virdbusmock_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
1358 virdbusmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1359 virdbusmock_la_LIBADD = $(MOCKLIBS_LIBS)
1361 virpolkittest_SOURCES = \
1362         virpolkittest.c testutils.h testutils.c
1363 virpolkittest_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
1364 virpolkittest_LDADD = $(LDADDS) $(DBUS_LIBS)
1366 virsystemdtest_SOURCES = \
1367         virsystemdtest.c testutils.h testutils.c
1368 virsystemdtest_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
1369 virsystemdtest_LDADD = $(LDADDS) $(DBUS_LIBS)
1371 else ! WITH_DBUS
1372 EXTRA_DIST += virdbustest.c virdbusmock.c virsystemdtest.c
1373 endif ! WITH_DBUS
1375 viruritest_SOURCES = \
1376         viruritest.c testutils.h testutils.c
1377 viruritest_LDADD = $(LDADDS)
1379 virkeyfiletest_SOURCES = \
1380         virkeyfiletest.c testutils.h testutils.c
1381 virkeyfiletest_LDADD = $(LDADDS)
1383 viralloctest_SOURCES = \
1384         viralloctest.c testutils.h testutils.c
1385 viralloctest_LDADD = $(LDADDS)
1387 virauthconfigtest_SOURCES = \
1388         virauthconfigtest.c testutils.h testutils.c
1389 virauthconfigtest_LDADD = $(LDADDS)
1391 seclabeltest_SOURCES = \
1392         seclabeltest.c testutils.h testutils.c
1393 seclabeltest_LDADD = $(LDADDS)
1395 if WITH_SECDRIVER_SELINUX
1396 if WITH_ATTR
1397 if WITH_TESTS
1398 noinst_LTLIBRARIES += libsecurityselinuxhelper.la
1399 else ! WITH_TESTS
1400 check_LTLIBRARIES += libsecurityselinuxhelper.la
1401 endif ! WITH_TESTS
1403 libsecurityselinuxhelper_la_SOURCES = \
1404         securityselinuxhelper.c
1405 libsecurityselinuxhelper_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1407 securityselinuxtest_SOURCES = \
1408         securityselinuxtest.c testutils.h testutils.c
1409 securityselinuxtest_LDADD = $(LDADDS) $(SELINUX_LIBS)
1410 securityselinuxtest_DEPENDENCIES = libsecurityselinuxhelper.la \
1411         ../src/libvirt.la
1413 if WITH_QEMU
1414 securityselinuxlabeltest_SOURCES = \
1415         securityselinuxlabeltest.c testutils.h testutils.c \
1416         testutilsqemu.h testutilsqemu.c
1417 securityselinuxlabeltest_LDADD = $(qemu_LDADDS) $(SELINUX_LIBS)
1418 securityselinuxlabeltest_DEPENDENCIES = libsecurityselinuxhelper.la \
1419         ../src/libvirt.la
1420 endif WITH_QEMU
1421 endif WITH_ATTR
1422 endif WITH_SECDRIVER_SELINUX
1423 EXTRA_DIST += securityselinuxtest.c securityselinuxlabeltest.c \
1424         securityselinuxhelper.c
1426 virbuftest_SOURCES = \
1427         virbuftest.c testutils.h testutils.c
1428 virbuftest_LDADD = $(LDADDS)
1430 virhashtest_SOURCES = \
1431         virhashtest.c virhashdata.h testutils.h testutils.c
1432 virhashtest_LDADD = $(LDADDS)
1434 viratomictest_SOURCES = \
1435         viratomictest.c testutils.h testutils.c
1436 viratomictest_LDADD = $(LDADDS)
1438 virbitmaptest_SOURCES = \
1439         virbitmaptest.c testutils.h testutils.c
1440 virbitmaptest_LDADD = $(LDADDS)
1442 virendiantest_SOURCES = \
1443         virendiantest.c testutils.h testutils.c
1444 virendiantest_LDADD = $(LDADDS)
1446 virfiletest_SOURCES = \
1447         virfiletest.c testutils.h testutils.c
1448 virfiletest_LDADD = $(LDADDS)
1450 virfilecachetest_SOURCES = \
1451         virfilecachetest.c testutils.h testutils.c
1452 virfilecachetest_LDADD = $(LDADDS)
1454 virfirewalltest_SOURCES = \
1455         virfirewalltest.c testutils.h testutils.c
1456 virfirewalltest_LDADD = $(LDADDS) $(DBUS_LIBS)
1457 virfirewalltest_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
1459 virjsontest_SOURCES = \
1460         virjsontest.c testutils.h testutils.c
1461 virjsontest_LDADD = $(LDADDS)
1463 utiltest_SOURCES = \
1464         utiltest.c testutils.h testutils.c
1465 utiltest_LDADD = $(LDADDS)
1467 if WITH_LIBVIRTD
1468 virdrivermoduletest_SOURCES = \
1469         virdrivermoduletest.c testutils.h testutils.c
1470 virdrivermoduletest_LDADD = $(LDADDS)
1471 endif WITH_LIBVIRTD
1473 if WITH_LIBVIRTD
1474 eventtest_SOURCES = \
1475         eventtest.c testutils.h testutils.c
1476 eventtest_LDADD = $(LIB_CLOCK_GETTIME) $(LDADDS)
1477 endif WITH_LIBVIRTD
1479 libshunload_la_SOURCES = shunloadhelper.c
1480 libshunload_la_LIBADD = ../src/libvirt.la
1481 libshunload_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
1483 shunloadtest_SOURCES = \
1484         shunloadtest.c
1485 shunloadtest_LDADD = $(LIB_PTHREAD) $(DLOPEN_LIBS)
1486 shunloadtest_DEPENDENCIES = libshunload.la
1488 sysinfotest_SOURCES = \
1489         sysinfotest.c testutils.h testutils.c
1490 sysinfotest_LDADD = $(LDADDS)
1492 domainconftest_SOURCES = \
1493         domainconftest.c testutils.h testutils.c
1494 domainconftest_LDADD = $(LDADDS)
1496 fdstreamtest_SOURCES = \
1497         fdstreamtest.c testutils.h testutils.c
1498 fdstreamtest_LDADD = $(LDADDS)
1500 objecteventtest_SOURCES = \
1501         objecteventtest.c \
1502         testutils.c testutils.h
1503 objecteventtest_LDADD = $(LDADDS)
1505 virtypedparamtest_SOURCES = \
1506         virtypedparamtest.c testutils.h testutils.c
1507 virtypedparamtest_LDADD = $(LDADDS)
1510 if WITH_LINUX
1511 fchosttest_SOURCES = \
1512        fchosttest.c testutils.h testutils.c
1513 fchosttest_LDADD = $(LDADDS)
1515 scsihosttest_SOURCES = \
1516        scsihosttest.c testutils.h testutils.c
1517 scsihosttest_LDADD = $(LDADDS)
1519 else ! WITH_LINUX
1520 EXTRA_DIST += fchosttest.c
1521 EXTRA_DIST += scsihosttest.c
1522 endif  ! WITH_LINUX
1524 if WITH_LINUX
1525 virscsitest_SOURCES = \
1526        virscsitest.c testutils.h testutils.c
1527 virscsitest_LDADD = $(LDADDS)
1529 else ! WITH_LINUX
1530 EXTRA_DIST += virscsitest.c
1531 endif  ! WITH_LINUX
1533 if WITH_CIL
1534 CILOPTFLAGS =
1535 CILOPTINCS =
1536 CILOPTPACKAGES = -package unix,str,cil
1537 CILOPTLIBS = -linkpkg
1539 objectlocking_SOURCES = objectlocking.ml
1541 %.cmx: %.ml
1542         ocamlfind ocamlopt $(CILOPTFLAGS) $(CILOPTINCS) $(CILOPTPACKAGES) -c $<
1544 objectlocking: objectlocking.cmx objectlocking-files.txt
1545         ocamlfind ocamlopt $(CILOPTFLAGS) $(CILOPTINCS) $(CILOPTPACKAGES) \
1546           $(CILOPTLIBS) $< -o $@
1548 objectlocking-files.txt:
1549         find $(top_builddir)/src/ -name '*.i' > $@
1551 else ! WITH_CIL
1552 EXTRA_DIST += objectlocking.ml
1553 endif ! WITH_CIL
1555 CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.cmi *.cmx \
1556         objectlocking-files.txt