android: Remove GetSDK() from install_emulator_deps.

These days, the SDK is already checked out by DEPS in
src/third_party/android_tools/sdk, so trying to download it again from a
different location at a later stage does not make much sense.

R=peter@chromium.org,bulach@chromium.org,craigdh@chromium.org,frankf@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222121 0039d316-1c4b-4281-b951-d872f2087c98
parent 3273e613
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"""Installs deps for using SDK emulator for testing. """Installs deps for using SDK emulator for testing.
The script will download the SDK and system images, if they are not present, and The script will download system images, if they are not present, and
install and enable KVM, if virtualization has been enabled in the BIOS. install and enable KVM, if virtualization has been enabled in the BIOS.
""" """
...@@ -19,10 +19,6 @@ from pylib import cmd_helper ...@@ -19,10 +19,6 @@ from pylib import cmd_helper
from pylib import constants from pylib import constants
from pylib.utils import run_tests_helper from pylib.utils import run_tests_helper
# From the Android Developer's website.
SDK_BASE_URL = 'http://dl.google.com/android/adt'
SDK_ZIP = 'adt-bundle-linux-x86_64-20130522.zip'
# Android x86 system image from the Intel website: # Android x86 system image from the Intel website:
# http://software.intel.com/en-us/articles/intel-eula-x86-android-4-2-jelly-bean-bin # http://software.intel.com/en-us/articles/intel-eula-x86-android-4-2-jelly-bean-bin
X86_IMG_URL = 'http://download-software.intel.com/sites/landingpage/android/sysimg_x86-17_r01.zip' X86_IMG_URL = 'http://download-software.intel.com/sites/landingpage/android/sysimg_x86-17_r01.zip'
...@@ -65,27 +61,6 @@ def CheckKVM(): ...@@ -65,27 +61,6 @@ def CheckKVM():
return False return False
def GetSDK():
"""Download the SDK and unzip in android_tools directory."""
logging.info('Download Android SDK.')
sdk_url = '%s/%s' % (SDK_BASE_URL, SDK_ZIP)
try:
cmd_helper.RunCmd(['curl', '-o', '/tmp/sdk.zip', sdk_url])
print 'curled unzipping...'
rc = cmd_helper.RunCmd(['unzip', '-o', '/tmp/sdk.zip', '-d', '/tmp/'])
if rc:
logging.critical('ERROR: could not download/unzip Android SDK.')
raise
# Get the name of the sub-directory that everything will be extracted to.
dirname, _ = os.path.splitext(SDK_ZIP)
zip_dir = '/tmp/%s' % dirname
# Move the extracted directory to EMULATOR_SDK_ROOT
dst = os.path.join(constants.EMULATOR_SDK_ROOT, 'android_tools')
shutil.move(zip_dir, dst)
finally:
os.unlink('/tmp/sdk.zip')
def InstallKVM(): def InstallKVM():
"""Installs KVM packages.""" """Installs KVM packages."""
rc = cmd_helper.RunCmd(['sudo', 'apt-get', 'install', 'kvm']) rc = cmd_helper.RunCmd(['sudo', 'apt-get', 'install', 'kvm'])
...@@ -127,14 +102,17 @@ def main(argv): ...@@ -127,14 +102,17 @@ def main(argv):
format='# %(asctime)-15s: %(message)s') format='# %(asctime)-15s: %(message)s')
run_tests_helper.SetLogLevel(verbose_count=1) run_tests_helper.SetLogLevel(verbose_count=1)
# Calls below will download emulator SDK and/or system images only if needed. if not CheckSDK():
if CheckSDK(): logging.critical(
logging.info('android_tools directory already exists (not downloading).') 'ERROR: android_tools does not exist. Make sure your .gclient file '
else: 'contains the right \'target_os\' entry. See '
GetSDK() 'https://code.google.com/p/chromium/wiki/AndroidBuildInstructions for '
'more information.')
return 1
logging.info('Emulator deps for ARM emulator complete.') logging.info('Emulator deps for ARM emulator complete.')
# Download system images only if needed.
if CheckX86Image(): if CheckX86Image():
logging.info('system-images directory already exists.') logging.info('system-images directory already exists.')
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment