diff options
author | Simon Glass <sjg@chromium.org> | 2014-09-05 19:00:16 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2014-09-09 16:38:29 -0600 |
commit | 823e60b62a98061a662536093d46f8f26f6d318f (patch) | |
tree | 4fcdfcb64241665c7b713eadfe33fef83ef777fc /tools/buildman/control.py | |
parent | 8b985eebd0f7582614399fdf6c108a81ab446ae7 (diff) |
buildman: Allow tests to have their own boards
Rather than reading boards.cfg, which may take time to generate and is not
necessarily suitable for running tests, create our own list of boards.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman/control.py')
-rw-r--r-- | tools/buildman/control.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/tools/buildman/control.py b/tools/buildman/control.py index c8eeb6ac45..fb15ae89c8 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -78,7 +78,7 @@ def ShowActions(series, why_selected, boards_selected, builder, options): print ('Total boards to build for each commit: %d\n' % why_selected['all']) -def DoBuildman(options, args, toolchains=None, make_func=None): +def DoBuildman(options, args, toolchains=None, make_func=None, boards=None): """The main control code for buildman Args: @@ -90,6 +90,8 @@ def DoBuildman(options, args, toolchains=None, make_func=None): 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 + boards. If this is None it will be created and scanned. """ if options.full_help: pager = os.getenv('PAGER') @@ -135,14 +137,15 @@ def DoBuildman(options, args, toolchains=None, make_func=None): sys.exit(col.Color(col.RED, str)) # Work out what subset of the boards we are building - board_file = os.path.join(options.git, 'boards.cfg') - status = subprocess.call([os.path.join(options.git, - 'tools/genboardscfg.py')]) - if status != 0: - sys.exit("Failed to generate boards.cfg") - - boards = board.Boards() - boards.ReadBoards(os.path.join(options.git, 'boards.cfg')) + if not boards: + board_file = os.path.join(options.git, 'boards.cfg') + status = subprocess.call([os.path.join(options.git, + 'tools/genboardscfg.py')]) + if status != 0: + sys.exit("Failed to generate boards.cfg") + + boards = board.Boards() + boards.ReadBoards(os.path.join(options.git, 'boards.cfg')) exclude = [] if options.exclude: |