0

Skip the creation/sync step on the bot in the prepare step if it already exists. The prepare step is just used to make sure the src directory exists for the bot for running an http server before starting the actual bisect. On linux/mac this step is quick, but on Windows it can take 20 minutes or more.

BUG=
NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/23447006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220312 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
simonhatch@chromium.org
2013-08-29 16:25:35 +00:00
parent c5eada7f95
commit d6b47ab229
2 changed files with 18 additions and 3 deletions

@ -426,6 +426,19 @@ def SetupPlatformBuildEnvironment(opts):
return True
def CheckIfBisectDepotExists(opts):
"""Checks if the bisect directory already exists.
Args:
opts: The options parsed from the command line through parse_args().
Returns:
Returns True if it exists.
"""
path_to_dir = os.path.join(opts.working_directory, 'bisect', 'src')
return os.path.exists(path_to_dir)
def CreateBisectDirectoryAndSetupDepot(opts, custom_deps):
"""Sets up a subdirectory 'bisect' and then retrieves a copy of the depot
there using gclient.

@ -57,9 +57,11 @@ def main():
parser.print_help()
return 1
return bisect_utils.CreateBisectDirectoryAndSetupDepot(
opts,
bisect_utils.DEFAULT_GCLIENT_CUSTOM_DEPS)
if not bisect_utils.CheckIfBisectDepotExists(opts):
return bisect_utils.CreateBisectDirectoryAndSetupDepot(
opts,
bisect_utils.DEFAULT_GCLIENT_CUSTOM_DEPS)
return 0
if __name__ == '__main__':