diff options
Diffstat (limited to 'tools/buildman/control.py')
-rw-r--r-- | tools/buildman/control.py | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/tools/buildman/control.py b/tools/buildman/control.py index bc0819784f..96f8ccfe07 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py | |||
@@ -41,7 +41,8 @@ def GetActionSummary(is_summary, commits, selected, options): | |||
41 | GetPlural(options.threads), options.jobs, GetPlural(options.jobs)) | 41 | GetPlural(options.threads), options.jobs, GetPlural(options.jobs)) |
42 | return str | 42 | return str |
43 | 43 | ||
44 | def ShowActions(series, why_selected, boards_selected, builder, options): | 44 | def ShowActions(series, why_selected, boards_selected, builder, options, |
45 | board_warnings): | ||
45 | """Display a list of actions that we would take, if not a dry run. | 46 | """Display a list of actions that we would take, if not a dry run. |
46 | 47 | ||
47 | Args: | 48 | Args: |
@@ -55,6 +56,7 @@ def ShowActions(series, why_selected, boards_selected, builder, options): | |||
55 | value is Board object | 56 | value is Board object |
56 | builder: The builder that will be used to build the commits | 57 | builder: The builder that will be used to build the commits |
57 | options: Command line options object | 58 | options: Command line options object |
59 | board_warnings: List of warnings obtained from board selected | ||
58 | """ | 60 | """ |
59 | col = terminal.Color() | 61 | col = terminal.Color() |
60 | print 'Dry run, so not doing much. But I would do this:' | 62 | print 'Dry run, so not doing much. But I would do this:' |
@@ -79,6 +81,9 @@ def ShowActions(series, why_selected, boards_selected, builder, options): | |||
79 | print ' %s' % ' '.join(why_selected[arg]) | 81 | print ' %s' % ' '.join(why_selected[arg]) |
80 | print ('Total boards to build for each commit: %d\n' % | 82 | print ('Total boards to build for each commit: %d\n' % |
81 | len(why_selected['all'])) | 83 | len(why_selected['all'])) |
84 | if board_warnings: | ||
85 | for warning in board_warnings: | ||
86 | print col.Color(col.YELLOW, warning) | ||
82 | 87 | ||
83 | def CheckOutputDir(output_dir): | 88 | def CheckOutputDir(output_dir): |
84 | """Make sure that the output directory is not within the current directory | 89 | """Make sure that the output directory is not within the current directory |
@@ -210,7 +215,15 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None, | |||
210 | for arg in options.exclude: | 215 | for arg in options.exclude: |
211 | exclude += arg.split(',') | 216 | exclude += arg.split(',') |
212 | 217 | ||
213 | why_selected = boards.SelectBoards(args, exclude) | 218 | |
219 | if options.boards: | ||
220 | requested_boards = [] | ||
221 | for b in options.boards: | ||
222 | requested_boards += b.split(',') | ||
223 | else: | ||
224 | requested_boards = None | ||
225 | why_selected, board_warnings = boards.SelectBoards(args, exclude, | ||
226 | requested_boards) | ||
214 | selected = boards.GetSelected() | 227 | selected = boards.GetSelected() |
215 | if not len(selected): | 228 | if not len(selected): |
216 | sys.exit(col.Color(col.RED, 'No matching boards found')) | 229 | sys.exit(col.Color(col.RED, 'No matching boards found')) |
@@ -292,7 +305,8 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None, | |||
292 | 305 | ||
293 | # For a dry run, just show our actions as a sanity check | 306 | # For a dry run, just show our actions as a sanity check |
294 | if options.dry_run: | 307 | if options.dry_run: |
295 | ShowActions(series, why_selected, selected, builder, options) | 308 | ShowActions(series, why_selected, selected, builder, options, |
309 | board_warnings) | ||
296 | else: | 310 | else: |
297 | builder.force_build = options.force_build | 311 | builder.force_build = options.force_build |
298 | builder.force_build_failures = options.force_build_failures | 312 | builder.force_build_failures = options.force_build_failures |