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 """ |
(...skipping 18 matching lines...) Expand all Loading... |
29 # Keep this up to date; the user can install older API levels as necessary. | 29 # Keep this up to date; the user can install older API levels as necessary. |
30 SDK_BASE_URL = 'http://dl.google.com/android/adt' | 30 SDK_BASE_URL = 'http://dl.google.com/android/adt' |
31 SDK_ZIP = 'adt-bundle-linux-x86_64-20131030.zip' | 31 SDK_ZIP = 'adt-bundle-linux-x86_64-20131030.zip' |
32 | 32 |
33 # pylint: disable=C0301 | 33 # pylint: disable=C0301 |
34 # Android x86 system image from the Intel website: | 34 # Android x86 system image from the Intel website: |
35 # http://software.intel.com/en-us/articles/intel-eula-x86-android-4-2-jelly-bean
-bin | 35 # http://software.intel.com/en-us/articles/intel-eula-x86-android-4-2-jelly-bean
-bin |
36 # These don't exist prior to Android-15. | 36 # These don't exist prior to Android-15. |
37 # As of 08 Nov 2013, Android-19 is not yet available either. | 37 # As of 08 Nov 2013, Android-19 is not yet available either. |
38 X86_IMG_URLS = { | 38 X86_IMG_URLS = { |
39 15: 'http://download-software.intel.com/sites/landingpage/android/sysimg_x86-1
5_r01.zip', | 39 15: 'https://software.intel.com/sites/landingpage/android/sysimg_x86-15_r01.zi
p', |
40 16: 'http://download-software.intel.com/sites/landingpage/android/sysimg_x86-1
6_r01.zip', | 40 16: 'https://software.intel.com/sites/landingpage/android/sysimg_x86-16_r01.zi
p', |
41 17: 'http://download-software.intel.com/sites/landingpage/android/sysimg_x86-1
7_r01.zip', | 41 17: 'https://software.intel.com/sites/landingpage/android/sysimg_x86-17_r01.zi
p', |
42 18: 'http://download-software.intel.com/sites/landingpage/android/sysimg_x86-1
8_r01.zip', | 42 18: 'https://software.intel.com/sites/landingpage/android/sysimg_x86-18_r01.zi
p', |
43 19: 'http://download-software.intel.com/sites/landingpage/android/sysimg_x86-1
9_r01.zip'} | 43 19: 'https://software.intel.com/sites/landingpage/android/sysimg_x86-19_r01.zi
p'} |
44 #pylint: enable=C0301 | 44 #pylint: enable=C0301 |
45 | 45 |
46 def CheckSDK(): | 46 def CheckSDK(): |
47 """Check if SDK is already installed. | 47 """Check if SDK is already installed. |
48 | 48 |
49 Returns: | 49 Returns: |
50 True if the emulator SDK directory (src/android_emulator_sdk/) exists. | 50 True if the emulator SDK directory (src/android_emulator_sdk/) exists. |
51 """ | 51 """ |
52 return os.path.exists(constants.EMULATOR_SDK_ROOT) | 52 return os.path.exists(constants.EMULATOR_SDK_ROOT) |
53 | 53 |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 | 268 |
269 # Make sure KVM packages are installed and enabled. | 269 # Make sure KVM packages are installed and enabled. |
270 if CheckKVM(): | 270 if CheckKVM(): |
271 logging.info('KVM already installed and enabled.') | 271 logging.info('KVM already installed and enabled.') |
272 else: | 272 else: |
273 InstallKVM() | 273 InstallKVM() |
274 | 274 |
275 | 275 |
276 if __name__ == '__main__': | 276 if __name__ == '__main__': |
277 sys.exit(main(sys.argv)) | 277 sys.exit(main(sys.argv)) |
OLD | NEW |