Confirmed users
3,990
edits
(Add info about split apks) |
|||
(11 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
= Introduction = | = Introduction = | ||
Mozilla releases a version of | Mozilla releases a version of [[Mobile/Platforms/Android|Firefox for Android]]. | ||
Mozilla's Release Engineering team support this initiative with continuous integration systems. | Mozilla's Release Engineering team support this initiative with continuous integration systems. | ||
This page explains what is involved on all the pieces related to these systems. | This page explains what is involved on all the pieces related to these systems. | ||
Currently, we build on EC2 instances (bld-linux64-ec2-XXX machines) and in-house machines (bld-linux64-ix-XXX machines). | Currently, we build on EC2 instances (bld-linux64-ec2-XXX machines) and in-house machines (bld-linux64-ix-XXX machines). | ||
We create builds for three different architectures: | We create builds for three different architectures: Android API9, Android API10 and Android 4.2 x86. | ||
We run unit tests and performance test differently | We run unit tests and performance test differently for each build. | ||
You can see all jobs running in [https://treeherder.mozilla.org/ui/#/jobs?repo=mozilla-inbound&filter-searchStr=android]. | |||
= Builds & tests = | = Builds & tests = | ||
== Armv7 API 9 == | |||
== Armv7 == | |||
For this architecture we build both '''optimized''' and '''debug''' builds. | For this architecture we build both '''optimized''' and '''debug''' builds. | ||
NOTE: We don't yet run tests on the debug builds. | NOTE: We don't yet run tests on the debug builds. | ||
Line 28: | Line 17: | ||
More info needed as to how we build this. | More info needed as to how we build this. | ||
=== Android 2. | === Android 2.3 API 9=== | ||
Jobs: '''unit tests''' tests <br /> | Jobs: '''unit tests''' tests <br /> | ||
Setup configuration: | Setup configuration: Emulator (single-core) <br /> | ||
Hosts: EC2 Ubuntu 64-bit instances (tst-linux64-spot-XXX or tst-linux64-ec2-XXX). <br /> | Hosts: EC2 Ubuntu 64-bit instances (tst-linux64-spot-XXX or tst-linux64-ec2-XXX). <br /> | ||
Scripts: [http://hg.mozilla.org/build/mozharness/file/default/scripts/android_emulator_unittest.py android_emulator_unittest.py]<br/> | Scripts: [http://hg.mozilla.org/build/mozharness/file/default/scripts/android_emulator_unittest.py android_emulator_unittest.py]<br/> | ||
Line 46: | Line 25: | ||
Artifacts: SUT agent, watcher, Android emulator, Android SDK, AVD definitions | Artifacts: SUT agent, watcher, Android emulator, Android SDK, AVD definitions | ||
=== Android 4.0 === | == Armv7 API 10 == | ||
For this architecture we build both '''optimized''' and '''debug''' builds. | |||
NOTE: We don't yet run tests on the debug builds. | |||
More info needed as to how we build this. | |||
=== Android 4.0 API 10 === | |||
Jobs: '''unit tests''' and '''performance'' tests <br /> | Jobs: '''unit tests''' and '''performance'' tests <br /> | ||
Setup configuration: Foopies-board setup and fixed allocation (no mozpool) <br /> | Setup configuration: Foopies-board setup and fixed allocation (no mozpool) <br /> | ||
Line 54: | Line 39: | ||
Artifacts: SUT agent, watcher | Artifacts: SUT agent, watcher | ||
== x86 == | == Android x86 == | ||
More info needed as to how we build this. | More info needed as to how we build this. | ||
Line 64: | Line 49: | ||
Configs: [http://hg.mozilla.org/build/mozharness/file/default/configs/android/androidarm.py androidarm.py] | Configs: [http://hg.mozilla.org/build/mozharness/file/default/configs/android/androidarm.py androidarm.py] | ||
Artifacts: SUT agent, watcher, Android emulator, Android SDK, AVD definitions | Artifacts: SUT agent, watcher, Android emulator, Android SDK, AVD definitions | ||
= Older builds/tests = | |||
== Armv6 == | |||
More info needed as to how we build this. | |||
=== Android 2.2 === | |||
Jobs: '''unit tests''' tests <br /> | |||
Setup configuration: Foopies-board setup and fixed allocation (no mozpool).<br /> | |||
Hosts: Tegra boards (tegra-XXX) <br /> | |||
Scripts: [http://hg.mozilla.org/build/buildbotcustom/file/default/process/factory.py factory.py] <br /> | |||
Configs: [http://hg.mozilla.org/build/mozharness/file/default/configs/android/android_panda_releng.py android_panda_releng.py] and [http://hg.mozilla.org/build/mozharness/file/default/configs/androidandroid_panda_talos_releng.py android_panda_talos_releng.py]<br /> | |||
Artifacts: SUT agent, watcher | |||
== Armv7 == | |||
=== Android 2.2 === | |||
Jobs: '''unit tests''' tests <br /> | |||
Setup configuration: Foopies-board setup and fixed allocation (no mozpool).<br /> | |||
Hosts: Tegra boards (tegra-XXX) <br /> | |||
Scripts: [http://hg.mozilla.org/build/buildbotcustom/file/default/process/factory.py factory.py] <br /> | |||
Configs: [http://hg.mozilla.org/build/mozharness/file/default/configs/android/android_panda_releng.py android_panda_releng.py] and [http://hg.mozilla.org/build/mozharness/file/default/configs/androidandroid_panda_talos_releng.py android_panda_talos_releng.py]<br /> | |||
Artifacts: SUT agent, watcher | |||
= Running locally = | |||
TBD | |||
= Testing setup configurations = | = Testing setup configurations = | ||
Line 75: | Line 82: | ||
== Emulator parallelization == | == Emulator parallelization == | ||
The Android x86 jobs run inside Android emulators. Android 2.3 only triggers one emulator since it runs on single-core machines. | |||
Mozharness starts up | Mozharness starts up Android emulators for each different test suite. | ||
We can run up to four different test jobs on the same host cutting the load on the pool. | |||
Each emulator starts up with a specific AVD definition that already has the SUT agent and Watcher installed. | Each emulator starts up with a specific AVD definition that already has the SUT agent and Watcher installed. | ||
These AVD definitions are stored on a tar ball, which we store on ToolTool | These AVD definitions are stored on a tar ball, which we store on ToolTool. We download the AVD definitions to the host if | ||
it is not already cached. We untar it on *every* job to have a clean state for the emulators to start from. | it is not already cached. We untar it on *every* job to have a clean state for the emulators to start from. | ||
TODO: explain what AVD definitions are. | TODO: explain what AVD definitions are. | ||
We deploy the Android SDK 18 (TODO add link) with puppet (TODO add link) before the machine starts a job. | We deploy the Android SDK 18 (TODO add link) with puppet (TODO add link) before the machine starts a job. | ||
= Artifacts = | = Artifacts = | ||
== Android emulator == | == Android emulator == | ||
We have emulators for Android 2.3 (un-patched) and Android x86. | |||
The emulator that ships in stock SDKs downloaded from AOSP, at http://developer.android.com/sdk/ , contains the newest (and most-debugged) implementation of OpenGL host rendering and ARM emulation (from ARMv5TE through ARMv7A). We therefore use stock emulators. | The emulator that ships in stock SDKs downloaded from AOSP, at http://developer.android.com/sdk/ , contains the newest (and most-debugged) implementation of OpenGL host rendering and ARM emulation (from ARMv5TE through ARMv7A). We therefore use stock emulators. | ||
For <b>Android x86</b>, we patched the AOSP "tools_r22" emulator. The original problem was documented in {{bug|917562}}, and we distributed new emulator binaries in {{bug|933918}}. | |||
== AVD definition == | == AVD definition == | ||
Line 104: | Line 113: | ||
=== How to generate the AVD definitions === | === How to generate the AVD definitions === | ||
This is the process that graydon followed (the next section shows how to create the same VM that he used): | |||
* Start a new VM (AWS is easiest) running Ubuntu 12.04LTS x86_64 | * Start a new VM (AWS is easiest) running Ubuntu 12.04LTS x86_64 | ||
* Log in | * Log in | ||
Line 113: | Line 122: | ||
If anything goes wrong in the process (it's quite involved), the easiest solution is probably just to read the source of the script; it contains our best current understanding of how to build AVDs from AOSP sources. It also has quite a lot of options and can restart at particular steps, if part of the build fails. | If anything goes wrong in the process (it's quite involved), the easiest solution is probably just to read the source of the script; it contains our best current understanding of how to build AVDs from AOSP sources. It also has quite a lot of options and can restart at particular steps, if part of the build fails. | ||
=== Create EC2 instance based on graydon's initial AMI === | |||
This will help anyone trying to build the emulator again. | |||
* Go to Amazon's AWS console | |||
* Under EC2's dashboard click on "Images->AMIs" | |||
* Search for "2014-02-05-android-AVD-builder" | |||
* Select the AMI and launch an instance | |||
* Choose m3.medium | |||
* Click "Next: Configure Instance Details" instead of "Review and Launch" | |||
* Change "Network" to "vpc-b42100df" | |||
** choose this subnet: subnet-fb97bc8f | |||
* Go to section 6 and choose security group: "tests" | |||
* Click on "Review and Launch" to go to section 7 | |||
* Click "Launch" | |||
** As key pairs select "Choose an existing key pair" and "aws-releng" | |||
* Find the instance and name it so you can find it later | |||
* Once running, load the aws-releng key on cruncher: [[ReleaseEngineering/How_To/Loan_a_Slave#Environment_Setup|setup environment]] | |||
* You can then ssh into the machine using the private ip e.g: | |||
ssh ubuntu@10.134.54.50 | |||
sudo su - | |||
passwd ubuntu # so you can change the password and loaned it | |||
* Also make sure to add the developers pub key to .ssh/authorized_keys | |||
* [https://bugzilla.mozilla.org/enter_bug.cgi?bug_severity=major&short_desc=please%20give%20FULL_LDAP_ADDRESS%20access%20to%20FQDN_OF_SLAVE&component=Infrastructure%3A%20OpenVPN&product=Infrastructure%20%26%20Operations&cc=:REQUESTING_USER&comment=FIRST_NAME_REQUESTING_USER%20needs%20access%20to%20FQDN.%0APlease%20grant%20the%20host%20and%20user%20vpn_releng_loan File an IT bug to get the developer access to the slave], and mark it as '''blocking''' the developer request bug. | |||
== Deployment of artifacts == | == Deployment of artifacts == |