syntax-check: check QEMU caps grouping

Introduce a perl script that is able to regroup both
the QEMU_CAPS constants and the capability strings.

Check correct grouping as a part of syntax check.

For in-place regrouping after a rebase, just run:
  tests/group-qemu-caps.pl
without any parameters.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
Ján Tomko
2018-04-26 07:42:36 +02:00
parent a762701791
commit 8fa4131814
3 changed files with 123 additions and 2 deletions
+4 -1
View File
@@ -1098,7 +1098,7 @@ _autogen_error:
ifneq ($(_gl-Makefile),)
syntax-check: spacing-check test-wrap-argv \
prohibit-duplicate-header mock-noinline
prohibit-duplicate-header mock-noinline group-qemu-caps
endif
# Don't include duplicate header in the source (either *.c or *.h)
@@ -1119,6 +1119,9 @@ test-wrap-argv:
$(AM_V_GEN)files=`$(VC_LIST) | grep -E '\.(ldargs|args)'`; \
$(PERL) $(top_srcdir)/tests/test-wrap-argv.pl --check $$files
group-qemu-caps:
$(PERL) $(top_srcdir)/tests/group-qemu-caps.pl --check
# sc_po_check can fail if generated files are not built first
sc_po_check: \
$(srcdir)/src/remote/remote_daemon_dispatch_stubs.h \