All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] utils/check-package: Add a quiet flag
@ 2019-07-03 21:34 Arnout Vandecappelle
  2019-07-03 22:18 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Arnout Vandecappelle @ 2019-07-03 21:34 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=44af8386f83ed042591fa089dbf01e373c8424ad
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

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>
---
 utils/check-package | 7 +++++--
 1 file 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)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [git commit] utils/check-package: Add a quiet flag
  2019-07-03 21:34 [Buildroot] [git commit] utils/check-package: Add a quiet flag Arnout Vandecappelle
@ 2019-07-03 22:18 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2019-07-03 22:18 UTC (permalink / raw)
  To: buildroot

>>>>> "Arnout" == Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> writes:

 > commit: https://git.buildroot.net/buildroot/commit/?id=44af8386f83ed042591fa089dbf01e373c8424ad
 > branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

 > 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>
 > ---
 >  utils/check-package | 7 +++++--
 >  1 file 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)

As we don't have multiple level of quietness, action="store_true" would
probably have made mode sense:

https://docs.python.org/3/library/argparse.html#action

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-03 22:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-03 21:34 [Buildroot] [git commit] utils/check-package: Add a quiet flag Arnout Vandecappelle
2019-07-03 22:18 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.