]
endif
-if conf.has('WITH_BHYVE')
- mock_libs += [
- { 'name': 'bhyveargv2xmlmock' },
- { 'name': 'bhyvexml2argvmock' },
- ]
-endif
-
-if conf.has('WITH_LIBXL')
- mock_libs += [
- { 'name': 'xlmock', 'sources': [ 'libxlmock.c' ], 'deps': [ libxl_dep ] },
- ]
-endif
-
-if conf.has('WITH_NSS')
- mock_libs += [
- { 'name': 'nssmock' },
- ]
-endif
-
-if conf.has('WITH_QEMU')
- mock_libs += [
- { 'name': 'qemucaps2xmlmock' },
- { 'name': 'qemucpumock' },
- { 'name': 'qemuxml2argvmock' },
- { 'name': 'virhostidmock' },
- ]
-endif
-
-if conf.has('WITH_SECDRIVER_SELINUX')
- mock_libs += [
- { 'name': 'securityselinuxhelper' },
- ]
-endif
-
# build libraries used by tests
link_whole: [ libxl_driver_imp ],
link_with: [ libvirt_lib ],
)
+
+ mock_libs += [
+ { 'name': 'xlmock', 'sources': [ 'libxlmock.c' ], 'deps': [ libxl_dep ] },
+ ]
else
test_utils_xen_lib = []
test_xen_driver_lib = []
)
mock_libs += [
+ { 'name': 'qemucaps2xmlmock' },
{ 'name': 'qemucapsprobemock', 'link_with': [ test_qemu_driver_lib ] },
+ { 'name': 'qemucpumock' },
{ 'name': 'qemuhotplugmock', 'link_with': [ test_utils_qemu_lib, test_utils_lib ] },
+ { 'name': 'qemuxml2argvmock' },
+ { 'name': 'virhostidmock' },
]
else
test_qemu_driver_lib = []
)
tests_deps = []
-foreach mock : mock_libs
- tests_deps += shared_library(
- mock['name'],
- mock.get('sources', [ '@0@.c'.format(mock['name']) ]),
- override_options: [
- 'b_asneeded=false',
- 'b_lundef=false',
- ],
- dependencies: [
- tests_dep,
- mock.get('deps', []),
- ],
- link_with: [
- libvirt_lib,
- mock.get('link_with', []),
- ],
- )
-endforeach
# build helpers used by tests
{ 'name': 'bhyvexml2argvtest', 'link_with': [ bhyve_driver_impl ] },
{ 'name': 'bhyvexml2xmltest', 'link_with': [ bhyve_driver_impl ] },
]
+
+ mock_libs += [
+ { 'name': 'bhyveargv2xmlmock' },
+ { 'name': 'bhyvexml2argvmock' },
+ ]
endif
if conf.has('WITH_ESX')
'link_with': [ nss_libvirt_guest_impl ],
},
]
+
+ mock_libs += [
+ { 'name': 'nssmock' },
+ ]
endif
if conf.has('WITH_NWFILTER')
]
endif
endif
+
+ mock_libs += [
+ { 'name': 'securityselinuxhelper' },
+ ]
endif
if conf.has('WITH_STORAGE')
]
endif
+foreach mock : mock_libs
+ tests_deps += shared_library(
+ mock['name'],
+ mock.get('sources', [ '@0@.c'.format(mock['name']) ]),
+ override_options: [
+ 'b_asneeded=false',
+ 'b_lundef=false',
+ ],
+ dependencies: [
+ tests_dep,
+ mock.get('deps', []),
+ ],
+ link_with: [
+ libvirt_lib,
+ mock.get('link_with', []),
+ ],
+ )
+endforeach
+
foreach data : tests
test_sources = '@0@.c'.format(data['name'])
test_bin = executable(