Closed Bug 1124913 Opened 8 years ago Closed 8 years ago
Allow android emulator tests to download emulator
See https://bugzilla.mozilla.org/show_bug.cgi?id=1062365#c9: For Android 4.4, we need a newer version of the emulator than what is currently deployed to /tools/android-sdk18. android_emulator_unittest.py could download and install a configured package containing the emulator. That capability would also help local mozharness runs and give us the flexibility to move to a different test slave configuration.
First successful effort: using adb (bug 1123443) and the emulator from the r24.0.2 sdk, but still using the standard 2.3 avds. http://email@example.com/try-android-api-9/try_ubuntu64_vm_mobile_test-mochitest-1-bm113-tests1-linux64-build561.txt.gz
I wrote my own emulator/sdk install logic, then realized it was already written -- we may as well use the existing support! This hooks in the existing EmulatorMixin.install_emulator(), if emulator_url or emulator_manifest are configured. I add emulator_url to the 4.4 configuration only, setting it to a zip in my people account, for now. The emulator is normally launched simply as "emulator", without specifying a path, so PATH needs to be manipulated to pick up the correct emulator. I do that here, again only for the 4.4 config. My zip has everything needed for the emulator, but does not contain adb, so I keep /tools/android-sdk18/platform-tools in the path to pick up the existing adb. This works well enough for my purposes. Here is a mochitest run, with adb and my emulator, but still using the 2.3 avd: http://firstname.lastname@example.org/try-android-api-9/try_ubuntu64_vm_mobile_test-mochitest-1-bm51-tests1-linux64-build404.txt.gz It passed! And you can see that it is using the new emulator: 22:24:34 INFO - Concatenated QEMU options: 22:24:34 INFO - /builds/slave/test/build/emulator/android-sdk-linux/tools/emulator64-arm -android-port 5554 -m 1024 -cpu cortex-a9 -android-hw /home/cltbld/.android/avd/test-1.avd/hardware-qemu.ini
Comment on attachment 8553777 [details] [diff] [review] install emulator, if configured Sorry, I found a problem in this patch. I'll post an improved version soon.
As described in Comment 2.
Comment on attachment 8553877 [details] [diff] [review] install emulator, if configured Review of attachment 8553877 [details] [diff] [review]: ----------------------------------------------------------------- Excellent! Once we have tooltool it will pull it for your from the local cache on the machine. That way we don't have to fetch and extract every time.
Attachment #8553877 - Flags: review?(armenzg) → review+
https://treeherder.mozilla.org/#/jobs?repo=try&revision=51da410d6ef3 verifies this does no harm to existing tests.
a mozharness patch has from this bug is in production
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.