Closed Bug 1124913 Opened 8 years ago Closed 8 years ago

Allow android emulator tests to download emulator


(Testing :: General, defect)

Not set


(Not tracked)



(Reporter: gbrown, Assigned: gbrown)




(1 file, 1 obsolete file)

See For Android 4.4, we need a newer version of the emulator than what is currently deployed to /tools/android-sdk18. 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.
Attached patch install emulator, if configured (obsolete) — Splinter Review
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:

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
Attachment #8553777 - Flags: review?(armenzg)
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.
Attachment #8553777 - Flags: review?(armenzg)
As described in Comment 2.
Attachment #8553777 - Attachment is obsolete: true
Attachment #8553877 - Flags: review?(armenzg)
Comment on attachment 8553877 [details] [diff] [review]
install emulator, if configured

Review of attachment 8553877 [details] [diff] [review]:

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+ verifies this does no harm to existing tests.
a mozharness patch has from this bug is in production
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.