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

Issue 3337007: Faster checkout and cleanup of old builds. (Closed)

Created:
10 years, 3 months ago by sosa
Modified:
9 years, 6 months ago
CC:
chromium-os-reviews_chromium.org, Mandeep Singh Baines, anush, sosa
Visibility:
Public.

Description

Faster checkout and cleanup of old builds. Change-Id: Id81fe4e7bd9cae7a51a45b6ea8a535c4ea9430f8 BUG= TEST=Ran locally on top of previous build area.

Patch Set 1 #

Patch Set 2 : ws #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -1 line) Patch
M bin/cbuildbot.py View 1 2 chunks +10 lines, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
sosa
10 years, 3 months ago (2010-09-02 20:52:03 UTC) #1
Mandeep Singh Baines
10 years, 3 months ago (2010-09-02 21:27:00 UTC) #2
LGTM

sosa@chromium.org (sosa@chromium.org) wrote:
> Reviewers: Mandeep Singh Baines,
> 
> Description:
> Faster checkout and cleanup of old builds.
> 
> Change-Id: Id81fe4e7bd9cae7a51a45b6ea8a535c4ea9430f8
> 
> BUG=
> TEST=Ran locally on top of previous build area.
> 
> Please review this at http://codereview.chromium.org/3337007/show
> 
> SVN Base: http://git.chromium.org/git/crosutils.git
> 
> Affected files:
>   M bin/cbuildbot.py
> 
> 
> Index: bin/cbuildbot.py
> diff --git a/bin/cbuildbot.py b/bin/cbuildbot.py
> index
86e498047b66b2a51248026e761ffd4fa51c74b6..cd9a3a5bebfefde70c2ba5afb9ab67da897c35a1
> 100755
> --- a/bin/cbuildbot.py
> +++ b/bin/cbuildbot.py
> @@ -47,9 +47,13 @@ def RepoSync(buildroot, rw_checkout=False,
> retries=_DEFAULT_RETRIES):
>    retries -- Number of retries to try before failing on the sync.
> 
>    """
> +  # Get the number of processors to use with repo sync.
> +  num_procs = int(RunCommand('grep -c processor /proc/cpuinfo'.split(),
> +                             print_cmd=False, redirect_stdout=True))
> +
>    while retries > 0:
>      try:
> -      RunCommand(['repo', 'sync'], cwd=buildroot)
> +      RunCommand(['repo', 'sync', '--jobs=%d' % (num_procs)],
> cwd=buildroot)
>        if rw_checkout:
>          # Always re-run in case of new git repos or repo sync
>          # failed in a previous run because of a forced Stop Build.
> @@ -238,7 +242,12 @@ def _Build(buildroot):
>    cwd = os.path.join(buildroot, 'src', 'scripts')
>    RunCommand(['./build_packages'], cwd=cwd, enter_chroot=True)
> 
> +def _WipeOldOutput(buildroot):
> +  RunCommand(['rm', '-rf', 'src/build/images'], cwd=buildroot)
> +
>  def _BuildImage(buildroot):
> +  _WipeOldOutput(buildroot)
> +
>    cwd = os.path.join(buildroot, 'src', 'scripts')
>    RunCommand(['./build_image', '--replace'], cwd=cwd, enter_chroot=True)
> 
> 
> 

Powered by Google App Engine
This is Rietveld 408576698