boards: List of Board objects which have line in the error/warning output
errline: The text of the error line
"""
-ErrLine = collections.namedtuple('ErrLine', 'char,boards,errline')
+ErrLine = collections.namedtuple('ErrLine', 'char,brds,errline')
# Possible build outcomes
OUTCOME_OK, OUTCOME_WARNING, OUTCOME_ERROR, OUTCOME_UNKNOWN = list(range(4))
List of boards with that error line, or [] if the user has not
requested such a list
"""
- boards = []
+ brds = []
board_set = set()
if self._list_error_boards:
for brd in line_boards[line]:
if not brd in board_set:
- boards.append(brd)
+ brds.append(brd)
board_set.add(brd)
- return boards
+ return brds
def _CalcErrorDelta(base_lines, base_line_boards, lines, line_boards,
char):
if err_lines:
out_list = []
for line in err_lines:
- boards = ''
- names = [brd.target for brd in line.boards]
+ names = [brd.target for brd in line.brds]
board_str = ' '.join(names) if names else ''
if board_str:
out = self.col.build(colour, line.char + '(')
for warning in board_warnings:
print(col.build(col.YELLOW, warning))
-def ShowToolchainPrefix(boards, toolchains):
+def ShowToolchainPrefix(brds, toolchains):
"""Show information about a the tool chain used by one or more boards
The function checks that all boards use the same toolchain, then prints
Return:
None on success, string error message otherwise
"""
- boards = boards.GetSelectedDict()
+ board_selected = brds.GetSelectedDict()
tc_set = set()
- for brd in boards.values():
+ for brd in board_selected.values():
tc_set.add(toolchains.Select(brd.arch))
if len(tc_set) != 1:
return 'Supplied boards must share one toolchain'
print(tc.GetEnvArgs(toolchain.VAR_CROSS_COMPILE))
return None
-def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
+def DoBuildman(options, args, toolchains=None, make_func=None, brds=None,
clean_dir=False, test_thread_exceptions=False):
"""The main control code for buildman
to execute 'make'. If this is None, the normal function
will be used, which calls the 'make' tool with suitable
arguments. This setting is useful for tests.
- board: Boards() object to use, containing a list of available
+ brds: Boards() object to use, containing a list of available
boards. If this is None it will be created and scanned.
clean_dir: Used for tests only, indicates that the existing output_dir
should be removed before starting the build
options.output_dir = '..'
# Work out what subset of the boards we are building
- if not boards:
+ if not brds:
if not os.path.exists(options.output_dir):
os.makedirs(options.output_dir)
board_file = os.path.join(options.output_dir, 'boards.cfg')
if status != 0:
sys.exit("Failed to generate boards.cfg")
- boards = board.Boards()
- boards.ReadBoards(board_file)
+ brds = board.Boards()
+ brds.ReadBoards(board_file)
exclude = []
if options.exclude:
requested_boards += b.split(',')
else:
requested_boards = None
- why_selected, board_warnings = boards.SelectBoards(args, exclude,
- requested_boards)
- selected = boards.GetSelected()
+ why_selected, board_warnings = brds.SelectBoards(args, exclude,
+ requested_boards)
+ selected = brds.GetSelected()
if not len(selected):
sys.exit(col.build(col.RED, 'No matching boards found'))
if options.print_prefix:
- err = ShowToolchainPrefix(boards, toolchains)
+ err = ShowToolchainPrefix(brds, toolchains)
if err:
sys.exit(col.build(col.RED, err))
return 0
builder.in_tree = options.in_tree
# Work out which boards to build
- board_selected = boards.GetSelectedDict()
+ board_selected = brds.GetSelectedDict()
if series:
commits = series.commits