Add command line option to specify chrome preload directory.
Add the command line option and processing for the sync chrome stage to
use the chrome preload directory cache that we place on nightly
images. The possibility of falling back to --git-cache-dir is left in
place when --chrome-preload-dir is not specified.
This will be followed up by a CL to send this value for legacy recipe
invocations from the cros/swarming.py recipe. This should make the
first time sync on a legacy recipe run faster and will likely greatly
decrease or eliminate the type of gclient sync failure seen in the
attached bug.
BUG=chromium:1035538
TEST=./chromite/run_tests
Change-Id: I7e5792f218b8e50426589f79a8c7c6629f375dae
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2064529
Reviewed-by: Chris McDonald <cjmcdonald@chromium.org>
Reviewed-by: Alex Klein <saklein@chromium.org>
Commit-Queue: David Burger <dburger@chromium.org>
Tested-by: David Burger <dburger@chromium.org>
diff --git a/scripts/cbuildbot.py b/scripts/cbuildbot.py
index b89f75a..2a8e37c 100644
--- a/scripts/cbuildbot.py
+++ b/scripts/cbuildbot.py
@@ -454,6 +454,15 @@
'tool. Bootstrap the projects based on the git '
'cache files instead of fetching them directly '
'from the GoB servers.')
+ group.add_remote_option('--chrome-preload-dir', type='path',
+ api=constants.REEXEC_API_CHROME_PRELOAD_DIR,
+ help='Specify a preloaded chrome source cache '
+ 'directory populated by the git-cache tool. '
+ 'Bootstrap chrome based on the cached files '
+ 'instead of fetching them directly from the GoB '
+ 'servers. When both this argument and '
+ '--git-cache-dir are provided this value will '
+ 'be preferred for the chrome source cache.')
group.add_remote_option('--debug-cidb', action='store_true', default=False,
help='Force Debug CIDB to be used.')
# cbuildbot ChromeOS Findit options