Bug 1473313 - Part 4: Add build and test platforms for android emulator code coverage. r=gbrown draft
authorTudor-Gabriel Vîjială <tvijiala@mozilla.com>
Tue, 24 Jul 2018 11:53:37 +0100
changeset 821935 b84d40026124394aa5d2ff95a67241033a002b76
parent 821934 08534f5b87009d4a22355cffc7c4d1bcfde80080
push id117232
push userbmo:tvijiala@mozilla.com
push dateTue, 24 Jul 2018 12:32:30 +0000
reviewersgbrown
bugs1473313
milestone63.0a1
Bug 1473313 - Part 4: Add build and test platforms for android emulator code coverage. r=gbrown MozReview-Commit-ID: IkSKdB7ZeYi
mobile/android/config/mozconfigs/android-api-16/debug-ccov
taskcluster/ci/build/android.yml
taskcluster/ci/test/misc.yml
taskcluster/ci/test/test-platforms.yml
taskcluster/ci/test/test-sets.yml
testing/mozharness/configs/builds/releng_sub_android_configs/64_api_16_debug_ccov.py
testing/mozharness/mozharness/mozilla/building/buildbase.py
new file mode 100644
--- /dev/null
+++ b/mobile/android/config/mozconfigs/android-api-16/debug-ccov
@@ -0,0 +1,29 @@
+. "$topsrcdir/build/mozconfig.artifact.automation"
+
+NO_CACHE=1
+NO_NDK=1
+
+. "$topsrcdir/mobile/android/config/mozconfigs/common"
+
+# Global options
+ac_add_options --enable-debug
+ac_add_options --enable-java-coverage
+
+# Android
+# Warning: Before increasing the with-android-min-sdk value, please note several places in and out
+# of tree have to be changed. Otherwise, places like Treeherder or archive.mozilla.org will
+# advertise a bad API level. This may confuse people. As an example, please look at bug 1384482.
+# If you think you can't handle the whole set of changes, please reach out to the Release
+# Engineering team.
+ac_add_options --with-android-min-sdk=16
+ac_add_options --target=arm-linux-androideabi
+
+. "$topsrcdir/mobile/android/config/mozconfigs/android-api-16/nightly"
+
+. "$topsrcdir/build/mozconfig.artifact"
+
+ac_add_options --enable-artifact-build-symbols
+
+ac_add_options --with-branding=mobile/android/branding/nightly
+
+. "$topsrcdir/mobile/android/config/mozconfigs/common.override"
--- a/taskcluster/ci/build/android.yml
+++ b/taskcluster/ci/build/android.yml
@@ -42,16 +42,68 @@ android-api-16/debug:
         - android-gradle-dependencies
         - android-ndk-linux
         - android-sdk-linux
         - linux64-clang
         - linux64-rust-android
         - linux64-rust-size
         - linux64-sccache
 
+android-api-16-ccov/debug:
+    description: "Android 4.0 api-16+ Debug Coverage"
+    index:
+        product: mobile
+        job-name: android-api-16-ccov-debug
+    treeherder:
+        platform: android-4-0-armv7-api16-ccov/debug
+        symbol: B
+    worker-type: aws-provisioner-v1/gecko-{level}-b-android
+    worker:
+        docker-image: {in-tree: android-build}
+        max-run-time: 7200
+        env:
+            GRADLE_USER_HOME: "/builds/worker/workspace/build/src/mobile/android/gradle/dotgradle-offline"
+            TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android/releng.manifest"
+        artifacts:
+            - name: public/android/R
+              path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/R
+              type: directory
+            - name: public/android/maven
+              path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/
+              type: directory
+            - name: public/build/geckoview-androidTest.apk
+              path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/outputs/apk/androidTest/officialWithGeckoBinariesNoMinApi/debug/geckoview-official-withGeckoBinaries-noMinApi-debug-androidTest.apk
+              type: file
+            - name: public/build/geckoview_example.apk
+              path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/officialWithGeckoBinariesNoMinApi/debug/geckoview_example-official-withGeckoBinaries-noMinApi-debug.apk
+              type: file
+            - name: public/build/target.geckoview_classfiles.zip
+              path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/target.geckoview_classes.zip
+              type: file
+            - name: public/build
+              path: /builds/worker/artifacts/
+              type: directory
+    run:
+        using: mozharness
+        actions: [get-secrets build multi-l10n update]
+        config:
+            - builds/releng_base_android_64_builds.py
+        script: "mozharness/scripts/fx_desktop_build.py"
+        secrets: true
+        custom-build-variant-cfg: api-16-debug-ccov
+        tooltool-downloads: internal
+    toolchains:
+        - android-gradle-dependencies
+        - android-ndk-linux
+        - android-sdk-linux
+        - linux64-clang
+        - linux64-rust-android
+        - linux64-rust-size
+        - linux64-sccache
+
 android-x86/opt:
     description: "Android 4.2 x86 Opt"
     index:
         product: mobile
         job-name: android-x86-opt
     treeherder:
         platform: android-4-2-x86/opt
         symbol: B
