OLD | NEW |
1 # Android Test Instructions | 1 # Android Test Instructions |
2 | 2 |
3 Device Setup Tests are runnable on physical devices or emulators. See the | 3 Device Setup Tests are runnable on physical devices or emulators. See the |
4 instructions below for setting up either a physical device or an emulator. | 4 instructions below for setting up either a physical device or an emulator. |
5 | 5 |
6 [TOC] | 6 [TOC] |
7 | 7 |
8 ## Physical Device Setup **ADB Debugging** | 8 ## Physical Device Setup **ADB Debugging** |
9 | 9 |
10 In order to allow the ADB to connect to the device, you must enable USB | 10 In order to allow the ADB to connect to the device, you must enable USB |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 behavior._ This can interfere with the test runner. To disable this dialog, run: | 44 behavior._ This can interfere with the test runner. To disable this dialog, run: |
45 `adb shell settings put global package_verifier_enable 0` | 45 `adb shell settings put global package_verifier_enable 0` |
46 | 46 |
47 ## Emulator Setup | 47 ## Emulator Setup |
48 | 48 |
49 ### Option 1: | 49 ### Option 1: |
50 | 50 |
51 Use an emulator (i.e. Android Virtual Device, AVD): Enabling Intel's | 51 Use an emulator (i.e. Android Virtual Device, AVD): Enabling Intel's |
52 Virtualizaton support provides the fastest, most reliable emulator configuration | 52 Virtualizaton support provides the fastest, most reliable emulator configuration |
53 available (i.e. x86 emulator with GPU acceleration and KVM support). | 53 available (i.e. x86 emulator with GPU acceleration and KVM support). |
| 54 Remember to build with `target_arch=ia32` for x86. Otherwise installing the APKs |
| 55 will fail with `INSTALL_FAILED_NO_MATCHING_ABIS`. |
54 | 56 |
55 1. Enable Intel Virtualization support in the BIOS. | 57 1. Enable Intel Virtualization support in the BIOS. |
56 | 58 |
57 2. Set up your environment: | 59 2. Set up your environment: |
58 | 60 |
59 ```shell | 61 ```shell |
60 . build/android/envsetup.sh | 62 . build/android/envsetup.sh |
61 ``` | 63 ``` |
62 | 64 |
63 3. Install emulator deps: | 65 3. Install emulator deps: |
64 | 66 |
65 ```shell | 67 ```shell |
66 build/android/install_emulator_deps.py --api-level=19 | 68 build/android/install_emulator_deps.py --api-level=23 |
67 ``` | 69 ``` |
68 | 70 |
69 This script will download Android SDK and place it a directory called | 71 This script will download Android SDK and place it a directory called |
70 android\_tools in the same parent directory as your chromium checkout. It | 72 android\_tools in the same parent directory as your chromium checkout. It |
71 will also download the system-images for the emulators (i.e. arm and x86). | 73 will also download the system-images for the emulators (i.e. arm and x86). |
72 Note that this is a different SDK download than the Android SDK in the | 74 Note that this is a different SDK download than the Android SDK in the |
73 chromium source checkout (i.e. src/third\_party/android\_emulator\_sdk). | 75 chromium source checkout (i.e. src/third\_party/android\_emulator\_sdk). |
74 | 76 |
75 4. Run the avd.py script. To start up _num_ emulators use -n. For non-x86 use | 77 4. Run the avd.py script. To start up _num_ emulators use -n. For non-x86 use |
76 --abi. | 78 --abi. |
77 | 79 |
78 ```shell | 80 ```shell |
79 build/android/avd.py --api-level=19 | 81 build/android/avd.py --api-level=23 |
80 ``` | 82 ``` |
81 | 83 |
82 This script will attempt to use GPU emulation, so you must be running the | 84 This script will attempt to use GPU emulation, so you must be running the |
83 emulators in an environment with hardware rendering available. See | 85 emulators in an environment with hardware rendering available. See |
84 `avd.py --help` for more details. | 86 `avd.py --help` for more details. |
85 | 87 |
86 ### Option 2: | 88 ### Option 2: |
87 | 89 |
88 Alternatively, you can create an run your own emulator using the tools provided | 90 Alternatively, you can create an run your own emulator using the tools provided |
89 by the Android SDK. When doing so, be sure to enable GPU emulation in hardware | 91 by the Android SDK. When doing so, be sure to enable GPU emulation in hardware |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 `--output-directory=out_android/Debug`. | 133 `--output-directory=out_android/Debug`. |
132 | 134 |
133 ## INSTALL\_FAILED\_CONTAINER\_ERROR or INSTALL\_FAILED\_INSUFFICIENT\_STORAGE | 135 ## INSTALL\_FAILED\_CONTAINER\_ERROR or INSTALL\_FAILED\_INSUFFICIENT\_STORAGE |
134 | 136 |
135 If you see this error when test\_runner.py is attempting to deploy the test | 137 If you see this error when test\_runner.py is attempting to deploy the test |
136 binaries to the AVD emulator, you may need to resize your userdata partition | 138 binaries to the AVD emulator, you may need to resize your userdata partition |
137 with the following commands: | 139 with the following commands: |
138 | 140 |
139 ```shell | 141 ```shell |
140 # Resize userdata partition to be 1G | 142 # Resize userdata partition to be 1G |
141 resize2fs android_emulator_sdk/sdk/system-images/android-19/x86/userdata.img 1G | 143 resize2fs android_emulator_sdk/sdk/system-images/android-23/x86/userdata.img 1G |
142 | 144 |
143 # Set filesystem parameter to continue on errors; Android doesn't like some | 145 # Set filesystem parameter to continue on errors; Android doesn't like some |
144 # things e2fsprogs does. | 146 # things e2fsprogs does. |
145 tune2fs -e continue android_emulator_sdk/sdk/system-images/android-19/x86/userda
ta.img | 147 tune2fs -e continue android_emulator_sdk/sdk/system-images/android-23/x86/userda
ta.img |
146 ``` | 148 ``` |
147 | 149 |
148 ## Symbolizing Crashes | 150 ## Symbolizing Crashes |
149 | 151 |
150 Crash stacks are logged and can be viewed using adb logcat. To symbolize the | 152 Crash stacks are logged and can be viewed using adb logcat. To symbolize the |
151 traces, pipe the output through | 153 traces, pipe the output through |
152 `third_party/android_platform/development/scripts/stack`. If you build in an | 154 `third_party/android_platform/development/scripts/stack`. If you build in an |
153 output directory other than "out", pass | 155 output directory other than "out", pass |
154 `--chrome-symbols-dir=out_directory/{Debug,Release}/lib` to the script as well. | 156 `--chrome-symbols-dir=out_directory/{Debug,Release}/lib` to the script as well. |
155 | 157 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 See | 288 See |
287 https://sites.google.com/a/chromium.org/dev/developers/testing/webkit-layout-tes
ts | 289 https://sites.google.com/a/chromium.org/dev/developers/testing/webkit-layout-tes
ts |
288 | 290 |
289 ## Running GPU tests | 291 ## Running GPU tests |
290 | 292 |
291 (e.g. the "Android Debug (Nexus 7)" bot on the chromium.gpu waterfall) | 293 (e.g. the "Android Debug (Nexus 7)" bot on the chromium.gpu waterfall) |
292 | 294 |
293 See http://www.chromium.org/developers/testing/gpu-testing for details. Use | 295 See http://www.chromium.org/developers/testing/gpu-testing for details. Use |
294 --browser=android-content-shell. Examine the stdio from the test invocation on | 296 --browser=android-content-shell. Examine the stdio from the test invocation on |
295 the bots to see arguments to pass to src/content/test/gpu/run\_gpu\_test.py. | 297 the bots to see arguments to pass to src/content/test/gpu/run\_gpu\_test.py. |
OLD | NEW |