utils/check-package: Add a quiet flag
When running in a CI system, stat messages become white noise. Introduce an option to suppress non-error, non-warning, messages. Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
parent
e7d8d9a765
commit
44af8386f8
|
@ -33,6 +33,7 @@ def parse_args():
|
||||||
default="http://nightly.buildroot.org/",
|
default="http://nightly.buildroot.org/",
|
||||||
help="default: %(default)s")
|
help="default: %(default)s")
|
||||||
parser.add_argument("--verbose", "-v", action="count", default=0)
|
parser.add_argument("--verbose", "-v", action="count", default=0)
|
||||||
|
parser.add_argument("--quiet", "-q", action="count", default=0)
|
||||||
|
|
||||||
# Now the debug options in the order they are processed.
|
# Now the debug options in the order they are processed.
|
||||||
parser.add_argument("--include-only", dest="include_list", action="append",
|
parser.add_argument("--include-only", dest="include_list", action="append",
|
||||||
|
@ -177,8 +178,10 @@ def __main__():
|
||||||
# (e.g. counted by 'wc'), so for stats use stderr. Wait all warnings are
|
# (e.g. counted by 'wc'), so for stats use stderr. Wait all warnings are
|
||||||
# printed, for the case there are many of them, before printing stats.
|
# printed, for the case there are many of them, before printing stats.
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
print("{} lines processed".format(total_lines), file=sys.stderr)
|
|
||||||
print("{} warnings generated".format(total_warnings), file=sys.stderr)
|
if not flags.quiet:
|
||||||
|
print("{} lines processed".format(total_lines), file=sys.stderr)
|
||||||
|
print("{} warnings generated".format(total_warnings), file=sys.stderr)
|
||||||
|
|
||||||
if total_warnings > 0:
|
if total_warnings > 0:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
Loading…
Reference in a new issue