aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Brandon Maier <brandon.maier@rockwellcollins.com>2019-07-02 13:52:27 -0500
committerGravatar Peter Korsgaard <peter@korsgaard.com>2019-07-07 08:42:09 +0200
commit036a9add4b56c3025b2c4d91031b7b908efaa54b (patch)
treebea3ed19d4eab825cc42ea5b55ef146396e5a1c7
parent769ce63723a33c48ab4b5d22ad7a22abde699735 (diff)
downloadbuildroot-036a9add4b56c3025b2c4d91031b7b908efaa54b.tar.gz
buildroot-036a9add4b56c3025b2c4d91031b7b908efaa54b.tar.bz2
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> (cherry picked from commit 44af8386f83ed042591fa089dbf01e373c8424ad) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rwxr-xr-xutils/check-package7
1 files changed, 5 insertions, 2 deletions
diff --git a/utils/check-package b/utils/check-package
index ce1fe98d67..f09aaeea03 100755
--- a/utils/check-package
+++ b/utils/check-package
@@ -33,6 +33,7 @@ def parse_args():
default="http://nightly.buildroot.org/",
help="default: %(default)s")
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.
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
# printed, for the case there are many of them, before printing stats.
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:
sys.exit(1)