Bug 1473313 - Part 4: Add build and test platforms for android emulator code coverage. r=gbrown
MozReview-Commit-ID: IkSKdB7ZeYi
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
@@ -43,16 +43,72 @@ android-api-16/debug:
- android-ndk-linux
- android-sdk-linux
- linux64-clang
- linux64-rust-android
- linux64-rust-size
- linux64-sccache
- linux64-node
+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/coverage/target.geckoview_classfiles.zip
+ type: file
+ - name: public/build/target.jacoco-cli.jar
+ path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/coverage/target.jacoco-cli.jar
+ 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
+ - linux64-node
+
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: 4
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
@@ -317,16 +317,21 @@ 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
+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
@@ -383,16 +383,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
--- a/taskcluster/taskgraph/transforms/tests.py
+++ b/taskcluster/taskgraph/transforms/tests.py
@@ -550,16 +550,17 @@ def set_treeherder_machine_platform(conf
'macosx64/debug': 'osx-10-10/debug',
'macosx64/opt': 'osx-10-10/opt',
'win64-asan/opt': 'windows10-64/asan',
'win32-pgo/opt': 'windows7-32/pgo',
'win64-pgo/opt': 'windows10-64/pgo',
# The build names for Android platforms have partially evolved over the
# years and need to be translated.
'android-api-16/debug': 'android-em-4-3-armv7-api16/debug',
+ 'android-api-16-ccov/debug': 'android-em-4-3-armv7-api16-ccov/debug',
'android-api-16/opt': 'android-em-4-3-armv7-api16/opt',
'android-x86/opt': 'android-em-4-2-x86/opt',
'android-api-16-gradle/opt': 'android-api-16-gradle/opt',
}
for test in tests:
# For most desktop platforms, the above table is not used for "regular"
# builds, so we'll always pick the test platform here.
# On macOS though, the regular builds are in the table. This causes a
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',
+ ],
+ ['android',
+ 'archive-geckoview-coverage-artifacts',
+ ],
+ ],
+}
--- 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',