aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass2019-12-05 15:59:11 -0700
committerSimon Glass2019-12-10 21:11:30 -0700
commit69bbdd112bd3d2d6650cb2d81cd583400cef49c7 (patch)
treee7fde9bb6ca9f47f2b9bfba14975a8e10289a147 /tools
parentcb105794848a372d79ce2c8f6350f1eb5d7a60f1 (diff)
genboardcfg: Support a quiet mode
We don't really need buildman to print this every time it runs. Add a flag to run quietly, that buildman can use. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/genboardscfg.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/genboardscfg.py b/tools/genboardscfg.py
index 4ff0bffaefa..24df13e5008 100755
--- a/tools/genboardscfg.py
+++ b/tools/genboardscfg.py
@@ -403,18 +403,20 @@ def format_and_output(params_list, output):
with open(output, 'w', encoding="utf-8") as f:
f.write(COMMENT_BLOCK + '\n'.join(output_lines) + '\n')
-def gen_boards_cfg(output, jobs=1, force=False):
+def gen_boards_cfg(output, jobs=1, force=False, quiet=False):
"""Generate a board database file.
Arguments:
output: The name of the output file
jobs: The number of jobs to run simultaneously
force: Force to generate the output even if it is new
+ quiet: True to avoid printing a message if nothing needs doing
"""
check_top_directory()
if not force and output_is_new(output):
- print("%s is up to date. Nothing to do." % output)
+ if not quiet:
+ print("%s is up to date. Nothing to do." % output)
sys.exit(0)
params_list = scan_defconfigs(jobs)
@@ -435,9 +437,11 @@ def main():
help='the number of jobs to run simultaneously')
parser.add_option('-o', '--output', default=OUTPUT_FILE,
help='output file [default=%s]' % OUTPUT_FILE)
+ parser.add_option('-q', '--quiet', action="store_true", help='run silently')
(options, args) = parser.parse_args()
- gen_boards_cfg(options.output, jobs=options.jobs, force=options.force)
+ gen_boards_cfg(options.output, jobs=options.jobs, force=options.force,
+ quiet=options.quiet)
if __name__ == '__main__':
main()