Closed
Bug 1124913
Opened 10 years ago
Closed 10 years ago
Allow android emulator tests to download emulator
Categories
(Testing :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: gbrown, Assigned: gbrown)
References
Details
Attachments
(1 file, 1 obsolete file)
3.77 KB,
patch
|
armenzg
:
review+
|
Details | Diff | Splinter Review |
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.
![]() |
Assignee | |
Comment 1•10 years ago
|
||
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://ftp.mozilla.org/pub/mozilla.org/mobile/try-builds/gbrown@mozilla.com-5378e3ad8392/try-android-api-9/try_ubuntu64_vm_mobile_test-mochitest-1-bm113-tests1-linux64-build561.txt.gz
![]() |
Assignee | |
Comment 2•10 years ago
|
||
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://ftp.mozilla.org/pub/mozilla.org/mobile/try-builds/gbrown@mozilla.com-5378e3ad8392/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
Attachment #8553777 -
Flags: review?(armenzg)
![]() |
Assignee | |
Comment 3•10 years ago
|
||
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)
![]() |
Assignee | |
Comment 4•10 years ago
|
||
As described in Comment 2.
Attachment #8553777 -
Attachment is obsolete: true
Attachment #8553877 -
Flags: review?(armenzg)
Comment 5•10 years ago
|
||
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+
![]() |
Assignee | |
Comment 6•10 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=51da410d6ef3 verifies this does no harm to existing tests.
![]() |
Assignee | |
Comment 7•10 years ago
|
||
Comment 8•10 years ago
|
||
a mozharness patch has from this bug is in production
![]() |
Assignee | |
Updated•10 years ago
|
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•