cbuildbot_launch: respect --nosync
Have the --nosync option apply when using cbuildbot_launch and not
just cbuildbot. This speeds up local builds.
BUG=chromium:767666
TEST=`cros tryjob --local --pass-through=--test-bootstrap --pass-through=--nosync ...` no longer syncs the full repo
Change-Id: I74914a3c377026e9a7d5b7b23e32f450efbc0f88
Reviewed-on: https://chromium-review.googlesource.com/831091
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
diff --git a/scripts/cbuildbot_launch.py b/scripts/cbuildbot_launch.py
index bf77667..71611c8 100644
--- a/scripts/cbuildbot_launch.py
+++ b/scripts/cbuildbot_launch.py
@@ -354,8 +354,9 @@
CleanBuildRoot(root, repo, metrics_fields)
# Get a checkout close enough to the branch that cbuildbot can handle it.
- with metrics.SecondsTimer(METRIC_INITIAL, fields=metrics_fields):
- InitialCheckout(repo)
+ if options.sync:
+ with metrics.SecondsTimer(METRIC_INITIAL, fields=metrics_fields):
+ InitialCheckout(repo)
# Get a checkout close enough to the branch that cbuildbot can handle it.
with metrics.SecondsTimer(METRIC_DEPOT_TOOLS, fields=metrics_fields):