Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3232)

Unified Diff: buildbot/cbuildbot_commands.py

Issue 6840064: Restart codereview issue 6792042 (Closed) Base URL: http://git.chromium.org/git/chromite.git@master
Patch Set: Fixed shell case, and prebuilt not to exercise it. Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | buildbot/cbuildbot_commands_unittest.py » ('j') | buildbot/cbuildbot_config.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: buildbot/cbuildbot_commands.py
diff --git a/buildbot/cbuildbot_commands.py b/buildbot/cbuildbot_commands.py
index b11c2b7071096179c5ef000f9c583d5d7758cb29..48e8a5f68526c731c224d7f77871f4961f6d6ece 100644
--- a/buildbot/cbuildbot_commands.py
+++ b/buildbot/cbuildbot_commands.py
@@ -180,35 +180,39 @@ def SetupBoard(buildroot, board='x86-generic'):
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:
- cmd = ['sh', '-c', 'EXTRA_BOARD_FLAGS=--emptytree %s' % ' '.join(cmd)]
+ env['EXTRA_BOARD_FLAGS'] = '--emptytree'
+ if extra_env:
+ env.update(extra_env)
dgarrett 2011/04/18 21:17:38 Shouldn't --emptytree be appended to the env value
Peter Mayo 2011/04/19 03:59:39 Seems like overkill, but sure. Similarly, I don't
- cros_lib.OldRunCommand(cmd, cwd=cwd, enter_chroot=True)
+ cros_lib.RunCommand(cmd, cwd=cwd, enter_chroot=True, extra_env=env)
-def BuildImage(buildroot):
+def BuildImage(buildroot, extra_env=None):
_WipeOldOutput(buildroot)
cwd = os.path.join(buildroot, 'src', 'scripts')
- cros_lib.OldRunCommand(['./build_image', '--replace'], cwd=cwd,
- enter_chroot=True)
+ cros_lib.RunCommand(['./build_image', '--replace'], cwd=cwd,
+ enter_chroot=True, extra_env=extra_env)
-def BuildVMImageForTesting(buildroot):
+def BuildVMImageForTesting(buildroot, extra_env=None):
(vdisk_size, statefulfs_size) = _GetVMConstants(buildroot)
cwd = os.path.join(buildroot, 'src', 'scripts')
- cros_lib.OldRunCommand(['./image_to_vm.sh',
- '--test_image',
- '--full',
- '--vdisk_size=%s' % vdisk_size,
- '--statefulfs_size=%s' % statefulfs_size,
- ], cwd=cwd, enter_chroot=True)
+ cros_lib.RunCommand(['./image_to_vm.sh',
+ '--test_image',
+ '--full',
+ '--vdisk_size=%s' % vdisk_size,
+ '--statefulfs_size=%s' % statefulfs_size,
+ ], cwd=cwd, enter_chroot=True, extra_env=extra_env)
def RunUnitTests(buildroot, full):
« no previous file with comments | « no previous file | buildbot/cbuildbot_commands_unittest.py » ('j') | buildbot/cbuildbot_config.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698