@samitouri / QOSamiQemu / commits / 03b05e7ed5

tests/Makefile.include: add binary dependency to run-tcg-tests-% rules

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 <pierrick.bouvier@oss.qualcomm.com> Message-ID: <20260526110243.470002-4-alex.bennee@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

Alex Bennée committed May 26, 2026 at 12:02 UTC 03b05e7ed5a9dbe99218935767441cee17bd0200
1 file changed +6
tests/Makefile.include
+6
@@ -58,6 +58,12 @@ RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(TCG_TESTS_TARGETS))
58 $(foreach TARGET,$(TCG_TESTS_TARGETS), \
59 $(eval $(BUILD_DIR)/tests/tcg/config-$(TARGET).mak: config-host.mak))
60
61 +# $1 = the stem (e.g., arm-softmmu or x86_64-linux-user)
62 +get-qemu-bin = $(if $(findstring softmmu,$1),qemu-system-$(subst -softmmu,,$1),qemu-$(subst -linux-user,,$1))
63 +
64 +$(foreach TARGET,$(TCG_TESTS_TARGETS), \
65 + $(eval .ninja-goals.run-tcg-tests-$(TARGET) += $(call get-qemu-bin,$(TARGET))))
66 +
67 .PHONY: $(TCG_TESTS_TARGETS:%=build-tcg-tests-%)
68 $(TCG_TESTS_TARGETS:%=build-tcg-tests-%): build-tcg-tests-%: $(BUILD_DIR)/tests/tcg/config-%.mak
69 $(call quiet-command, \