mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-20 11:55:03 +00:00
buildman: Move dry-run handling higher in do_buildman()
Move this up above where the builder is created, since it no-longer makes use of the builder. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
d233dfb07d
commit
f0207d77b5
1 changed files with 43 additions and 41 deletions
|
@ -395,6 +395,13 @@ def do_buildman(options, args, toolchains=None, make_func=None, brds=None,
|
||||||
output_dir = os.path.join(options.output_dir, dirname)
|
output_dir = os.path.join(options.output_dir, dirname)
|
||||||
if clean_dir and os.path.exists(output_dir):
|
if clean_dir and os.path.exists(output_dir):
|
||||||
shutil.rmtree(output_dir)
|
shutil.rmtree(output_dir)
|
||||||
|
|
||||||
|
# For a dry run, just show our actions as a sanity check
|
||||||
|
if options.dry_run:
|
||||||
|
show_actions(series, why_selected, selected, output_dir, options,
|
||||||
|
board_warnings)
|
||||||
|
return 0
|
||||||
|
|
||||||
adjust_cfg = cfgutil.convert_list_to_dict(options.adjust_cfg)
|
adjust_cfg = cfgutil.convert_list_to_dict(options.adjust_cfg)
|
||||||
|
|
||||||
# Drop LOCALVERSION_AUTO since it changes the version string on every commit
|
# Drop LOCALVERSION_AUTO since it changes the version string on every commit
|
||||||
|
@ -425,48 +432,43 @@ def do_buildman(options, args, toolchains=None, make_func=None, brds=None,
|
||||||
if make_func:
|
if make_func:
|
||||||
builder.do_make = make_func
|
builder.do_make = make_func
|
||||||
|
|
||||||
# For a dry run, just show our actions as a sanity check
|
builder.force_build = options.force_build
|
||||||
if options.dry_run:
|
builder.force_build_failures = options.force_build_failures
|
||||||
show_actions(series, why_selected, selected, output_dir, options,
|
builder.force_reconfig = options.force_reconfig
|
||||||
board_warnings)
|
builder.in_tree = options.in_tree
|
||||||
|
|
||||||
|
# Work out which boards to build
|
||||||
|
board_selected = brds.get_selected_dict()
|
||||||
|
|
||||||
|
if series:
|
||||||
|
commits = series.commits
|
||||||
|
# Number the commits for test purposes
|
||||||
|
for i, commit in enumerate(commits):
|
||||||
|
commit.sequence = i
|
||||||
else:
|
else:
|
||||||
builder.force_build = options.force_build
|
commits = None
|
||||||
builder.force_build_failures = options.force_build_failures
|
|
||||||
builder.force_reconfig = options.force_reconfig
|
|
||||||
builder.in_tree = options.in_tree
|
|
||||||
|
|
||||||
# Work out which boards to build
|
if not options.ide:
|
||||||
board_selected = brds.get_selected_dict()
|
tprint(get_action_summary(options.summary, commits, board_selected,
|
||||||
|
options))
|
||||||
|
|
||||||
if series:
|
# We can't show function sizes without board details at present
|
||||||
commits = series.commits
|
if options.show_bloat:
|
||||||
# Number the commits for test purposes
|
options.show_detail = True
|
||||||
for i, commit in enumerate(commits):
|
builder.SetDisplayOptions(
|
||||||
commit.sequence = i
|
options.show_errors, options.show_sizes, options.show_detail,
|
||||||
else:
|
options.show_bloat, options.list_error_boards, options.show_config,
|
||||||
commits = None
|
options.show_environment, options.filter_dtb_warnings,
|
||||||
|
options.filter_migration_warnings, options.ide)
|
||||||
if not options.ide:
|
if options.summary:
|
||||||
tprint(get_action_summary(options.summary, commits, board_selected,
|
builder.ShowSummary(commits, board_selected)
|
||||||
options))
|
else:
|
||||||
|
fail, warned, excs = builder.BuildBoards(
|
||||||
# We can't show function sizes without board details at present
|
commits, board_selected, options.keep_outputs, options.verbose)
|
||||||
if options.show_bloat:
|
if excs:
|
||||||
options.show_detail = True
|
return 102
|
||||||
builder.SetDisplayOptions(
|
if fail:
|
||||||
options.show_errors, options.show_sizes, options.show_detail,
|
return 100
|
||||||
options.show_bloat, options.list_error_boards, options.show_config,
|
if warned and not options.ignore_warnings:
|
||||||
options.show_environment, options.filter_dtb_warnings,
|
return 101
|
||||||
options.filter_migration_warnings, options.ide)
|
|
||||||
if options.summary:
|
|
||||||
builder.ShowSummary(commits, board_selected)
|
|
||||||
else:
|
|
||||||
fail, warned, excs = builder.BuildBoards(
|
|
||||||
commits, board_selected, options.keep_outputs, options.verbose)
|
|
||||||
if excs:
|
|
||||||
return 102
|
|
||||||
if fail:
|
|
||||||
return 100
|
|
||||||
if warned and not options.ignore_warnings:
|
|
||||||
return 101
|
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue