Bug 1624649: Move android emu to pull from toolchain instead tooltool r=nalexander
☠☠ backed out by 1cddc2938e75 ☠ ☠
authorWander Lairson Costa <wander.lairson@gmail.com>
Wed, 01 Apr 2020 16:30:21 +0000
changeset 521672 0592b572c58de39307828c80c076ff135da649aa
parent 521671 011ad9ff26088e341b0aebecd4424523b7759e88
child 521673 9ce55318603bf50f1a05b7033ff6a6a870e242af
push id111773
push userwcosta@mozilla.com
push dateWed, 01 Apr 2020 18:14:18 +0000
treeherderautoland@0592b572c58d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1624649
milestone76.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1624649: Move android emu to pull from toolchain instead tooltool r=nalexander Currently, we build android emulator packages manually and upload to tooltool. This patch switches it to be pulled from the toolchain built artifacts. This also allows android tests to run in the staging environment. Differential Revision: https://phabricator.services.mozilla.com/D68617
taskcluster/ci/test/compiled.yml
taskcluster/ci/test/misc.yml
taskcluster/ci/test/mochitest.yml
taskcluster/ci/test/reftest.yml
taskcluster/ci/test/web-platform.yml
taskcluster/ci/test/xpcshell.yml
taskcluster/ci/webrender/kind.yml
testing/mozharness/configs/android/androidx86_7_0.py
testing/mozharness/mozharness/mozilla/testing/android.py
--- a/taskcluster/ci/test/compiled.yml
+++ b/taskcluster/ci/test/compiled.yml
@@ -1,14 +1,22 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 ---
 job-defaults:
     e10s: false
+    fetches:
+        toolchain:
+            by-test-platform:
+                android-em-7.*:
+                    - android-sdk-linux
+                    - linux64-node
+                    - linux64-minidump-stackwalk
+                default: []
     mozharness:
         script:
             by-test-platform:
                 android-em.*: android_emulator_unittest.py
                 android-hw.*: android_hardware_unittest.py
                 default: desktop_unittest.py
         config:
             by-test-platform:
--- a/taskcluster/ci/test/misc.yml
+++ b/taskcluster/ci/test/misc.yml
@@ -6,16 +6,23 @@ geckoview-junit:
     description: "Geckoview junit run"
     suite: geckoview-junit
     treeherder-symbol: gv-junit
     loopback-video: true
     e10s: true
     target: geckoview-androidTest.apk
     max-run-time: 3600
     tier: default
+    fetches:
+        toolchain:
+            by-test-platform:
+                android-em-7.*:
+                    - android-sdk-linux
+                    - linux64-minidump-stackwalk
+                default: []
     mozharness:
         script: android_emulator_unittest.py
         config:
             by-test-platform:
                 android-em-7.*:
                     - android/android_common.py
                     - android/androidx86_7_0.py
         extra-options:
@@ -87,16 +94,17 @@ test-verify:
                     - macosx64-minidump-stackwalk
                 win.*64.*:
                     - win64-node
                     - win32-minidump-stackwalk
                 win.*32.*:
                     - win32-node
                     - win32-minidump-stackwalk
                 android-em-7.*:
+                    - android-sdk-linux
                     - linux64-node
                     - linux64-minidump-stackwalk
 
 test-verify-gpu:
     description: "Extra verification of tests modified on this push on gpu instances"
     suite:
         category: test-verify
         name: test-verify-gpu
--- a/taskcluster/ci/test/mochitest.yml
+++ b/taskcluster/ci/test/mochitest.yml
@@ -5,16 +5,23 @@
 job-defaults:
     suite:
         category: mochitest
     target:
         by-test-platform:
             android-em-7.*: geckoview-androidTest.apk
             android-hw.*: geckoview-androidTest.apk
             default: null
