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 system images, if they are not present, and | 8 The script will download 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 # Android x86 system image from the Intel website: | 22 # Android x86 system image from the Intel website: |
23 # http://software.intel.com/en-us/articles/intel-eula-x86-android-4-2-jelly-bean
-bin | 23 # http://software.intel.com/en-us/articles/intel-eula-x86-android-4-2-jelly-bean
-bin |
24 X86_IMG_URL = 'http://download-software.intel.com/sites/landingpage/android/sysi
mg_x86-17_r01.zip' | 24 X86_IMG_URL = 'http://download-software.intel.com/sites/landingpage/android/sysi
mg_x86-18_r01.zip' |
25 | 25 |
26 # Android API level | 26 # Android API level |
27 API_TARGET = 'android-%s' % constants.ANDROID_SDK_VERSION | 27 API_TARGET = 'android-%s' % constants.ANDROID_SDK_VERSION |
28 | 28 |
29 | 29 |
30 def CheckSDK(): | 30 def CheckSDK(): |
31 """Check if SDK is already installed. | 31 """Check if SDK is already installed. |
32 | 32 |
33 Returns: | 33 Returns: |
34 True if android_tools directory exists in current directory. | 34 True if android_tools directory exists in current directory. |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 120 |
121 # Make sure KVM packages are installed and enabled. | 121 # Make sure KVM packages are installed and enabled. |
122 if CheckKVM(): | 122 if CheckKVM(): |
123 logging.info('KVM already installed and enabled.') | 123 logging.info('KVM already installed and enabled.') |
124 else: | 124 else: |
125 InstallKVM() | 125 InstallKVM() |
126 | 126 |
127 | 127 |
128 if __name__ == '__main__': | 128 if __name__ == '__main__': |
129 sys.exit(main(sys.argv)) | 129 sys.exit(main(sys.argv)) |
OLD | NEW |