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

Unified Diff: scripts/slave/recipe_modules/auto_bisect/api.py

Issue 1610203003: Iteratively increase sample size for good/bad classification. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Rebasing Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/auto_bisect/bisector.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/auto_bisect/api.py
diff --git a/scripts/slave/recipe_modules/auto_bisect/api.py b/scripts/slave/recipe_modules/auto_bisect/api.py
index 47f10f6d6c48c2df9ba0bd69feafc48165047a53..9881ee752ad2ec4fb348e79992fbbcc410cdba35 100644
--- a/scripts/slave/recipe_modules/auto_bisect/api.py
+++ b/scripts/slave/recipe_modules/auto_bisect/api.py
@@ -140,66 +140,74 @@ class AutoBisectApi(recipe_api.RecipeApi):
name='Running Bisection',
xvfb=True, **kwargs)
- def run_local_test_run(self, api, test_config_params): # pragma: no cover
+ def run_local_test_run(self, api, test_config_params,
+ skip_download=False): # pragma: no cover
"""Starts a test run on the same machine.
This is for the merged director/tester flow.
"""
if self.m.platform.is_win:
self.m.chromium.taskkill()
- update_step = api.bot_update.ensure_checkout(
- root_solution_revision=test_config_params['revision'])
+
+ if skip_download:
+ update_step = None
+ else:
+ update_step = api.bot_update.ensure_checkout(
+ root_solution_revision=test_config_params['revision'])
self.start_test_run_for_bisect(api, update_step, self.bot_db,
- test_config_params, run_locally=True)
+ test_config_params, run_locally=True,
+ skip_download=skip_download)
def start_test_run_for_bisect(self, api, update_step, bot_db,
- test_config_params, run_locally=False):
+ test_config_params, run_locally=False,
+ skip_download=False):
mastername = api.properties.get('mastername')
buildername = api.properties.get('buildername')
bot_config = bot_db.get_bot_config(mastername, buildername)
build_archive_url = test_config_params['parent_build_archive_url']
if not run_locally:
api.bisect_tester.upload_job_url()
- if api.chromium.c.TARGET_PLATFORM == 'android':
- # The best way to ensure the old build directory is not used is to
- # remove it.
- build_dir = self.m.chromium.c.build_dir.join(
- self.m.chromium.c.build_config_fs)
- self.m.file.rmtree('build directory', build_dir)
-
- # The way android builders on tryserver.chromium.perf are archived is
- # different from builders on chromium.perf. In order to support both
- # forms of archives, we added this temporary hack until builders are
- # fixed. See http://crbug.com/535218.
- zip_dir = self.m.path.join(self.m.path['checkout'], 'full-build-linux')
- if self.m.path.exists(zip_dir): # pragma: no cover
- self.m.file.rmtree('full-build-linux directory', zip_dir)
-
- gs_bucket = 'gs://%s/' % bot_config['bucket']
- archive_path = build_archive_url[len(gs_bucket):]
- api.chromium_android.download_build(
- bucket=bot_config['bucket'],
- path=archive_path)
-
- # The way android builders on tryserver.chromium.perf are archived is
- # different from builders on chromium.perf. In order to support both
- # forms of archives, we added this temporary hack until builders are
- # fixed. See http://crbug.com/535218.
- if self.m.path.exists(zip_dir): # pragma: no cover
- self.m.python.inline(
- 'moving full-build-linux to out/Release',
- """
- import shutil
- import sys
- shutil.move(sys.argv[1], sys.argv[2])
- """,
- args=[zip_dir, build_dir])
- else:
- api.chromium_tests.download_and_unzip_build(
- mastername, buildername, update_step, bot_db,
- build_archive_url=build_archive_url,
- build_revision=test_config_params['parent_got_revision'],
- override_bot_type='tester')
+ if not skip_download:
+ if api.chromium.c.TARGET_PLATFORM == 'android':
+ # The best way to ensure the old build directory is not used is to
+ # remove it.
+ build_dir = self.m.chromium.c.build_dir.join(
+ self.m.chromium.c.build_config_fs)
+ self.m.file.rmtree('build directory', build_dir)
+
+ # The way android builders on tryserver.chromium.perf are archived is
+ # different from builders on chromium.perf. In order to support both
+ # forms of archives, we added this temporary hack until builders are
+ # fixed. See http://crbug.com/535218.
+ zip_dir = self.m.path.join(self.m.path['checkout'], 'full-build-linux')
+ if self.m.path.exists(zip_dir): # pragma: no cover
+ self.m.file.rmtree('full-build-linux directory', zip_dir)
+
+ gs_bucket = 'gs://%s/' % bot_config['bucket']
+ archive_path = build_archive_url[len(gs_bucket):]
+ api.chromium_android.download_build(
+ bucket=bot_config['bucket'],
+ path=archive_path)
+
+ # The way android builders on tryserver.chromium.perf are archived is
+ # different from builders on chromium.perf. In order to support both
+ # forms of archives, we added this temporary hack until builders are
+ # fixed. See http://crbug.com/535218.
+ if self.m.path.exists(zip_dir): # pragma: no cover
+ self.m.python.inline(
+ 'moving full-build-linux to out/Release',
+ """
+ import shutil
+ import sys
+ shutil.move(sys.argv[1], sys.argv[2])
+ """,
+ args=[zip_dir, build_dir])
+ else:
+ api.chromium_tests.download_and_unzip_build(
+ mastername, buildername, update_step, bot_db,
+ build_archive_url=build_archive_url,
+ build_revision=test_config_params['parent_got_revision'],
+ override_bot_type='tester')
tests = [api.chromium_tests.steps.BisectTest(test_config_params)]
@@ -212,7 +220,7 @@ class AutoBisectApi(recipe_api.RecipeApi):
bot_config_object = api.chromium_tests.create_bot_config_object(
mastername, buildername)
with api.chromium_tests.wrap_chromium_tests(bot_config_object, tests):
- if api.chromium.c.TARGET_PLATFORM == 'android':
+ if api.chromium.c.TARGET_PLATFORM == 'android' and not skip_download:
if bot_config.get('webview'):
api.chromium_android.adb_install_apk('SystemWebView.apk')
api.chromium_android.adb_install_apk('SystemWebViewShell.apk')
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/auto_bisect/bisector.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698