Il 30/10/2013 16:07, Stefan Hajnoczi ha scritto:
> I came across this little tests/Makefile annoyance:
> If you modify QEMU code and then run "make check" it will not rebuild QEMU.
>
> This can be confusing during development when you expect changing the
> code and rerunning the tests to pass :).
>
> I played with tests/Makefile but was unable to add the right
> dependency. We need something that makes all libqtest tests depend on
> $(TARGET)-softmmu/qemu-system-$(TARGET) at "make check" time.
>
> This way QEMU gets rebuilt if "make check" will execute the QEMU binary.
>
> Any ideas?
Does this work?
diff --git a/tests/Makefile b/tests/Makefile
index fa4c9f0..f3f78ee 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -212,7 +212,7 @@ GCOV_OPTIONS = -n $(if $(V),-f,)
# gtester tests, possibly with verbose output
.PHONY: $(patsubst %, check-qtest-%, $(QTEST_TARGETS))
-$(patsubst %, check-qtest-%, $(QTEST_TARGETS)): check-qtest-%: $(check-qtest-y)
+$(patsubst %, check-qtest-%, $(QTEST_TARGETS)): check-qtest-%:
$(check-qtest-y) subdir-%-softmmu
$(if $(CONFIG_GCOV),@rm -f *.gcda */*.gcda */*/*.gcda */*/*/*.gcda,)
$(call quiet-command,QTEST_QEMU_BINARY=$*-softmmu/qemu-system-$* \
MALLOC_PERTURB_=$${MALLOC_PERTURB_:-$$((RANDOM % 255 + 1))} \