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

Unified Diff: tools/auto_bisect/builder.py

Issue 691553002: Refactoring auto-bisect bot (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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 | « tools/auto_bisect/bisect_utils.py ('k') | tools/auto_bisect/source_control.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/auto_bisect/builder.py
diff --git a/tools/auto_bisect/builder.py b/tools/auto_bisect/builder.py
index 06ef47404036c5051ef67c269a43858fe51b4f26..1c74f22562d6285f5b0947ec039c1aa313d143bb 100644
--- a/tools/auto_bisect/builder.py
+++ b/tools/auto_bisect/builder.py
@@ -64,9 +64,7 @@ class Builder(object):
opts: Options parsed from the command-line.
"""
builder = None
- if opts.target_platform == 'cros':
- builder = CrosBuilder(opts)
- elif opts.target_platform == 'android':
+ if opts.target_platform == 'android':
builder = AndroidBuilder(opts)
elif opts.target_platform == 'android-chrome':
builder = AndroidChromeBuilder(opts)
@@ -193,111 +191,6 @@ class AndroidChromeBuilder(AndroidBuilder):
return AndroidBuilder._GetTargets(self) + ['chrome_apk']
-class CrosBuilder(Builder):
- """CrosBuilder is used to build and image ChromeOS/Chromium.
-
- WARNING(qyearsley, 2014-08-15): This hasn't been tested recently.
- """
-
- def __init__(self, opts):
- super(CrosBuilder, self).__init__(opts)
-
- @staticmethod
- def ImageToTarget(opts):
- """Installs latest image to target specified by opts.cros_remote_ip.
-
- Args:
- opts: Program options containing cros_board and cros_remote_ip.
-
- Returns:
- True if successful.
- """
- try:
- # Keys will most likely be set to 0640 after wiping the chroot.
- os.chmod(bisect_utils.CROS_SCRIPT_KEY_PATH, 0600)
- os.chmod(bisect_utils.CROS_TEST_KEY_PATH, 0600)
- cmd = [bisect_utils.CROS_SDK_PATH, '--', './bin/cros_image_to_target.py',
- '--remote=%s' % opts.cros_remote_ip,
- '--board=%s' % opts.cros_board, '--test', '--verbose']
-
- return_code = bisect_utils.RunProcess(cmd)
- return not return_code
- except OSError:
- return False
-
- @staticmethod
- def BuildPackages(opts, depot):
- """Builds packages for cros.
-
- Args:
- opts: Program options containing cros_board.
- depot: The depot being bisected.
-
- Returns:
- True if successful.
- """
- cmd = [bisect_utils.CROS_SDK_PATH]
-
- if depot != 'cros':
- path_to_chrome = os.path.join(os.getcwd(), '..')
- cmd += ['--chrome_root=%s' % path_to_chrome]
-
- cmd += ['--']
-
- if depot != 'cros':
- cmd += ['CHROME_ORIGIN=LOCAL_SOURCE']
-
- cmd += ['BUILDTYPE=%s' % opts.target_build_type, './build_packages',
- '--board=%s' % opts.cros_board]
- return_code = bisect_utils.RunProcess(cmd)
-
- return not return_code
-
- @staticmethod
- def BuildImage(opts, depot):
- """Builds test image for cros.
-
- Args:
- opts: Program options containing cros_board.
- depot: The depot being bisected.
-
- Returns:
- True if successful.
- """
- cmd = [bisect_utils.CROS_SDK_PATH]
-
- if depot != 'cros':
- path_to_chrome = os.path.join(os.getcwd(), '..')
- cmd += ['--chrome_root=%s' % path_to_chrome]
-
- cmd += ['--']
-
- if depot != 'cros':
- cmd += ['CHROME_ORIGIN=LOCAL_SOURCE']
-
- cmd += ['BUILDTYPE=%s' % opts.target_build_type, '--', './build_image',
- '--board=%s' % opts.cros_board, 'test']
-
- return_code = bisect_utils.RunProcess(cmd)
-
- return not return_code
-
- def Build(self, depot, opts):
- """Builds targets using options passed into the script.
-
- Args:
- depot: Current depot being bisected.
- opts: The options parsed from the command line.
-
- Returns:
- True if build was successful.
- """
- if self.BuildPackages(opts, depot):
- if self.BuildImage(opts, depot):
- return self.ImageToTarget(opts)
- return False
-
-
def SetBuildSystemDefault(build_system, use_goma, goma_dir):
"""Sets up any environment variables needed to build with the specified build
system.
@@ -344,8 +237,6 @@ def SetupPlatformBuildEnvironment(opts):
if 'android' in opts.target_platform:
CopyAndSaveOriginalEnvironmentVars()
return SetupAndroidBuildEnvironment(opts)
- elif opts.target_platform == 'cros':
- return bisect_utils.SetupCrosRepo()
return True
@@ -400,7 +291,6 @@ def CopyAndSaveOriginalEnvironmentVars():
vars_to_remove = [
'CHROME_SRC',
'CHROMIUM_GYP_FILE',
- 'GYP_CROSSCOMPILE',
'GYP_DEFINES',
'GYP_GENERATORS',
'GYP_GENERATOR_FLAGS',
« no previous file with comments | « tools/auto_bisect/bisect_utils.py ('k') | tools/auto_bisect/source_control.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698