aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/meson.build
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-10-12 22:48:45 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-10-12 22:48:45 +0100
commit724c1c8bb350d84c097ab2005aad15e125d06b6c (patch)
treeb55ff4dc3e8012e2624d2aa2d1211684bd425656 /tests/qtest/meson.build
parenta0bdf866873467271eff9a92f179ab0f77d735cb (diff)
parenta0c9162c8250e121af438aee5ef93e64ec62dae1 (diff)
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging
* qtest documentation improvements (Eduardo, myself) * libqtest event buffering (Maxim) * use RCU for list of children of a bus (Maxim) * move more files to softmmu/ (myself) * meson.build cleanups, qemu-storage-daemon fix (Philippe) # gpg: Signature made Mon 12 Oct 2020 16:55:19 BST # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini-gitlab/tags/for-upstream: (38 commits) meson: identify more sections of meson.build scsi/scsi_bus: fix races in REPORT LUNS virtio-scsi: use scsi_device_get scsi/scsi_bus: Add scsi_device_get scsi/scsi-bus: scsi_device_find: don't return unrealized devices device-core: use atomic_set on .realized property scsi: switch to bus->check_address device-core: use RCU for list of children of a bus device_core: use drain_call_rcu in in qmp_device_add scsi/scsi_bus: switch search direction in scsi_device_find qdev: add "check if address free" callback for buses qemu-iotests, qtest: rewrite test 067 as a qtest qtest: check that drives are really appearing and disappearing qtest: switch users back to qtest_qmp_receive device-plug-test: use qtest_qmp to send the device_del command qtest: remove qtest_qmp_receive_success qtest: Reintroduce qtest_qmp_receive with QMP event buffering qtest: rename qtest_qmp_receive to qtest_qmp_receive_dict meson.build: Re-enable KVM support for MIPS build-sys: fix git version from -version ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/qtest/meson.build')
-rw-r--r--tests/qtest/meson.build59
1 files changed, 28 insertions, 31 deletions
diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
index 0f32ca0895..1c4b87e3e2 100644
--- a/tests/qtest/meson.build
+++ b/tests/qtest/meson.build
@@ -111,7 +111,7 @@ qtests_moxie = [ 'boot-serial-test' ]
qtests_ppc = \
(config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \
(config_all_devices.has_key('CONFIG_M48T59') ? ['m48t59-test'] : []) + \
- ['boot-order-test', 'prom-env-test', 'drive_del-test', 'boot-serial-test'] \
+ ['boot-order-test', 'prom-env-test', 'boot-serial-test'] \
qtests_ppc64 = \
(config_all_devices.has_key('CONFIG_PSERIES') ? ['device-plug-test'] : []) + \
@@ -121,7 +121,7 @@ qtests_ppc64 = \
(config_all_devices.has_key('CONFIG_USB_UHCI') ? ['usb-hcd-uhci-test'] : []) + \
(config_all_devices.has_key('CONFIG_USB_XHCI_NEC') ? ['usb-hcd-xhci-test'] : []) + \
(config_host.has_key('CONFIG_POSIX') ? ['test-filter-mirror'] : []) + \
- qtests_pci + ['migration-test', 'numa-test', 'cpu-plug-test']
+ qtests_pci + ['migration-test', 'numa-test', 'cpu-plug-test', 'drive_del-test']
qtests_sh4 = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : [])
qtests_sh4eb = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : [])
@@ -193,35 +193,25 @@ qos_test_ss.add(
qos_test_ss.add(when: 'CONFIG_VIRTFS', if_true: files('virtio-9p-test.c'))
qos_test_ss.add(when: 'CONFIG_VHOST_USER', if_true: files('vhost-user-test.c'))
-extra_qtest_deps = {
- 'bios-tables-test': [io],
- 'ivshmem-test': [rt],
- 'qos-test': [chardev, io],
- 'tpm-crb-swtpm-test': [io],
- 'tpm-crb-test': [io],
- 'tpm-tis-swtpm-test': [io],
- 'tpm-tis-test': [io],
- 'tpm-tis-device-swtpm-test': [io],
- 'tpm-tis-device-test': [io],
-}
-extra_qtest_srcs = {
- 'bios-tables-test': files('boot-sector.c', 'acpi-utils.c', 'tpm-emu.c'),
- 'pxe-test': files('boot-sector.c'),
+tpmemu_files = ['tpm-emu.c', 'tpm-util.c', 'tpm-tests.c']
+
+qtests = {
+ 'bios-tables-test': [io, 'boot-sector.c', 'acpi-utils.c', 'tpm-emu.c'],
'cdrom-test': files('boot-sector.c'),
- 'migration-test': files('migration-helpers.c'),
- 'ivshmem-test': files('../../contrib/ivshmem-server/ivshmem-server.c'),
'dbus-vmstate-test': files('migration-helpers.c') + dbus_vmstate1,
+ 'ivshmem-test': [rt, '../../contrib/ivshmem-server/ivshmem-server.c'],
+ 'migration-test': files('migration-helpers.c'),
+ 'pxe-test': files('boot-sector.c'),
+ 'qos-test': [chardev, io, qos_test_ss.apply(config_host, strict: false).sources()],
+ 'tpm-crb-swtpm-test': [io, tpmemu_files],
+ 'tpm-crb-test': [io, tpmemu_files],
+ 'tpm-tis-swtpm-test': [io, tpmemu_files, 'tpm-tis-util.c'],
+ 'tpm-tis-test': [io, tpmemu_files, 'tpm-tis-util.c'],
+ 'tpm-tis-device-swtpm-test': [io, tpmemu_files, 'tpm-tis-util.c'],
+ 'tpm-tis-device-test': [io, tpmemu_files, 'tpm-tis-util.c'],
'vmgenid-test': files('boot-sector.c', 'acpi-utils.c'),
- 'tpm-crb-swtpm-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tests.c'),
- 'tpm-crb-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tests.c'),
- 'tpm-tis-device-swtpm-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tis-util.c', 'tpm-tests.c'),
- 'tpm-tis-device-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tis-util.c', 'tpm-tests.c'),
- 'tpm-tis-swtpm-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tis-util.c', 'tpm-tests.c'),
- 'tpm-tis-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tis-util.c', 'tpm-tests.c'),
- 'qos-test': qos_test_ss.apply(config_host, strict: false).sources()
}
-
qtest_executables = {}
foreach dir : target_dirs
if not dir.endswith('-softmmu')
@@ -230,7 +220,7 @@ foreach dir : target_dirs
target_base = dir.split('-')[0]
qtest_emulator = emulators['qemu-system-' + target_base]
- qtests = get_variable('qtests_' + target_base, []) + qtests_generic
+ target_qtests = get_variable('qtests_' + target_base, []) + qtests_generic
test_deps = []
qtest_env = environment()
@@ -241,14 +231,21 @@ foreach dir : target_dirs
qtest_env.set('G_TEST_DBUS_DAEMON', meson.source_root() / 'tests/dbus-vmstate-daemon.sh')
qtest_env.set('QTEST_QEMU_BINARY', './qemu-system-' + target_base)
- foreach test : qtests
+ foreach test : target_qtests
# Executables are shared across targets, declare them only the first time we
# encounter them
if not qtest_executables.has_key(test)
+ src = [test + '.c']
+ deps = [qemuutil, qos]
+ if test in qtests
+ # use a sourceset to quickly separate sources and deps
+ test_ss = ss.source_set()
+ test_ss.add(qtests[test])
+ src += test_ss.all_sources()
+ deps += test_ss.all_dependencies()
+ endif
qtest_executables += {
- test: executable(test,
- files(test + '.c') + extra_qtest_srcs.get(test, []),
- dependencies: [qemuutil, qos] + extra_qtest_deps.get(test, []))
+ test: executable(test, src, dependencies: deps)
}
endif
# FIXME: missing dependency on the emulator binary and qemu-img