+    fetches:
+        toolchain:
+            by-test-platform:
+                android-em-7.*:
+                    - android-sdk-linux
+                    - linux64-minidump-stackwalk
+                default: []
     variants:
         by-test-platform:
             linux.*64/debug: ['fission']
             default: ['fission']
     run-on-projects: built-projects
     fission-run-on-projects:
         by-test-platform:
             linux.*64-qr/debug: ['trunk']
--- a/taskcluster/ci/test/reftest.yml
+++ b/taskcluster/ci/test/reftest.yml
@@ -5,16 +5,23 @@
 job-defaults:
     suite:
         category: reftest
     target:
         by-test-platform:
             android-em-7.*: geckoview-androidTest.apk
             android-hw-.*: geckoview-androidTest.apk
             default: null
+    fetches:
+        toolchain:
+            by-test-platform:
+                android-em-7.*:
+                    - android-sdk-linux
+                    - linux64-minidump-stackwalk
+                default: []
     variants:
         by-test-platform:
             linux1804-64/debug: ['fission']
             default: ['fission']
     fission-tier: 2
     run-on-projects:
         by-test-platform:
             android-hw-.*-qr/debug: ['try', 'mozilla-central']
--- a/taskcluster/ci/test/web-platform.yml
+++ b/taskcluster/ci/test/web-platform.yml
@@ -1,16 +1,23 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 ---
 job-defaults:
     suite:
         category: web-platform-tests
     instance-size: xlarge
+    fetches:
+        toolchain:
+            by-test-platform:
+                android-em-7.*:
+                    - android-sdk-linux
+                    - linux64-minidump-stackwalk
+                default: []
     max-run-time:
         by-test-platform:
             android-em-7.0-x86_64/debug: 7200
             default: 5400
     variants:
         by-test-platform:
             linux.*64/debug: ['fission']
             default: ['fission']
--- a/taskcluster/ci/test/xpcshell.yml
+++ b/taskcluster/ci/test/xpcshell.yml
@@ -86,10 +86,11 @@ xpcshell:
                     - win64-node
                     - win32-minidump-stackwalk
                     - win32-fix-stacks
                 win.*32.*:
                     - win32-node
                     - win32-minidump-stackwalk
                     - win32-fix-stacks
                 android-em-7.*:
+                    - android-sdk-linux
                     - linux64-node
                     - linux64-minidump-stackwalk
--- a/taskcluster/ci/webrender/kind.yml
+++ b/taskcluster/ci/webrender/kind.yml
@@ -331,16 +331,18 @@ jobs:
                 MOZHARNESS_SCRIPT: android_wrench.py
                 MOZHARNESS_CONFIG: android/wrench.py
                 NEED_WINDOW_MANAGER: 'true'
         dependencies:
             webrender-wrench-android-debug: webrender-wrench-android-debug
         fetches:
             webrender-wrench-android-debug:
                 - 'wrench-debug.apk'
+            toolchain:
+                - 'android-sdk-linux'
         run:
             using: run-task
             tooltool-downloads: internal
             command: >-
                 export WRENCH_APK=$MOZ_FETCHES_DIR/wrench-debug.apk &&
                 export WRENCH_REFTESTS=$GECKO_PATH/gfx/wr/wrench/reftests &&
                 export MOZHARNESS_PATH=$GECKO_PATH/testing/mozharness &&
                 $GECKO_PATH/taskcluster/scripts/tester/test-linux.sh
@@ -371,16 +373,18 @@ jobs:
                 MOZHARNESS_SCRIPT: android_wrench.py
                 MOZHARNESS_CONFIG: android/wrench.py
                 NEED_WINDOW_MANAGER: 'true'
         dependencies:
             webrender-wrench-android-release: webrender-wrench-android-release
         fetches:
             webrender-wrench-android-release:
                 - 'wrench-release.apk'
