| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Installs deps for using SDK emulator for testing. | 6 """Installs deps for using SDK emulator for testing. |
| 7 | 7 |
| 8 The script will download the SDK and system images, if they are not present, and | 8 The script will download the SDK and system images, if they are not present, and |
| 9 install and enable KVM, if virtualization has been enabled in the BIOS. | 9 install and enable KVM, if virtualization has been enabled in the BIOS. |
| 10 """ | 10 """ |
| 11 | 11 |
| 12 | 12 |
| 13 import logging | 13 import logging |
| 14 import os | 14 import os |
| 15 import shutil | 15 import shutil |
| 16 import sys | 16 import sys |
| 17 | 17 |
| 18 from pylib import cmd_helper | 18 from pylib import cmd_helper |
| 19 from pylib import constants | 19 from pylib import constants |
| 20 from pylib.utils import run_tests_helper | 20 from pylib.utils import run_tests_helper |
| 21 | 21 |
| 22 # From the Android Developer's website. | 22 # From the Android Developer's website. |
| 23 SDK_BASE_URL = 'http://dl.google.com/android/adt' | 23 SDK_BASE_URL = 'http://dl.google.com/android/adt' |
| 24 SDK_ZIP = 'adt-bundle-linux-x86_64-20130219.zip' | 24 SDK_ZIP = 'adt-bundle-linux-x86_64-20130522.zip' |
| 25 | 25 |
| 26 # Android x86 system image from the Intel website: | 26 # Android x86 system image from the Intel website: |
| 27 # http://software.intel.com/en-us/articles/intel-eula-x86-android-4-2-jelly-bean
-bin | 27 # http://software.intel.com/en-us/articles/intel-eula-x86-android-4-2-jelly-bean
-bin |
| 28 X86_IMG_URL = 'http://download-software.intel.com/sites/landingpage/android/sysi
mg_x86-17_r01.zip' | 28 X86_IMG_URL = 'http://download-software.intel.com/sites/landingpage/android/sysi
mg_x86-17_r01.zip' |
| 29 | 29 |
| 30 # Android API level | 30 # Android API level |
| 31 API_TARGET = 'android-%s' % constants.ANDROID_SDK_VERSION | 31 API_TARGET = 'android-%s' % constants.ANDROID_SDK_VERSION |
| 32 | 32 |
| 33 | 33 |
| 34 def CheckSDK(): | 34 def CheckSDK(): |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 142 |
| 143 # Make sure KVM packages are installed and enabled. | 143 # Make sure KVM packages are installed and enabled. |
| 144 if CheckKVM(): | 144 if CheckKVM(): |
| 145 logging.info('KVM already installed and enabled.') | 145 logging.info('KVM already installed and enabled.') |
| 146 else: | 146 else: |
| 147 InstallKVM() | 147 InstallKVM() |
| 148 | 148 |
| 149 | 149 |
| 150 if __name__ == '__main__': | 150 if __name__ == '__main__': |
| 151 sys.exit(main(sys.argv)) | 151 sys.exit(main(sys.argv)) |
| OLD | NEW |