Update Chrome checkout when needed.
Currently, the Chrome checkout is only managed by cbuildbot for builders that
always build Chrome. I've updated cbuildbot to manage Chrome whenever Rietveld
patches are supplied, so that you can pass Rietveld patches to any bot.
I've also updated the ASAN bot to use a managed version of Chrome, because
this makes the logs for the bot easier to read (e.g., you don't have 10 pages
of gclient sync output in the build log.)
BUG=chromium-os:38903
TEST=Remote trybot runs.
Change-Id: Id505891db94f3d16ee690255ac749c90e021b664
Reviewed-on: https://gerrit.chromium.org/gerrit/43528
Reviewed-by: Peter Mayo <petermayo@chromium.org>
Commit-Queue: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
diff --git a/scripts/cbuildbot.py b/scripts/cbuildbot.py
index 36cc8dc..d0210db 100644
--- a/scripts/cbuildbot.py
+++ b/scripts/cbuildbot.py
@@ -607,8 +607,11 @@
options.chrome_version = gclient.GetTipOfTrunkSvnRevision(svn_url)
options.chrome_rev = constants.CHROME_REV_SPEC
+ # If it's likely we'll need to build Chrome, fetch the source.
options.managed_chrome = (chrome_rev != constants.CHROME_REV_LOCAL and
- (not build_config['usepkg_build_packages'] or chrome_rev))
+ (not build_config['usepkg_build_packages'] or chrome_rev or
+ build_config['useflags'] or build_config['profile'] or
+ options.rietveld_patches))
if options.managed_chrome:
# Tell Chrome to fetch the source locally.
@@ -617,7 +620,7 @@
options.chrome_root = os.path.join(options.cache_dir, 'distfiles', 'target',
chrome_src)
elif options.rietveld_patches:
- cros_build_lib.Die('This builder does not support rietveld patches.')
+ cros_build_lib.Die('This builder does not support Rietveld patches.')
target = DistributedBuilder if IsDistributedBuilder() else SimpleBuilder
buildbot = target(options, build_config)