All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH RFC] tests: always build test programs
Date: Fri, 26 Feb 2016 13:09:10 +0000	[thread overview]
Message-ID: <1456492150-5299-1-git-send-email-berrange@redhat.com> (raw)

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 <berrange@redhat.com>
---
 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	other threads:[~2016-02-26 13:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26 13:09 Daniel P. Berrange [this message]
2016-02-26 14:28 ` [Qemu-devel] [PATCH RFC] tests: always build test programs Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1456492150-5299-1-git-send-email-berrange@redhat.com \
    --to=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.