xref: /qemu/tests/qemu-iotests/meson.build (revision ca61e750)
1if not have_tools or targetos == 'windows' or get_option('gprof')
2  subdir_done()
3endif
4
5foreach cflag: config_host['QEMU_CFLAGS'].split()
6  if cflag.startswith('-fsanitize') and \
7     not cflag.contains('safe-stack') and not cflag.contains('cfi-icall')
8    message('Sanitizers are enabled ==> Disabled the qemu-iotests.')
9    subdir_done()
10  endif
11endforeach
12
13bash = find_program('bash', required: false, version: '>= 4.0')
14if not bash.found()
15  message('bash >= v4.0 not available ==> Disabled the qemu-iotests.')
16  subdir_done()
17endif
18
19qemu_iotests_binaries = [qemu_img, qemu_io, qemu_nbd, qsd]
20qemu_iotests_env = {'PYTHON': python.full_path()}
21qemu_iotests_formats = {
22  'qcow2': 'quick',
23  'raw': 'slow',
24  'qed': 'thorough',
25  'vmdk': 'thorough',
26  'vpc': 'thorough'
27}
28
29foreach k, v : emulators
30  if k.startswith('qemu-system-')
31    qemu_iotests_binaries += v
32  endif
33endforeach
34
35foreach format, speed: qemu_iotests_formats
36  if speed == 'quick'
37    suites = 'block'
38  else
39    suites = ['block-' + speed, speed]
40  endif
41  test('qemu-iotests ' + format, sh, args: [files('../check-block.sh'), format],
42       depends: qemu_iotests_binaries, env: qemu_iotests_env,
43       protocol: 'tap',
44       suite: suites,
45       timeout: 0,
46       is_parallel: false)
47endforeach
48