[libvirt PATCH 1/5] syntax-check: Rework mock-noinline to get all files at once

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 build-aux/syntax-check.mk | 2 +-
 scripts/mock-noinline.py  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk
index 9407581d0eb3..a8c9153b20ae 100644
--- a/build-aux/syntax-check.mk
+++ b/build-aux/syntax-check.mk
@@ -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:
diff --git a/scripts/mock-noinline.py b/scripts/mock-noinline.py
index 712550cb7a4c..13c296603d3a 100644
--- a/scripts/mock-noinline.py
+++ b/scripts/mock-noinline.py
@@ -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"):
-- 
2.35.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux