From 03b05e7ed5a9dbe99218935767441cee17bd0200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Tue, 26 May 2026 12:02:31 +0100 Subject: [PATCH] tests/Makefile.include: add binary dependency to run-tcg-tests-% rules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Explicitly set the appropriate QEMU binary as a dependency so we can ensure they get built. This is especially important for MacOS which otherwise only builds the unsigned binaries on a normal "make all" run. Signed-off-by: Pierrick Bouvier Message-ID: <20260526110243.470002-4-alex.bennee@linaro.org> Signed-off-by: Alex Bennée --- tests/Makefile.include | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/Makefile.include b/tests/Makefile.include index 3b1af78ca1..494d0109f2 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -58,6 +58,12 @@ RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(TCG_TESTS_TARGETS)) $(foreach TARGET,$(TCG_TESTS_TARGETS), \ $(eval $(BUILD_DIR)/tests/tcg/config-$(TARGET).mak: config-host.mak)) +# $1 = the stem (e.g., arm-softmmu or x86_64-linux-user) +get-qemu-bin = $(if $(findstring softmmu,$1),qemu-system-$(subst -softmmu,,$1),qemu-$(subst -linux-user,,$1)) + +$(foreach TARGET,$(TCG_TESTS_TARGETS), \ + $(eval .ninja-goals.run-tcg-tests-$(TARGET) += $(call get-qemu-bin,$(TARGET)))) + .PHONY: $(TCG_TESTS_TARGETS:%=build-tcg-tests-%) $(TCG_TESTS_TARGETS:%=build-tcg-tests-%): build-tcg-tests-%: $(BUILD_DIR)/tests/tcg/config-%.mak $(call quiet-command, \