Chromium Code Reviews| Index: buildbot/cbuildbot_commands.py |
| diff --git a/buildbot/cbuildbot_commands.py b/buildbot/cbuildbot_commands.py |
| index c942fc8411e3e81e9c48be336bee6130a152f236..6d6ec5b3899673f69dc2c30f072b0bc8490b98fe 100644 |
| --- a/buildbot/cbuildbot_commands.py |
| +++ b/buildbot/cbuildbot_commands.py |
| @@ -151,15 +151,20 @@ def SetupBoard(buildroot, board='x86-generic'): |
| ['./setup_board', '--fast', '--default', '--board=%s' % board], cwd=cwd, |
| enter_chroot=True) |
| - |
| -def Build(buildroot, emptytree, build_autotest=True, usepkg=True): |
| +def Build(buildroot, emptytree, build_autotest=True, usepkg=True, |
| + extra_env=None): |
| """Wrapper around build_packages.""" |
| cwd = os.path.join(buildroot, 'src', 'scripts') |
| cmd = ['./build_packages'] |
| + env = [] |
| if not build_autotest: cmd.append('--nowithautotest') |
| if not usepkg: cmd.append('--nousepkg') |
| if emptytree: |
|
Peter Mayo
2011/03/31 15:05:04
In your review, please consider and record an opin
|
| - cmd = ['sh', '-c', 'EXTRA_BOARD_FLAGS=--emptytree %s' % ' '.join(cmd)] |
| + env.append('EXTRA_BOARD_FLAGS=--emptytree') |
| + if extra_env: |
| + env.extend(extra_env) |
| + if env: |
| + cmd = ['sh', '-c', '%s %s' % (' '.join(env), ' '.join(cmd))] |
| cros_lib.OldRunCommand(cmd, cwd=cwd, enter_chroot=True) |