]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
syntax-check: Rework mock-noinline to get all files at once
authorMartin Kletzander <mkletzan@redhat.com>
Thu, 3 Mar 2022 12:14:18 +0000 (13:14 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 7 Mar 2022 09:31:21 +0000 (10:31 +0100)
The script can break if the number of files does not fit one invocation and
xargs has to split it.  Instead pipe the list of files directly into the script
and in the script read them from stdin instead of the arguments.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
build-aux/syntax-check.mk
scripts/mock-noinline.py

index 9407581d0eb39c9d9c96da8d42b78932f3a220dc..a8c9153b20aed11b3955a159bf716f6c62a7d23a 100644 (file)
@@ -1549,7 +1549,7 @@ sc_spacing-check:
          { echo '$(ME): incorrect formatting' 1>&2; exit 1; }
 
 sc_mock-noinline:
-       $(AM_V_GEN)$(VC_LIST_EXCEPT) | $(GREP) '\.[ch]$$' | $(RUNUTF8) xargs \
+       $(AM_V_GEN)$(VC_LIST_EXCEPT) | $(GREP) '\.[ch]$$' | $(RUNUTF8) \
        $(PYTHON) $(top_srcdir)/scripts/mock-noinline.py
 
 sc_header-ifdef:
index 712550cb7a4c457044d4342f954e50ac7c319b11..13c296603d3a88237c524e670c2cc18027213b48 100644 (file)
@@ -63,7 +63,7 @@ def scan_overrides(filename):
                     mocked[name] = "%s:%d" % (filename, lineno)
 
 
-for filename in sys.argv[1:]:
+for filename in sys.stdin.readlines():
     if filename.endswith(".h"):
         scan_annotations(filename)
     elif filename.endswith("mock.c"):