Skip to content

Commit

Permalink
tests/qemu-iotests/meson.build: Improve the indentation
Browse files Browse the repository at this point in the history
By using subdir_done(), we can get rid of one level of indentation
in this file. This will make it easier to add more conditions to
skip the iotests in future patches.

Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220223093840.2515281-3-thuth@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
  • Loading branch information
huth authored and XanClic committed Apr 20, 2022
1 parent 1be5a76 commit f1f8af2
Showing 1 changed file with 32 additions and 29 deletions.
61 changes: 32 additions & 29 deletions tests/qemu-iotests/meson.build
@@ -1,30 +1,33 @@
if have_tools and targetos != 'windows' and not get_option('gprof')
qemu_iotests_binaries = [qemu_img, qemu_io, qemu_nbd, qsd]
qemu_iotests_env = {'PYTHON': python.full_path()}
qemu_iotests_formats = {
'qcow2': 'quick',
'raw': 'slow',
'qed': 'thorough',
'vmdk': 'thorough',
'vpc': 'thorough'
}

foreach k, v : emulators
if k.startswith('qemu-system-')
qemu_iotests_binaries += v
endif
endforeach
foreach format, speed: qemu_iotests_formats
if speed == 'quick'
suites = 'block'
else
suites = ['block-' + speed, speed]
endif
test('qemu-iotests ' + format, sh, args: [files('../check-block.sh'), format],
depends: qemu_iotests_binaries, env: qemu_iotests_env,
protocol: 'tap',
suite: suites,
timeout: 0,
is_parallel: false)
endforeach
if not have_tools or targetos == 'windows' or get_option('gprof')
subdir_done()
endif

qemu_iotests_binaries = [qemu_img, qemu_io, qemu_nbd, qsd]
qemu_iotests_env = {'PYTHON': python.full_path()}
qemu_iotests_formats = {
'qcow2': 'quick',
'raw': 'slow',
'qed': 'thorough',
'vmdk': 'thorough',
'vpc': 'thorough'
}

foreach k, v : emulators
if k.startswith('qemu-system-')
qemu_iotests_binaries += v
endif
endforeach

foreach format, speed: qemu_iotests_formats
if speed == 'quick'
suites = 'block'
else
suites = ['block-' + speed, speed]
endif
test('qemu-iotests ' + format, sh, args: [files('../check-block.sh'), format],
depends: qemu_iotests_binaries, env: qemu_iotests_env,
protocol: 'tap',
suite: suites,
timeout: 0,
is_parallel: false)
endforeach

0 comments on commit f1f8af2

Please sign in to comment.