All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, pbonzini@redhat.com
Subject: [Qemu-devel] [RFC v4 7/7] tests: Make check-source cover generated headers
Date: Thu, 23 May 2019 10:15:38 +0200	[thread overview]
Message-ID: <20190523081538.2291-8-armbru@redhat.com> (raw)
In-Reply-To: <20190523081538.2291-1-armbru@redhat.com>

FIXME Computation of generated target-dependent headers

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 tests/check-headers.mak | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/tests/check-headers.mak b/tests/check-headers.mak
index 589c62d66b..16a5f4e214 100644
--- a/tests/check-headers.mak
+++ b/tests/check-headers.mak
@@ -4,16 +4,26 @@ ifneq ($(wildcard $(SRC_PATH)/.git),)
 
 # All headers:
 src-headers := $(filter %.h, $(shell cd $(SRC_PATH) && git ls-files))
+gen-headers := $(filter %.h, $(generated-files-y))
+ifeq ($(generated-files-y),) # FIXME empty when included from Makefile.target
+$(warning warning: working around empty generated-files-y)
+# Work-around: hard-code the generated headers that are actually
+# target-dependent
+gen-headers := qapi/qapi-types-target.h qapi/qapi-visit-target.h qapi/qapi-commands-target.h qapi/qapi-events-target.h qapi/qapi-types.h qapi/qapi-visit.h qapi/qapi-commands.h qapi/qapi-events.h
+endif
 
 # Third party headers we don't want to mess with:
 excluded-headers := $(filter disas/libvixl/vixl/% include/standard-headers/% linux-headers/% pc-bios/% slirp/%, $(src-headers))
+excluded-headers += $(filter trace-dtrace-root.h %/trace-dtrace.h, $(gen-headers))
 # Funny stuff we don't want to mess with:
 excluded-headers += $(filter tests/multiboot/% tests/tcg/% tests/uefi-test-tools/%, $(src-headers))
 excluded-headers += scripts/cocci-macro-file.h
 
 # Headers that require -DNEED_CPU_H etc.
 target-header-comment := NOTE: May only be included into target-dependent code
-target-headers := $(shell cd $(SRC_PATH) && egrep -l '$(target-header-comment)' $(src-headers))
+target-headers := $(filter qapi/qapi-%-target.h, $(gen-headers))
+target-headers += $(target-headers:-target.h=.h)
+target-headers += $(shell cd $(SRC_PATH) && egrep -l '$(target-header-comment)' $(src-headers))
 
 # Headers carrying a FIXME about this test:
 bad-header-without-linux$(CONFIG_LINUX) := | without CONFIG_LINUX
@@ -28,10 +38,11 @@ bad-header-without-x11$(CONFIG_X11) := | without CONFIG_X11
 bad-header-without-xen$(CONFIG_XEN) := | without CONFIG_XEN
 bad-header-comment := FIXME Does not pass make check-headers($(bad-header-without-linux)$(bad-header-without-opengl)$(bad-header-without-posix)$(bad-header-without-rdma)$(bad-header-without-replication)$(bad-header-without-spice)$(bad-header-without-system-emu)$(bad-header-without-win32)$(bad-header-without-x11)$(bad-header-without-xen)), yet!
 bad-headers := $(shell cd $(SRC_PATH) && egrep -l '$(bad-header-comment)' $(src-headers))
+bad-headers += trace/generated-tcg-tracers.h trace/generated-helpers-wrappers.h trace/generated-helpers.h
 bad-target-headers := $(filter $(target-headers), $(bad-headers))
 
 # Checked headers (all less excluded and bad):
-checked-headers := $(filter-out $(excluded-headers) $(bad-headers) $(target-headers), $(src-headers))
+checked-headers := $(filter-out $(excluded-headers) $(bad-headers) $(target-headers), $(src-headers) $(gen-headers))
 check-header-tests := $(patsubst %.h, tests/headers/%.c, $(checked-headers))
 checked-target-headers := $(filter-out $(excluded-headers) $(bad-headers), $(target-headers))
 check-target-header-tests := $(patsubst %.h, tests/headers/%.c, $(checked-target-headers))
-- 
2.17.2



      parent reply	other threads:[~2019-05-23  8:30 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23  8:15 [Qemu-devel] [RFC v4 0/7] Baby steps towards saner headers Markus Armbruster
2019-05-23  8:15 ` [Qemu-devel] [RFC v4 1/7] Makefile: Remove code to smooth transition to config.status Markus Armbruster
2019-05-23 13:54   ` Richard Henderson
2019-05-24  5:15   ` Philippe Mathieu-Daudé
2019-05-24 11:50     ` Markus Armbruster
2019-05-23  8:15 ` [Qemu-devel] [RFC v4 2/7] Makefile: Drop bogus cleaning of $(ALL_SUBDIRS)/qemu-options.def Markus Armbruster
2019-05-23 13:56   ` Richard Henderson
2019-05-24  5:17   ` Philippe Mathieu-Daudé
2019-05-23  8:15 ` [Qemu-devel] [RFC v4 3/7] Makefile: Rename targets for make recursion Markus Armbruster
2019-05-23 14:10   ` Richard Henderson
2019-05-24  5:28   ` Philippe Mathieu-Daudé
2019-05-24 12:34     ` Markus Armbruster
2019-05-23  8:15 ` [Qemu-devel] [RFC v4 4/7] Makefile: Reuse all's recursion machinery for clean and install Markus Armbruster
2019-05-23 14:14   ` Richard Henderson
2019-05-23  8:15 ` [Qemu-devel] [RFC v4 5/7] tests: New make target check-source Markus Armbruster
2019-05-23 16:51   ` Paolo Bonzini
2019-05-23 19:57     ` Markus Armbruster
2019-05-24 16:25       ` Paolo Bonzini
2019-05-27  5:10         ` Markus Armbruster
2019-05-27  9:58           ` Paolo Bonzini
2019-05-24  5:49   ` Philippe Mathieu-Daudé
2019-05-24 12:36     ` Markus Armbruster
2019-05-23  8:15 ` [Qemu-devel] [RFC v4 6/7] tests: Don't limit check-headers to include/ Markus Armbruster
2019-05-24  7:24   ` Thomas Huth
2019-05-24  7:32     ` Philippe Mathieu-Daudé
2019-05-24 11:52     ` Markus Armbruster
2019-05-24  9:11   ` Peter Maydell
2019-05-24 12:25     ` Markus Armbruster
2019-05-24 12:29       ` Peter Maydell
2019-05-23  8:15 ` Markus Armbruster [this message]

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=20190523081538.2291-8-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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.