--- a/taskcluster/ci/test/misc.yml
+++ b/taskcluster/ci/test/misc.yml
@@ -28,16 +28,17 @@ geckoview-junit:
     treeherder-symbol: gv-junit
     instance-size: xlarge
     loopback-video: true
     e10s: true
     target: geckoview-androidTest.apk
     max-run-time: 3600
     chunks:
         by-test-platform:
+            android-em-4.3-arm7-api-16-ccov/debug: 8
             android-em-4.3-arm7-api-16/debug: 4
             android-em-4.3-arm7-api-16/opt: 2
             default: 1
     mozharness:
         script: android_emulator_unittest.py
         config:
             by-test-platform:
                 android-em-4.2-x86/opt:
--- a/taskcluster/ci/test/test-platforms.yml
+++ b/taskcluster/ci/test/test-platforms.yml
@@ -311,16 +311,25 @@ macosx64-ccov/debug:
 # android-em test platforms execute on android emulators.
 
 android-em-4.3-arm7-api-16/debug:
     build-platform: android-api-16/debug
     test-sets:
         - android-common-tests
         - android-gradle-tests
 
+# Treeherder platform names should not use dots '.' in their name. The other
+# platforms here have their names translated in
+# taskcluster/taskgraph/transforms/tests.py, this one does not.
+# See bug 1476998 for more details.
+android-em-4-3-arm7-api-16-ccov/debug:
+    build-platform: android-api-16-ccov/debug
+    test-sets:
+        - android-ccov-tests
+
 android-em-4.3-arm7-api-16/opt:
     build-platform: android-api-16/opt
     test-sets:
         - android-common-tests
         - android-opt-tests
         - android-gradle-tests
 
 android-em-4.2-x86/opt:
--- a/taskcluster/ci/test/test-sets.yml
+++ b/taskcluster/ci/test/test-sets.yml
@@ -375,16 +375,19 @@ android-x86-kvm-tests:
     # - mochitest-chrome
     - mochitest-clipboard
     - mochitest-gpu
     - mochitest-media
     # - mochitest-webgl1-core
     - reftest
     - test-verify
 
+android-ccov-tests:
+    - geckoview-junit
+
 devtools-tests:
     - mochitest-devtools-chrome
 
 mochitest-headless:
     - mochitest-plain-headless
 
 android-hw-arm7-opt-unittests:
     - mochitest-media
new file mode 100644
--- /dev/null
+++ b/testing/mozharness/configs/builds/releng_sub_android_configs/64_api_16_debug_ccov.py
@@ -0,0 +1,15 @@
+config = {
+    'base_name': 'Android armv7 api-16+ %(branch)s debug coverage',
+    'stage_platform': 'android-api-16-debug-ccov',
+    'src_mozconfig': 'mobile/android/config/mozconfigs/android-api-16/debug-ccov',
+    'multi_locale_config_platform': 'android',
+    'debug_build': True,
+    'postflight_build_mach_commands': [
+        ['android',
+         'archive-geckoview',
+        ],
+        ['gradle',
+         'geckoview:zipClassfiles',
+        ],
+    ],
+}
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -423,16 +423,17 @@ class BuildOptionParser(object):
         'code-coverage-debug': 'builds/releng_sub_%s_configs/%s_code_coverage_debug.py',
         'code-coverage-opt': 'builds/releng_sub_%s_configs/%s_code_coverage_opt.py',
         'source': 'builds/releng_sub_%s_configs/%s_source.py',
         'noopt-debug': 'builds/releng_sub_%s_configs/%s_noopt_debug.py',
         'api-16-gradle-dependencies': 'builds/releng_sub_%s_configs/%s_api_16_gradle_dependencies.py',
         'api-16': 'builds/releng_sub_%s_configs/%s_api_16.py',
         'api-16-artifact': 'builds/releng_sub_%s_configs/%s_api_16_artifact.py',
         'api-16-debug': 'builds/releng_sub_%s_configs/%s_api_16_debug.py',
+        'api-16-debug-ccov': 'builds/releng_sub_%s_configs/%s_api_16_debug_ccov.py',
         'api-16-debug-artifact': 'builds/releng_sub_%s_configs/%s_api_16_debug_artifact.py',
         'api-16-gradle': 'builds/releng_sub_%s_configs/%s_api_16_gradle.py',
         'api-16-gradle-artifact': 'builds/releng_sub_%s_configs/%s_api_16_gradle_artifact.py',
         'api-16-without-google-play-services': 'builds/releng_sub_%s_configs/%s_api_16_without_google_play_services.py',
         'rusttests': 'builds/releng_sub_%s_configs/%s_rusttests.py',
         'rusttests-debug': 'builds/releng_sub_%s_configs/%s_rusttests_debug.py',
         'x86': 'builds/releng_sub_%s_configs/%s_x86.py',
         'x86-artifact': 'builds/releng_sub_%s_configs/%s_x86_artifact.py',