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

Side by Side Diff: buildbot/cbuildbot_stages.py

Issue 6773013: Add the ability to pass use flags through cbuildbot to build_packages. (Closed) Base URL: http://git.chromium.org/git/chromite.git@master
Patch Set: Renamed a variable Created 9 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Module containing the various stages that a builder runs.""" 5 """Module containing the various stages that a builder runs."""
6 6
7 import os 7 import os
8 import re 8 import re
9 import sys 9 import sys
10 import tempfile 10 import tempfile
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 312
313 class BuildTargetStage(BuilderStage): 313 class BuildTargetStage(BuilderStage):
314 """This stage builds Chromium OS for a target. 314 """This stage builds Chromium OS for a target.
315 315
316 Specifically, we build Chromium OS packages and perform imaging to get 316 Specifically, we build Chromium OS packages and perform imaging to get
317 the images we want per the build spec.""" 317 the images we want per the build spec."""
318 def _PerformStage(self): 318 def _PerformStage(self):
319 BuilderStage.new_binhost = self._GetPortageEnvVar(_FULL_BINHOST) 319 BuilderStage.new_binhost = self._GetPortageEnvVar(_FULL_BINHOST)
320 emptytree = (BuilderStage.old_binhost and 320 emptytree = (BuilderStage.old_binhost and
321 BuilderStage.old_binhost != BuilderStage.new_binhost) 321 BuilderStage.old_binhost != BuilderStage.new_binhost)
322 env=[]
323 if self._build_config['useflags']:
324 if isinstance(self._build_config['useflags'], basestring):
sosa 2011/04/01 00:01:11 Choose one or the other ...i.e. allow string or ar
Peter Mayo 2011/04/01 02:46:05 I think array may eventually be required, but sinc
325 env.append('USE=%s' % self._build_config['useflags'])
326 else:
327 env.append('USE="%s"' % ' '.join(self._build_config['useflags']))
322 328
329 # TODO(petermayo): Add other extra env variable when asked.
sosa 2011/04/01 00:01:11 Remove this TODO
Peter Mayo 2011/04/01 02:46:05 Done.
323 commands.Build( 330 commands.Build(
324 self._build_root, emptytree, usepkg=self._build_config['usepkg'], 331 self._build_root, emptytree, usepkg=self._build_config['usepkg'],
325 build_autotest=(self._build_config['vm_tests'] and self._options.tests)) 332 build_autotest=(self._build_config['vm_tests'] and self._options.tests),
333 extra_env=env)
326 334
327 # TODO(sosa): Do this optimization in a better way. 335 # TODO(sosa): Do this optimization in a better way.
328 if self._build_type == 'full': 336 if self._build_type == 'full':
329 commands.UploadPrebuilts( 337 commands.UploadPrebuilts(
330 self._build_root, self._build_config['board'], 338 self._build_root, self._build_config['board'],
331 self._build_config['rev_overlays'], [], self._build_type, 339 self._build_config['rev_overlays'], [], self._build_type,
332 False) 340 False)
333 341
334 commands.BuildImage(self._build_root) 342 commands.BuildImage(self._build_root)
335 343
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 def _PerformStage(self): 400 def _PerformStage(self):
393 if self._build_type in ('preflight', 'chrome'): 401 if self._build_type in ('preflight', 'chrome'):
394 commands.UploadPrebuilts( 402 commands.UploadPrebuilts(
395 self._build_root, self._build_config['board'], 403 self._build_root, self._build_config['board'],
396 self._build_config['rev_overlays'], [BuilderStage.new_binhost], 404 self._build_config['rev_overlays'], [BuilderStage.new_binhost],
397 self._build_type, self._options.chrome_rev) 405 self._build_type, self._options.chrome_rev)
398 406
399 commands.UprevPush(self._build_root, self._options.tracking_branch, 407 commands.UprevPush(self._build_root, self._options.tracking_branch,
400 self._build_config['board'], BuilderStage.push_overlays, 408 self._build_config['board'], BuilderStage.push_overlays,
401 self._options.debug) 409 self._options.debug)
OLDNEW
« buildbot/cbuildbot_commands.py ('K') | « buildbot/cbuildbot_commands.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698