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

Unified Diff: buildbot/buildbot_run.py

Issue 1131213003: Remove the Android generator. (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Created 5 years, 7 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 | « buildbot/aosp_manifest.xml ('k') | buildbot/commit_queue/cq_config.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: buildbot/buildbot_run.py
diff --git a/buildbot/buildbot_run.py b/buildbot/buildbot_run.py
index 8ce215a4125424c6b882bb2eb3892081a731cb42..9a2b71f1b355cf6c9cde72f661c275b182ab88ef 100755
--- a/buildbot/buildbot_run.py
+++ b/buildbot/buildbot_run.py
@@ -5,23 +5,15 @@
"""Argument-less script to select what to run on the buildbots."""
-import filecmp
import os
import shutil
import subprocess
import sys
-if sys.platform in ['win32', 'cygwin']:
- EXE_SUFFIX = '.exe'
-else:
- EXE_SUFFIX = ''
-
-
BUILDBOT_DIR = os.path.dirname(os.path.abspath(__file__))
TRUNK_DIR = os.path.dirname(BUILDBOT_DIR)
ROOT_DIR = os.path.dirname(TRUNK_DIR)
-ANDROID_DIR = os.path.join(ROOT_DIR, 'android')
CMAKE_DIR = os.path.join(ROOT_DIR, 'cmake')
CMAKE_BIN_DIR = os.path.join(CMAKE_DIR, 'bin')
OUT_DIR = os.path.join(TRUNK_DIR, 'out')
@@ -69,95 +61,6 @@ def PrepareCmake():
CallSubProcess( ['make', 'cmake'], cwd=CMAKE_DIR)
-_ANDROID_SETUP = 'source build/envsetup.sh && lunch full-eng'
-
-
-def PrepareAndroidTree():
- """Prepare an Android tree to run 'android' format tests."""
- if os.environ['BUILDBOT_CLOBBER'] == '1':
- print '@@@BUILD_STEP Clobber Android checkout@@@'
- shutil.rmtree(ANDROID_DIR)
-
- # (Re)create the directory so that the following steps will succeed.
- if not os.path.isdir(ANDROID_DIR):
- os.mkdir(ANDROID_DIR)
-
- # We use a manifest from the gyp project listing pinned revisions of AOSP to
- # use, to ensure that we test against a stable target. This needs to be
- # updated to pick up new build system changes sometimes, so we must test if
- # it has changed.
- manifest_filename = 'aosp_manifest.xml'
- gyp_manifest = os.path.join(BUILDBOT_DIR, manifest_filename)
- android_manifest = os.path.join(ANDROID_DIR, '.repo', 'manifests',
- manifest_filename)
- manifest_is_current = (os.path.isfile(android_manifest) and
- filecmp.cmp(gyp_manifest, android_manifest))
- if not manifest_is_current:
- # It's safe to repeat these steps, so just do them again to make sure we are
- # in a good state.
- print '@@@BUILD_STEP Initialize Android checkout@@@'
- CallSubProcess(
- ['repo', 'init',
- '-u', 'https://android.googlesource.com/platform/manifest',
- '-b', 'master',
- '-g', 'all,-notdefault,-device,-darwin,-mips,-x86'],
- cwd=ANDROID_DIR)
- shutil.copy(gyp_manifest, android_manifest)
-
- print '@@@BUILD_STEP Sync Android@@@'
- CallSubProcess(['repo', 'sync', '-j4', '-m', manifest_filename],
- cwd=ANDROID_DIR)
-
- # If we already built the system image successfully and didn't sync to a new
- # version of the source, skip running the build again as it's expensive even
- # when there's nothing to do.
- system_img = os.path.join(ANDROID_DIR, 'out', 'target', 'product', 'generic',
- 'system.img')
- if manifest_is_current and os.path.isfile(system_img):
- return
-
- print '@@@BUILD_STEP Build Android@@@'
- CallSubProcess(
- ['/bin/bash',
- '-c', '%s && make -j4' % _ANDROID_SETUP],
- cwd=ANDROID_DIR)
-
-
-def StartAndroidEmulator():
- """Start an android emulator from the built android tree."""
- print '@@@BUILD_STEP Start Android emulator@@@'
-
- CallSubProcess(['/bin/bash', '-c',
- '%s && adb kill-server ' % _ANDROID_SETUP],
- cwd=ANDROID_DIR)
-
- # If taskset is available, use it to force adbd to run only on one core, as,
- # sadly, it improves its reliability (see crbug.com/268450).
- adbd_wrapper = ''
- with open(os.devnull, 'w') as devnull_fd:
- if subprocess.call(['which', 'taskset'], stdout=devnull_fd) == 0:
- adbd_wrapper = 'taskset -c 0'
- CallSubProcess(['/bin/bash', '-c',
- '%s && %s adb start-server ' % (_ANDROID_SETUP, adbd_wrapper)],
- cwd=ANDROID_DIR)
-
- subprocess.Popen(
- ['/bin/bash', '-c',
- '%s && emulator -no-window' % _ANDROID_SETUP],
- cwd=ANDROID_DIR)
- CallSubProcess(
- ['/bin/bash', '-c',
- '%s && adb wait-for-device' % _ANDROID_SETUP],
- cwd=ANDROID_DIR)
-
-
-def StopAndroidEmulator():
- """Stop all android emulators."""
- print '@@@BUILD_STEP Stop Android emulator@@@'
- # If this fails, it's because there is no emulator running.
- subprocess.call(['pkill', 'emulator.*'])
-
-
def GypTestFormat(title, format=None, msvs_version=None, tests=[]):
"""Run the gyp tests for a given format, emitting annotator tags.
@@ -183,15 +86,7 @@ def GypTestFormat(title, format=None, msvs_version=None, tests=[]):
'--format', format,
'--path', CMAKE_BIN_DIR,
'--chdir', 'gyp'] + tests)
- if format == 'android':
- # gyptest needs the environment setup from envsetup/lunch in order to build
- # using the 'android' backend, so this is done in a single shell.
- retcode = subprocess.call(
- ['/bin/bash',
- '-c', '%s && cd %s && %s' % (_ANDROID_SETUP, ROOT_DIR, command)],
- cwd=ANDROID_DIR, env=env)
- else:
- retcode = subprocess.call(command, cwd=ROOT_DIR, env=env, shell=True)
+ retcode = subprocess.call(command, cwd=ROOT_DIR, env=env, shell=True)
if retcode:
# Emit failure tag, and keep going.
print '@@@STEP_FAILURE@@@'
@@ -207,15 +102,7 @@ def GypBuild():
print 'Done.'
retcode = 0
- # The Android gyp bot runs on linux so this must be tested first.
- if os.environ['BUILDBOT_BUILDERNAME'] == 'gyp-android':
- PrepareAndroidTree()
- StartAndroidEmulator()
- try:
- retcode += GypTestFormat('android')
- finally:
- StopAndroidEmulator()
- elif sys.platform.startswith('linux'):
+ if sys.platform.startswith('linux'):
retcode += GypTestFormat('ninja')
retcode += GypTestFormat('make')
PrepareCmake()
« no previous file with comments | « buildbot/aosp_manifest.xml ('k') | buildbot/commit_queue/cq_config.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698