aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-01-28 14:49:18 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2020-08-21 06:30:42 -0400
commitd3ca592b3c10ba3d340e28f68a9a155dacdf4446 (patch)
tree11dcd48d0d344b158af5d9ad4b55ac55e1d789d0
parentacfdaac577130e86ebefe5564cfd121c16dbc3c4 (diff)
downloadqemu-d3ca592b3c10ba3d340e28f68a9a155dacdf4446.zip
qemu-d3ca592b3c10ba3d340e28f68a9a155dacdf4446.tar.gz
qemu-d3ca592b3c10ba3d340e28f68a9a155dacdf4446.tar.bz2
meson: convert check-block
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--meson.build2
-rw-r--r--tests/Makefile.include18
-rw-r--r--tests/meson.build4
-rw-r--r--tests/qemu-iotests/meson.build10
4 files changed, 18 insertions, 16 deletions
diff --git a/meson.build b/meson.build
index fd7b362..02a8bd5 100644
--- a/meson.build
+++ b/meson.build
@@ -1001,9 +1001,11 @@ if have_tools
dependencies: [authz, block, crypto, io, qom, qemuutil], install: true)
qemu_io = executable('qemu-io', files('qemu-io.c'),
dependencies: [block, qemuutil], install: true)
+ qemu_block_tools = [qemu_img, qemu_io]
if targetos == 'linux' or targetos == 'sunos' or targetos.endswith('bsd')
qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'),
dependencies: [block, qemuutil], install: true)
+ qemu_block_tools += [qemu_nbd]
endif
subdir('storage-daemon')
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 4a24353..1f07a36 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -160,8 +160,6 @@ check-unit-y += tests/test-uuid$(EXESUF)
check-unit-y += tests/ptimer-test$(EXESUF)
check-unit-y += tests/test-qapi-util$(EXESUF)
-check-block-$(call land,$(CONFIG_POSIX),$(CONFIG_SOFTMMU)) += tests/check-block.sh
-
generated-files-y += tests/test-qapi-types.h
generated-files-y += tests/include/test-qapi-types-sub-module.h
generated-files-y += tests/test-qapi-types-sub-sub-module.h
@@ -480,14 +478,6 @@ check-tcg: $(RUN_TCG_TARGET_RULES)
clean-tcg: $(CLEAN_TCG_TARGET_RULES)
-QEMU_IOTESTS_HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = tests/qemu-iotests/socket_scm_helper$(EXESUF)
-
-.PHONY: check-tests/check-block.sh
-check-tests/check-block.sh: tests/check-block.sh qemu-img$(EXESUF) \
- qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y) \
- $(patsubst %-softmmu,qemu-system-%,$(filter %-softmmu,$(TARGET_DIRS)))
- @$<
-
# Python venv for running tests
.PHONY: check-venv check-acceptance
@@ -542,9 +532,7 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR) get-vm-images
# Consolidated targets
.PHONY: check-block check-unit check check-clean get-vm-images
-ifeq ($(CONFIG_TOOLS),y)
-check-block: $(patsubst %,check-%, $(check-block-y))
-endif
+check-block:
check-build: build-unit
check-clean:
@@ -552,14 +540,12 @@ check-clean:
rm -f tests/test-qapi-gen-timestamp
rm -rf $(TESTS_VENV_DIR) $(TESTS_RESULTS_DIR)
-check: check-block check-unit
+check: check-unit
clean: check-clean
# Build the help program automatically
-all: $(QEMU_IOTESTS_HELPERS-y)
-
-include $(wildcard tests/*.d)
endif
diff --git a/tests/meson.build b/tests/meson.build
index d724402..f834c27 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,3 +1,7 @@
+if have_system and 'CONFIG_POSIX' in config_host
+ subdir('qemu-iotests')
+endif
+
test('decodetree', sh,
args: [ files('decode/check.sh'), config_host['PYTHON'], files('../scripts/decodetree.py') ],
workdir: meson.current_source_dir() / 'decode',
diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build
new file mode 100644
index 0000000..3de09fb
--- /dev/null
+++ b/tests/qemu-iotests/meson.build
@@ -0,0 +1,10 @@
+if 'CONFIG_LINUX' in config_host
+ socket_scm_helper = executable('socket_scm_helper', 'socket_scm_helper.c',
+ build_by_default: false)
+else
+ socket_scm_helper = []
+endif
+test('qemu-iotests', sh, args: [files('../check-block.sh')],
+ depends: [qemu_block_tools, emulators, socket_scm_helper],
+ suite: 'block', timeout: 10000)
+