+            toolchain:
+                - 'android-sdk-linux'
         run:
             using: run-task
             tooltool-downloads: internal
             command: >-
                 export WRENCH_APK=$MOZ_FETCHES_DIR/wrench-release.apk &&
                 export WRENCH_REFTESTS=$GECKO_PATH/gfx/wr/wrench/reftests &&
                 export MOZHARNESS_PATH=$GECKO_PATH/testing/mozharness &&
                 $GECKO_PATH/taskcluster/scripts/tester/test-linux.sh
--- a/testing/mozharness/configs/android/androidx86_7_0.py
+++ b/testing/mozharness/configs/android/androidx86_7_0.py
@@ -1,35 +1,29 @@
 # mozharness configuration for Android x86/x86_64 7.0 unit tests
 #
 # This configuration should be combined with suite definitions and other
 # mozharness configuration from android_common.py, or similar.
 
+import os
+
 config = {
     "tooltool_manifest_path": "testing/config/tooltool-manifests/androidx86_7_0/releng.manifest",
     "emulator_manifest": """
         [
-        {
-            "algorithm": "sha512",
-            "visibility": "internal",
-            "filename": "android-sdk_r29.2.1.0-linux-x86emu.tar.gz",
-            "unpack": true,
-            "digest": "4014389d2e0c6889edf89a714e4defbd42c2bced79eee1cce726a9b2c921c6d857723f918a9f1b7dca35b9f8d6cbfdf6b47d2934d800bdd396bf5c17ada3b827",
-            "size": 299610245
-        }
         ] """,
     "emulator_avd_name": "test-1",
     "emulator_process_name": "qemu-system-x86_64",
     "emulator_extra_args": "-gpu on -skip-adb-auth -verbose -show-kernel -ranchu -selinux permissive -memory 3072 -cores 4",
     "exes": {
-        'adb': '%(abs_work_dir)s/android-sdk-linux/platform-tools/adb',
+        'adb': '{fetches_dir}/android-sdk-linux/platform-tools/adb'.format(fetches_dir=os.environ['MOZ_FETCHES_DIR']),
     },
     "env": {
         "DISPLAY": ":0.0",
-        "PATH": "%(PATH)s:%(abs_work_dir)s/android-sdk-linux/emulator:%(abs_work_dir)s/android-sdk-linux/tools:%(abs_work_dir)s/android-sdk-linux/platform-tools",
+        "PATH": "%(PATH)s:{fetches_dir}/android-sdk-linux/emulator:{fetches_dir}/android-sdk-linux/tools:{fetches_dir}/android-sdk-linux/platform-tools".format(fetches_dir=os.environ['MOZ_FETCHES_DIR']),
         # "LIBGL_DEBUG": "verbose"
     },
     "bogomips_minimum": 3000,
     # in support of test-verify
     "android_version": 24,
     "is_fennec": False,
     "is_emulator": True,
 }
--- a/testing/mozharness/mozharness/mozilla/testing/android.py
+++ b/testing/mozharness/mozharness/mozilla/testing/android.py
@@ -153,17 +153,17 @@ class AndroidMixin(object):
             env['ANDROID_AVD_HOME'] = avd_path
             self.info("Found avds at %s" % avd_path)
         else:
             self.warning("AVDs missing? Not found at %s" % avd_path)
 
         if "deprecated_sdk_path" in self.config:
             sdk_path = os.path.abspath(os.path.join(avd_home_dir, '..'))
         else:
-            sdk_path = os.path.join(self.abs_dirs['abs_work_dir'], 'android-sdk-linux')
+            sdk_path = os.path.join(os.environ['MOZ_FETCHES_DIR'], 'android-sdk-linux')
         if os.path.exists(sdk_path):
             env['ANDROID_SDK_HOME'] = sdk_path
             self.info("Found sdk at %s" % sdk_path)
         else:
             self.warning("Android sdk missing? Not found at %s" % sdk_path)
 
         if self.use_gles3:
             # enable EGL 3.0 in advancedFeatures.ini