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 optparse | 14 import optparse |
15 import os | 15 import os |
16 import re | 16 import re |
17 import shutil | 17 import shutil |
18 import sys | 18 import sys |
19 | 19 |
20 from pylib import cmd_helper | 20 from devil.utils import cmd_helper |
| 21 from devil.utils import run_tests_helper |
21 from pylib import constants | 22 from pylib import constants |
22 from pylib import pexpect | 23 from pylib import pexpect |
23 from pylib.utils import run_tests_helper | |
24 | 24 |
25 # Android API level | 25 # Android API level |
26 DEFAULT_ANDROID_API_LEVEL = constants.ANDROID_SDK_VERSION | 26 DEFAULT_ANDROID_API_LEVEL = constants.ANDROID_SDK_VERSION |
27 | 27 |
28 # From the Android Developer's website. | 28 # From the Android Developer's website. |
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=line-too-long | 33 # pylint: disable=line-too-long |
(...skipping 234 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 |