aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/meson.build
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2021-10-06 11:27:47 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2022-01-28 11:13:33 +0100
commit98487b9035d8540376024df74ab5510fdc37f12e (patch)
tree4bdc68cc5004ccaecace5a34a3d41183a6a8b0d9 /tests/qemu-iotests/meson.build
parent3e233e29178dd9ebd3b3c3382a2e0ebea9e8127d (diff)
downloadqemu-98487b9035d8540376024df74ab5510fdc37f12e.zip
qemu-98487b9035d8540376024df74ab5510fdc37f12e.tar.gz
qemu-98487b9035d8540376024df74ab5510fdc37f12e.tar.bz2
build: make check-block a meson test
"meson test" can be asked to run tests verbosely; this makes it usable also for qemu-iotests's own harness, and it lets "make check-block" reuse mtest2make.py's infrastructure to find and build test dependencies. Adjust check-block.sh to use the standard exit code that reports a test as skipped. Alternatively, in the future we could make it produce TAP output, which is consistent with all other "make check" tests. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/meson.build')
-rw-r--r--tests/qemu-iotests/meson.build29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build
new file mode 100644
index 0000000..3a9425d
--- /dev/null
+++ b/tests/qemu-iotests/meson.build
@@ -0,0 +1,29 @@
+if have_tools and targetos != 'windows'
+ 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,
+ suite: suites,
+ timeout: 0,
+ is_parallel: false)
+ endforeach
+endif