qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH RFC] tests: always build test programs


From: Daniel P. Berrange
Subject: [Qemu-devel] [PATCH RFC] tests: always build test programs
Date: Fri, 26 Feb 2016 13:09:10 +0000

It is easy to miss that a change broke compilation of a unit
test unless you always remember to run 'make check-unit' for
every patch. Hook build of unit test programs into the 'all'
target so that they are built by default.

Signed-off-by: Daniel P. Berrange <address@hidden>
---
 tests/Makefile | 2 ++
 1 file changed, 2 insertions(+)

Note sure if this is considered to be desirable in general
or not. We did this in libvirt a while back because it
stopped people submitting patches which broke build of
the unit tests. On the downside it means more code is
built by default. Perhaps it could be on by default but
with a --disable-tests to let people optionally disble
it ? Without this, if people want to check unit test
they'd curently do 'make && make check-unit' which takes
longer because that actually runs the unit tests as well
as bulding them - there's no target just to build them.

NB, tests/qemu-iotests/socket_scm_helper is already set
to build by default, so we're a bit inconsistent about
rules for building test suite artifacts currently.

diff --git a/tests/Makefile b/tests/Makefile
index cb72eb4..7fadd9e 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -638,6 +638,8 @@ $(patsubst %, check-qtest-%, $(QTEST_TARGETS)): 
check-qtest-%: $(check-qtest-y)
          $(GCOV) $(GCOV_OPTIONS) $$f -o `dirname $$f`; \
        done,)
 
+all: $(check-unit-y)
+
 .PHONY: $(patsubst %, check-%, $(check-unit-y))
 $(patsubst %, check-%, $(check-unit-y)): check-%: %
        $(if $(CONFIG_GCOV),@rm -f *.gcda */*.gcda */*/*.gcda */*/*/*.gcda,)
-- 
2.5.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]