buildman: Allow showing the list of boards with -n
As well as showing the number of boards, allow showing the actual list of boards that would be built, if -v is provided. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
147f785f67
commit
8d7523c55c
@ -141,7 +141,7 @@ means to build all arm boards except nvidia, freescale and anything ending
|
|||||||
with 'ball'.
|
with 'ball'.
|
||||||
|
|
||||||
It is convenient to use the -n option to see what will be built based on
|
It is convenient to use the -n option to see what will be built based on
|
||||||
the subset given.
|
the subset given. Use -v as well to get an actual list of boards.
|
||||||
|
|
||||||
Buildman does not store intermediate object files. It optionally copies
|
Buildman does not store intermediate object files. It optionally copies
|
||||||
the binary output into a directory when a build is successful. Size
|
the binary output into a directory when a build is successful. Size
|
||||||
|
@ -249,15 +249,15 @@ class Boards:
|
|||||||
exclude: List of boards to exclude, regardless of 'args'
|
exclude: List of boards to exclude, regardless of 'args'
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Dictionary which holds the number of boards which were selected
|
Dictionary which holds the list of boards which were selected
|
||||||
due to each argument, arranged by argument.
|
due to each argument, arranged by argument.
|
||||||
"""
|
"""
|
||||||
result = {}
|
result = {}
|
||||||
terms = self._BuildTerms(args)
|
terms = self._BuildTerms(args)
|
||||||
|
|
||||||
result['all'] = 0
|
result['all'] = []
|
||||||
for term in terms:
|
for term in terms:
|
||||||
result[str(term)] = 0
|
result[str(term)] = []
|
||||||
|
|
||||||
exclude_list = []
|
exclude_list = []
|
||||||
for expr in exclude:
|
for expr in exclude:
|
||||||
@ -285,7 +285,7 @@ class Boards:
|
|||||||
if build_it:
|
if build_it:
|
||||||
board.build_it = True
|
board.build_it = True
|
||||||
if matching_term:
|
if matching_term:
|
||||||
result[matching_term] += 1
|
result[matching_term].append(board.target)
|
||||||
result['all'] += 1
|
result['all'].append(board.target)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
@ -48,9 +48,9 @@ def ShowActions(series, why_selected, boards_selected, builder, options):
|
|||||||
Args:
|
Args:
|
||||||
series: Series object
|
series: Series object
|
||||||
why_selected: Dictionary where each key is a buildman argument
|
why_selected: Dictionary where each key is a buildman argument
|
||||||
provided by the user, and the value is the boards brought
|
provided by the user, and the value is the list of boards
|
||||||
in by that argument. For example, 'arm' might bring in
|
brought in by that argument. For example, 'arm' might bring
|
||||||
400 boards, so in this case the key would be 'arm' and
|
in 400 boards, so in this case the key would be 'arm' and
|
||||||
the value would be a list of board names.
|
the value would be a list of board names.
|
||||||
boards_selected: Dict of selected boards, key is target name,
|
boards_selected: Dict of selected boards, key is target name,
|
||||||
value is Board object
|
value is Board object
|
||||||
@ -75,9 +75,11 @@ def ShowActions(series, why_selected, boards_selected, builder, options):
|
|||||||
print
|
print
|
||||||
for arg in why_selected:
|
for arg in why_selected:
|
||||||
if arg != 'all':
|
if arg != 'all':
|
||||||
print arg, ': %d boards' % why_selected[arg]
|
print arg, ': %d boards' % len(why_selected[arg])
|
||||||
|
if options.verbose:
|
||||||
|
print ' %s' % ' '.join(why_selected[arg])
|
||||||
print ('Total boards to build for each commit: %d\n' %
|
print ('Total boards to build for each commit: %d\n' %
|
||||||
why_selected['all'])
|
len(why_selected['all']))
|
||||||
|
|
||||||
def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
|
def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
|
||||||
clean_dir=False):
|
clean_dir=False):
|
||||||
@ -221,9 +223,10 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
|
|||||||
options.git_dir, count, series=None, allow_overwrite=True)
|
options.git_dir, count, series=None, allow_overwrite=True)
|
||||||
else:
|
else:
|
||||||
series = None
|
series = None
|
||||||
options.verbose = True
|
if not options.dry_run:
|
||||||
if not options.summary:
|
options.verbose = True
|
||||||
options.show_errors = True
|
if not options.summary:
|
||||||
|
options.show_errors = True
|
||||||
|
|
||||||
# By default we have one thread per CPU. But if there are not enough jobs
|
# By default we have one thread per CPU. But if there are not enough jobs
|
||||||
# we can have fewer threads and use a high '-j' value for make.
|
# we can have fewer threads and use a high '-j' value for make.
|
||||||
|
Loading…
Reference in New Issue
Block a user