]>
Commit | Line | Data |
---|---|---|
dc1d91ac | 1 | slow_qtests = { |
e8a12fe3 | 2 | 'aspeed_smc-test': 360, |
794876fb | 3 | 'bios-tables-test' : 540, |
50dfa7ca | 4 | 'device-introspect-test' : 720, |
70717951 | 5 | 'migration-test' : 480, |
d05328bc | 6 | 'npcm7xx_pwm-test': 300, |
cb2218ab | 7 | 'qom-test' : 900, |
f6d8d0e5 | 8 | 'test-hmp' : 240, |
17e164da | 9 | 'pxe-test': 600, |
89115639 | 10 | 'prom-env-test': 360, |
93b6d673 | 11 | 'boot-serial-test': 180, |
f6bee9c2 | 12 | 'qos-test': 120, |
dc1d91ac PB |
13 | } |
14 | ||
b911c30c | 15 | qtests_generic = [ |
a2ce7dbd PB |
16 | 'cdrom-test', |
17 | 'device-introspect-test', | |
18 | 'machine-none-test', | |
19 | 'qmp-test', | |
20 | 'qmp-cmd-test', | |
21 | 'qom-test', | |
22 | 'test-hmp', | |
23 | 'qos-test', | |
f6a5f380 | 24 | 'readconfig-test', |
c95031a1 | 25 | 'netdev-socket', |
a2ce7dbd | 26 | ] |
6002711c | 27 | if enable_modules |
a2ce7dbd PB |
28 | qtests_generic += [ 'modules-test' ] |
29 | endif | |
30 | ||
31 | qtests_pci = \ | |
32 | (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) + \ | |
33 | (config_all_devices.has_key('CONFIG_IVSHMEM_DEVICE') ? ['ivshmem-test'] : []) | |
34 | ||
33c47ab9 JC |
35 | qtests_cxl = \ |
36 | (config_all_devices.has_key('CONFIG_CXL') ? ['cxl-test'] : []) | |
37 | ||
973d97fe TH |
38 | # FIXME: Get rid of get_option('default_devices') here and check |
39 | # for the availability of the default NICs in the tests | |
8bf5bb2e | 40 | qtests_filter = \ |
973d97fe | 41 | (get_option('default_devices') and slirp.found() ? ['test-netfilter'] : []) + \ |
d0cda6f4 PB |
42 | (get_option('default_devices') and host_os != 'windows' ? ['test-filter-mirror'] : []) + \ |
43 | (get_option('default_devices') and host_os != 'windows' ? ['test-filter-redirector'] : []) | |
8bf5bb2e | 44 | |
a2ce7dbd | 45 | qtests_i386 = \ |
8bf5bb2e BM |
46 | (slirp.found() ? ['pxe-test'] : []) + \ |
47 | qtests_filter + \ | |
a2ce7dbd PB |
48 | (have_tools ? ['ahci-test'] : []) + \ |
49 | (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \ | |
50 | (config_all_devices.has_key('CONFIG_SGA') ? ['boot-serial-test'] : []) + \ | |
a2ce7dbd | 51 | (config_all_devices.has_key('CONFIG_ISA_IPMI_KCS') ? ['ipmi-kcs-test'] : []) + \ |
d0cda6f4 | 52 | (host_os == 'linux' and \ |
faae3437 TH |
53 | config_all_devices.has_key('CONFIG_ISA_IPMI_BT') and |
54 | config_all_devices.has_key('CONFIG_IPMI_EXTERN') ? ['ipmi-bt-test'] : []) + \ | |
a2ce7dbd | 55 | (config_all_devices.has_key('CONFIG_WDT_IB700') ? ['wdt_ib700-test'] : []) + \ |
677726ef | 56 | (config_all_devices.has_key('CONFIG_PVPANIC_ISA') ? ['pvpanic-test'] : []) + \ |
c0f82826 | 57 | (config_all_devices.has_key('CONFIG_PVPANIC_PCI') ? ['pvpanic-pci-test'] : []) + \ |
a2ce7dbd PB |
58 | (config_all_devices.has_key('CONFIG_HDA') ? ['intel-hda-test'] : []) + \ |
59 | (config_all_devices.has_key('CONFIG_I82801B11') ? ['i82801b11-test'] : []) + \ | |
60 | (config_all_devices.has_key('CONFIG_IOH3420') ? ['ioh3420-test'] : []) + \ | |
af05ffff | 61 | (config_all_devices.has_key('CONFIG_LPC_ICH9') ? ['lpc-ich9-test'] : []) + \ |
a2ce7dbd PB |
62 | (config_all_devices.has_key('CONFIG_USB_UHCI') ? ['usb-hcd-uhci-test'] : []) + \ |
63 | (config_all_devices.has_key('CONFIG_USB_UHCI') and \ | |
64 | config_all_devices.has_key('CONFIG_USB_EHCI') ? ['usb-hcd-ehci-test'] : []) + \ | |
65 | (config_all_devices.has_key('CONFIG_USB_XHCI_NEC') ? ['usb-hcd-xhci-test'] : []) + \ | |
66 | (config_all_devices.has_key('CONFIG_TPM_CRB') ? ['tpm-crb-test'] : []) + \ | |
67 | (config_all_devices.has_key('CONFIG_TPM_CRB') ? ['tpm-crb-swtpm-test'] : []) + \ | |
68 | (config_all_devices.has_key('CONFIG_TPM_TIS_ISA') ? ['tpm-tis-test'] : []) + \ | |
69 | (config_all_devices.has_key('CONFIG_TPM_TIS_ISA') ? ['tpm-tis-swtpm-test'] : []) + \ | |
70 | (config_all_devices.has_key('CONFIG_RTL8139_PCI') ? ['rtl8139-test'] : []) + \ | |
7d6a4f12 | 71 | (config_all_devices.has_key('CONFIG_E1000E_PCI_EXPRESS') ? ['fuzz-e1000e-test'] : []) + \ |
b911c30c TH |
72 | (config_all_devices.has_key('CONFIG_MEGASAS_SCSI_PCI') ? ['fuzz-megasas-test'] : []) + \ |
73 | (config_all_devices.has_key('CONFIG_LSI_SCSI_PCI') ? ['fuzz-lsi53c895a-test'] : []) + \ | |
74 | (config_all_devices.has_key('CONFIG_VIRTIO_SCSI') ? ['fuzz-virtio-scsi-test'] : []) + \ | |
75 | (config_all_devices.has_key('CONFIG_SB16') ? ['fuzz-sb16-test'] : []) + \ | |
76 | (config_all_devices.has_key('CONFIG_SDHCI_PCI') ? ['fuzz-sdcard-test'] : []) + \ | |
ce94fa7a | 77 | (config_all_devices.has_key('CONFIG_ESP_PCI') ? ['am53c974-test'] : []) + \ |
d0cda6f4 | 78 | (host_os != 'windows' and \ |
84efa8aa | 79 | config_all_devices.has_key('CONFIG_ACPI_ERST') ? ['erst-test'] : []) + \ |
56f7c6b1 FR |
80 | (config_all_devices.has_key('CONFIG_PCIE_PORT') and \ |
81 | config_all_devices.has_key('CONFIG_VIRTIO_NET') and \ | |
e32b96b5 LV |
82 | config_all_devices.has_key('CONFIG_Q35') and \ |
83 | config_all_devices.has_key('CONFIG_VIRTIO_PCI') and \ | |
84 | slirp.found() ? ['virtio-net-failover'] : []) + \ | |
2e0def6d FR |
85 | (unpack_edk2_blobs and \ |
86 | config_all_devices.has_key('CONFIG_HPET') and \ | |
87 | config_all_devices.has_key('CONFIG_PARALLEL') ? ['bios-tables-test'] : []) + \ | |
a2ce7dbd | 88 | qtests_pci + \ |
33c47ab9 | 89 | qtests_cxl + \ |
a2ce7dbd PB |
90 | ['fdc-test', |
91 | 'ide-test', | |
a2ce7dbd PB |
92 | 'hd-geo-test', |
93 | 'boot-order-test', | |
a2ce7dbd PB |
94 | 'rtc-test', |
95 | 'i440fx-test', | |
96 | 'fw_cfg-test', | |
97 | 'device-plug-test', | |
98 | 'drive_del-test', | |
99 | 'tco-test', | |
100 | 'cpu-plug-test', | |
101 | 'q35-test', | |
102 | 'vmgenid-test', | |
103 | 'migration-test', | |
104 | 'test-x86-cpuid-compat', | |
8bf5bb2e | 105 | 'numa-test' |
31fb263c | 106 | ] |
a2ce7dbd | 107 | |
306d7581 | 108 | if dbus_display |
b4dd5b6a MAL |
109 | qtests_i386 += ['dbus-display-test'] |
110 | endif | |
111 | ||
a2ce7dbd | 112 | dbus_daemon = find_program('dbus-daemon', required: false) |
7544060e | 113 | if dbus_daemon.found() and gdbus_codegen.found() |
a2ce7dbd PB |
114 | # Temporarily disabled due to Patchew failures: |
115 | #qtests_i386 += ['dbus-vmstate-test'] | |
116 | dbus_vmstate1 = custom_target('dbus-vmstate description', | |
117 | output: ['dbus-vmstate1.h', 'dbus-vmstate1.c'], | |
861aa79a | 118 | input: meson.project_source_root() / 'backends/dbus-vmstate1.xml', |
7544060e | 119 | command: [gdbus_codegen, '@INPUT@', |
a2ce7dbd PB |
120 | '--interface-prefix', 'org.qemu', |
121 | '--generate-c-code', '@BASENAME@']).to_list() | |
122 | else | |
123 | dbus_vmstate1 = [] | |
124 | endif | |
125 | ||
126 | qtests_x86_64 = qtests_i386 | |
127 | ||
31fb263c | 128 | qtests_alpha = ['boot-serial-test'] + \ |
8bf5bb2e | 129 | qtests_filter + \ |
a2ce7dbd PB |
130 | (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) |
131 | ||
132 | qtests_avr = [ 'boot-serial-test' ] | |
133 | ||
31fb263c | 134 | qtests_hppa = ['boot-serial-test'] + \ |
8bf5bb2e | 135 | qtests_filter + \ |
a2ce7dbd PB |
136 | (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) |
137 | ||
31fb263c | 138 | qtests_m68k = ['boot-serial-test'] + \ |
8bf5bb2e | 139 | qtests_filter |
31fb263c TH |
140 | |
141 | qtests_microblaze = ['boot-serial-test'] + \ | |
8bf5bb2e | 142 | qtests_filter |
31fb263c | 143 | |
a2ce7dbd PB |
144 | qtests_microblazeel = qtests_microblaze |
145 | ||
146 | qtests_mips = \ | |
8bf5bb2e | 147 | qtests_filter + \ |
a2ce7dbd PB |
148 | (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \ |
149 | (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) | |
150 | ||
20516580 TH |
151 | qtests_mipsel = qtests_mips |
152 | qtests_mips64 = qtests_mips | |
153 | qtests_mips64el = qtests_mips | |
a2ce7dbd | 154 | |
a2ce7dbd | 155 | qtests_ppc = \ |
8bf5bb2e | 156 | qtests_filter + \ |
a2ce7dbd PB |
157 | (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \ |
158 | (config_all_devices.has_key('CONFIG_M48T59') ? ['m48t59-test'] : []) + \ | |
cfc1a889 PB |
159 | (config_all_accel.has_key('CONFIG_TCG') ? ['prom-env-test'] : []) + \ |
160 | (config_all_accel.has_key('CONFIG_TCG') ? ['boot-serial-test'] : []) + \ | |
74884cb1 | 161 | ['boot-order-test'] |
a2ce7dbd PB |
162 | |
163 | qtests_ppc64 = \ | |
a9697d09 | 164 | qtests_ppc + \ |
a2ce7dbd PB |
165 | (config_all_devices.has_key('CONFIG_PSERIES') ? ['device-plug-test'] : []) + \ |
166 | (config_all_devices.has_key('CONFIG_POWERNV') ? ['pnv-xscom-test'] : []) + \ | |
167 | (config_all_devices.has_key('CONFIG_PSERIES') ? ['rtas-test'] : []) + \ | |
31fb263c | 168 | (slirp.found() ? ['pxe-test'] : []) + \ |
a2ce7dbd PB |
169 | (config_all_devices.has_key('CONFIG_USB_UHCI') ? ['usb-hcd-uhci-test'] : []) + \ |
170 | (config_all_devices.has_key('CONFIG_USB_XHCI_NEC') ? ['usb-hcd-xhci-test'] : []) + \ | |
d8a18da5 | 171 | qtests_pci + ['migration-test', 'numa-test', 'cpu-plug-test', 'drive_del-test'] |
a2ce7dbd PB |
172 | |
173 | qtests_sh4 = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) | |
174 | qtests_sh4eb = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) | |
175 | ||
31fb263c | 176 | qtests_sparc = ['prom-env-test', 'm48t59-test', 'boot-serial-test'] + \ |
8bf5bb2e | 177 | qtests_filter |
a2ce7dbd PB |
178 | |
179 | qtests_sparc64 = \ | |
180 | (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \ | |
8bf5bb2e | 181 | qtests_filter + \ |
a2ce7dbd PB |
182 | ['prom-env-test', 'boot-serial-test'] |
183 | ||
326ccfe2 | 184 | qtests_npcm7xx = \ |
77c05b0b HW |
185 | ['npcm7xx_adc-test', |
186 | 'npcm7xx_gpio-test', | |
73314f13 | 187 | 'npcm7xx_pwm-test', |
526dbbe0 | 188 | 'npcm7xx_rng-test', |
4c579e15 | 189 | 'npcm7xx_sdhci-test', |
d986bf72 | 190 | 'npcm7xx_smbus-test', |
326ccfe2 | 191 | 'npcm7xx_timer-test', |
e6646167 DE |
192 | 'npcm7xx_watchdog_timer-test'] + \ |
193 | (slirp.found() ? ['npcm7xx_emc-test'] : []) | |
66609952 | 194 | qtests_aspeed = \ |
5fde7f10 | 195 | ['aspeed_hace-test', |
2ec06378 PD |
196 | 'aspeed_smc-test', |
197 | 'aspeed_gpio-test'] | |
4cb44571 IV |
198 | |
199 | qtests_stm32l4x5 = \ | |
a96bff61 IV |
200 | ['stm32l4x5_exti-test', |
201 | 'stm32l4x5_syscfg-test'] | |
4cb44571 | 202 | |
a2ce7dbd | 203 | qtests_arm = \ |
1eca58aa | 204 | (config_all_devices.has_key('CONFIG_MPS2') ? ['sse-timer-test'] : []) + \ |
9bc064b5 | 205 | (config_all_devices.has_key('CONFIG_CMSDK_APB_DUALTIMER') ? ['cmsdk-apb-dualtimer-test'] : []) + \ |
30858daf | 206 | (config_all_devices.has_key('CONFIG_CMSDK_APB_TIMER') ? ['cmsdk-apb-timer-test'] : []) + \ |
9cf5eb29 | 207 | (config_all_devices.has_key('CONFIG_CMSDK_APB_WATCHDOG') ? ['cmsdk-apb-watchdog-test'] : []) + \ |
e19d24e6 TH |
208 | (config_all_devices.has_key('CONFIG_PFLASH_CFI02') and |
209 | config_all_devices.has_key('CONFIG_MUSICPAL') ? ['pflash-cfi02-test'] : []) + \ | |
66609952 | 210 | (config_all_devices.has_key('CONFIG_ASPEED_SOC') ? qtests_aspeed : []) + \ |
288c31e3 | 211 | (config_all_devices.has_key('CONFIG_NPCM7XX') ? qtests_npcm7xx : []) + \ |
628f9008 | 212 | (config_all_devices.has_key('CONFIG_GENERIC_LOADER') ? ['hexloader-test'] : []) + \ |
bcbbd95d | 213 | (config_all_devices.has_key('CONFIG_TPM_TIS_I2C') ? ['tpm-tis-i2c-test'] : []) + \ |
e19d24e6 TH |
214 | (config_all_devices.has_key('CONFIG_VEXPRESS') ? ['test-arm-mptimer'] : []) + \ |
215 | (config_all_devices.has_key('CONFIG_MICROBIT') ? ['microbit-test'] : []) + \ | |
4cb44571 | 216 | (config_all_devices.has_key('CONFIG_STM32L4X5_SOC') ? qtests_stm32l4x5 : []) + \ |
a2ce7dbd | 217 | ['arm-cpu-features', |
628f9008 | 218 | 'boot-serial-test'] |
a2ce7dbd PB |
219 | |
220 | # TODO: once aarch64 TCG is fixed on ARM 32 bit host, make bios-tables-test unconditional | |
221 | qtests_aarch64 = \ | |
809954ef | 222 | (cpu != 'arm' and unpack_edk2_blobs ? ['bios-tables-test'] : []) + \ |
cfc1a889 | 223 | (config_all_accel.has_key('CONFIG_TCG') and config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? \ |
caf01d6a | 224 | ['tpm-tis-device-test', 'tpm-tis-device-swtpm-test'] : []) + \ |
bf22f151 | 225 | (config_all_devices.has_key('CONFIG_XLNX_ZYNQMP_ARM') ? ['xlnx-can-test', 'fuzz-xlnx-dp-test'] : []) + \ |
1c98a821 | 226 | (config_all_devices.has_key('CONFIG_XLNX_VERSAL') ? ['xlnx-canfd-test', 'xlnx-versal-trng-test'] : []) + \ |
db2237c4 | 227 | (config_all_devices.has_key('CONFIG_RASPI') ? ['bcm2835-dma-test'] : []) + \ |
cfc1a889 | 228 | (config_all_accel.has_key('CONFIG_TCG') and \ |
b08dc0f1 | 229 | config_all_devices.has_key('CONFIG_TPM_TIS_I2C') ? ['tpm-tis-i2c-test'] : []) + \ |
05889d15 AJ |
230 | ['arm-cpu-features', |
231 | 'numa-test', | |
a2ce7dbd | 232 | 'boot-serial-test', |
db2237c4 | 233 | 'migration-test'] |
a2ce7dbd PB |
234 | |
235 | qtests_s390x = \ | |
973d97fe | 236 | qtests_filter + \ |
a2ce7dbd PB |
237 | ['boot-serial-test', |
238 | 'drive_del-test', | |
239 | 'device-plug-test', | |
240 | 'virtio-ccw-test', | |
241 | 'cpu-plug-test', | |
242 | 'migration-test'] | |
243 | ||
2f849e9d TW |
244 | qtests_riscv32 = \ |
245 | (config_all_devices.has_key('CONFIG_SIFIVE_E_AON') ? ['sifive-e-aon-watchdog-test'] : []) | |
246 | ||
a2ce7dbd PB |
247 | qos_test_ss = ss.source_set() |
248 | qos_test_ss.add( | |
249 | 'ac97-test.c', | |
c0167539 | 250 | 'adm1272-test.c', |
5861f5ab | 251 | 'adm1266-test.c', |
a2ce7dbd PB |
252 | 'ds1338-test.c', |
253 | 'e1000-test.c', | |
a2ce7dbd PB |
254 | 'eepro100-test.c', |
255 | 'es1370-test.c', | |
256 | 'ipoctal232-test.c', | |
4fd1ebb1 | 257 | 'lsm303dlhc-mag-test.c', |
ffcdae67 | 258 | 'isl_pmbus_vr-test.c', |
7649086f | 259 | 'max34451-test.c', |
a2ce7dbd PB |
260 | 'megasas-test.c', |
261 | 'ne2000-test.c', | |
262 | 'tulip-test.c', | |
263 | 'nvme-test.c', | |
264 | 'pca9552-test.c', | |
265 | 'pci-test.c', | |
266 | 'pcnet-test.c', | |
267 | 'sdhci-test.c', | |
268 | 'spapr-phb-test.c', | |
269 | 'tmp105-test.c', | |
5e623f2b | 270 | 'emc141x-test.c', |
a2ce7dbd PB |
271 | 'usb-hcd-ohci-test.c', |
272 | 'virtio-test.c', | |
273 | 'virtio-blk-test.c', | |
274 | 'virtio-net-test.c', | |
275 | 'virtio-rng-test.c', | |
276 | 'virtio-scsi-test.c', | |
becf8873 | 277 | 'virtio-iommu-test.c', |
a2ce7dbd | 278 | 'vmxnet3-test.c', |
45cb69bb | 279 | 'igb-test.c', |
631c8726 | 280 | 'ufs-test.c', |
a2ce7dbd | 281 | ) |
b8a310a2 FR |
282 | |
283 | if config_all_devices.has_key('CONFIG_VIRTIO_SERIAL') | |
284 | qos_test_ss.add(files('virtio-serial-test.c')) | |
285 | endif | |
286 | ||
d0cda6f4 | 287 | if host_os != 'windows' |
bc67e31c BM |
288 | qos_test_ss.add(files('e1000e-test.c')) |
289 | endif | |
2c9dce01 PB |
290 | if have_virtfs |
291 | qos_test_ss.add(files('virtio-9p-test.c')) | |
292 | endif | |
43b6d7ee PB |
293 | if have_vhost_user |
294 | qos_test_ss.add(files('vhost-user-test.c')) | |
295 | endif | |
80695202 CX |
296 | if have_tools and have_vhost_user_blk_server |
297 | qos_test_ss.add(files('vhost-user-blk-test.c')) | |
298 | endif | |
a2ce7dbd | 299 | |
da00d067 PB |
300 | tpmemu_files = ['tpm-emu.c', 'tpm-util.c', 'tpm-tests.c'] |
301 | ||
58d25e97 DB |
302 | migration_files = [files('migration-helpers.c')] |
303 | if gnutls.found() | |
304 | migration_files += [files('../unit/crypto-tls-psk-helpers.c'), gnutls] | |
d47b83b1 DB |
305 | |
306 | if tasn1.found() | |
307 | migration_files += [files('../unit/crypto-tls-x509-helpers.c', | |
308 | '../unit/pkix_asn1_tab.c'), tasn1] | |
309 | endif | |
58d25e97 DB |
310 | endif |
311 | ||
da00d067 PB |
312 | qtests = { |
313 | 'bios-tables-test': [io, 'boot-sector.c', 'acpi-utils.c', 'tpm-emu.c'], | |
a2ce7dbd | 314 | 'cdrom-test': files('boot-sector.c'), |
a2ce7dbd | 315 | 'dbus-vmstate-test': files('migration-helpers.c') + dbus_vmstate1, |
bd24550e | 316 | 'erst-test': files('erst-test.c'), |
da00d067 | 317 | 'ivshmem-test': [rt, '../../contrib/ivshmem-server/ivshmem-server.c'], |
58d25e97 | 318 | 'migration-test': migration_files, |
da00d067 | 319 | 'pxe-test': files('boot-sector.c'), |
1220f581 | 320 | 'qos-test': [chardev, io, qos_test_ss.apply({}).sources()], |
da00d067 PB |
321 | 'tpm-crb-swtpm-test': [io, tpmemu_files], |
322 | 'tpm-crb-test': [io, tpmemu_files], | |
323 | 'tpm-tis-swtpm-test': [io, tpmemu_files, 'tpm-tis-util.c'], | |
324 | 'tpm-tis-test': [io, tpmemu_files, 'tpm-tis-util.c'], | |
bcbbd95d | 325 | 'tpm-tis-i2c-test': [io, tpmemu_files, 'qtest_aspeed.c'], |
da00d067 PB |
326 | 'tpm-tis-device-swtpm-test': [io, tpmemu_files, 'tpm-tis-util.c'], |
327 | 'tpm-tis-device-test': [io, tpmemu_files, 'tpm-tis-util.c'], | |
6830e53b | 328 | 'virtio-net-failover': files('migration-helpers.c'), |
a2ce7dbd | 329 | 'vmgenid-test': files('boot-sector.c', 'acpi-utils.c'), |
c95031a1 | 330 | 'netdev-socket': files('netdev-socket.c', '../unit/socket-helpers.c'), |
a2ce7dbd PB |
331 | } |
332 | ||
4d1bc58d | 333 | if vnc.found() |
2564dcbf | 334 | gvnc = dependency('gvnc-1.0', method: 'pkg-config', required: false) |
4d1bc58d JQ |
335 | if gvnc.found() |
336 | qtests += {'vnc-display-test': [gvnc]} | |
337 | qtests_generic += [ 'vnc-display-test' ] | |
338 | endif | |
f5755989 MAL |
339 | endif |
340 | ||
b4dd5b6a | 341 | if dbus_display |
f5755989 | 342 | qtests += {'dbus-display-test': [dbus_display1, gio]} |
b4dd5b6a MAL |
343 | endif |
344 | ||
a2ce7dbd PB |
345 | qtest_executables = {} |
346 | foreach dir : target_dirs | |
347 | if not dir.endswith('-softmmu') | |
348 | continue | |
349 | endif | |
350 | ||
351 | target_base = dir.split('-')[0] | |
fd5eef85 | 352 | qtest_emulator = emulators['qemu-system-' + target_base] |
da00d067 | 353 | target_qtests = get_variable('qtests_' + target_base, []) + qtests_generic |
a2ce7dbd | 354 | |
809954ef | 355 | test_deps = roms |
a2ce7dbd | 356 | qtest_env = environment() |
fd5eef85 PB |
357 | if have_tools |
358 | qtest_env.set('QTEST_QEMU_IMG', './qemu-img') | |
359 | test_deps += [qemu_img] | |
360 | endif | |
654d6b04 | 361 | qtest_env.set('G_TEST_DBUS_DAEMON', meson.project_source_root() / 'tests/dbus-vmstate-daemon.sh') |
64ed6f92 | 362 | qtest_env.set('QTEST_QEMU_BINARY', './qemu-system-' + target_base) |
cc1838c2 TH |
363 | if have_tools and have_vhost_user_blk_server |
364 | qtest_env.set('QTEST_QEMU_STORAGE_DAEMON_BINARY', './storage-daemon/qemu-storage-daemon') | |
365 | test_deps += [qsd] | |
366 | endif | |
367 | ||
d864756e FR |
368 | qtest_env.set('PYTHON', python.full_path()) |
369 | ||
da00d067 | 370 | foreach test : target_qtests |
a2ce7dbd PB |
371 | # Executables are shared across targets, declare them only the first time we |
372 | # encounter them | |
373 | if not qtest_executables.has_key(test) | |
da00d067 PB |
374 | src = [test + '.c'] |
375 | deps = [qemuutil, qos] | |
376 | if test in qtests | |
377 | # use a sourceset to quickly separate sources and deps | |
378 | test_ss = ss.source_set() | |
379 | test_ss.add(qtests[test]) | |
380 | src += test_ss.all_sources() | |
381 | deps += test_ss.all_dependencies() | |
382 | endif | |
a2ce7dbd | 383 | qtest_executables += { |
da00d067 | 384 | test: executable(test, src, dependencies: deps) |
a2ce7dbd PB |
385 | } |
386 | endif | |
34f02e9f | 387 | test('qtest-@0@/@1@'.format(target_base, test), |
a2ce7dbd | 388 | qtest_executables[test], |
fb72176b | 389 | depends: [test_deps, qtest_emulator, emulator_modules], |
a2ce7dbd PB |
390 | env: qtest_env, |
391 | args: ['--tap', '-k'], | |
392 | protocol: 'tap', | |
9eb95e5c DB |
393 | timeout: slow_qtests.get(test, 60), |
394 | priority: slow_qtests.get(test, 60), | |
a2ce7dbd PB |
395 | suite: ['qtest', 'qtest-' + target_base]) |
396 | endforeach | |
397 | endforeach |