test_helpers += qemucapsprobe
endif WITH_QEMU
-if WITH_LXC
-test_programs += lxcxml2xmltest lxcconf2xmltest
-endif WITH_LXC
-
if WITH_OPENVZ
test_programs += openvzutilstest
endif WITH_OPENVZ
qemuvhostusertest_LDADD = $(qemu_LDADDS)
endif WITH_QEMU
-if WITH_LXC
-
-lxc_LDADDS = \
- ../src/libvirt_driver_lxc_impl.la \
- $(LDADDS) \
- $(NULL)
-
-lxcxml2xmltest_SOURCES = \
- lxcxml2xmltest.c testutilslxc.c testutilslxc.h \
- testutils.c testutils.h
-lxcxml2xmltest_LDADD = $(lxc_LDADDS)
-
-lxcconf2xmltest_SOURCES = \
- lxcconf2xmltest.c testutilslxc.c testutilslxc.h \
- testutils.c testutils.h
-lxcconf2xmltest_LDADD = $(lxc_LDADDS)
-endif WITH_LXC
-
if WITH_OPENVZ
openvzutilstest_SOURCES = \
openvzutilstest.c \
]
endif
+if conf.has('WITH_LXC')
+ tests += [
+ { 'name': 'lxcconf2xmltest', 'link_with': [ lxc_driver_impl_lib ], 'link_whole': [ test_utils_lxc_lib ] },
+ { 'name': 'lxcxml2xmltest', 'link_with': [ lxc_driver_impl_lib ], 'link_whole': [ test_utils_lxc_lib ] },
+ ]
+endif
+
foreach data : tests
test_sources = '@0@.c'.format(data['name'])
test_bin = executable(