mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-09-05 01:45:04 +03:00
syntax-check: Rework mock-noinline to get all files at once
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>
This commit is contained in:
@@ -1549,7 +1549,7 @@ sc_spacing-check:
|
|||||||
{ echo '$(ME): incorrect formatting' 1>&2; exit 1; }
|
{ echo '$(ME): incorrect formatting' 1>&2; exit 1; }
|
||||||
|
|
||||||
sc_mock-noinline:
|
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
|
$(PYTHON) $(top_srcdir)/scripts/mock-noinline.py
|
||||||
|
|
||||||
sc_header-ifdef:
|
sc_header-ifdef:
|
||||||
|
@@ -63,7 +63,7 @@ def scan_overrides(filename):
|
|||||||
mocked[name] = "%s:%d" % (filename, lineno)
|
mocked[name] = "%s:%d" % (filename, lineno)
|
||||||
|
|
||||||
|
|
||||||
for filename in sys.argv[1:]:
|
for filename in sys.stdin.readlines():
|
||||||
if filename.endswith(".h"):
|
if filename.endswith(".h"):
|
||||||
scan_annotations(filename)
|
scan_annotations(filename)
|
||||||
elif filename.endswith("mock.c"):
|
elif filename.endswith("mock.c"):
|
||||||
|
Reference in New Issue
Block a user