Bug 1410250 - Stop keying entire 'mozharness' section by-test-platform, r?dustin draft
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Thu, 19 Oct 2017 14:35:04 -0400
changeset 683524 4cf468ba19160f3abb0c4c3628a328c3a8815b93
parent 683523 5bd2b8ebdc80ec184b1d3a879cfa566dafbeb046
child 736672 e35e1ebf640f09b4bda5d3232424617714634a01
push id85403
push userahalberstadt@mozilla.com
push dateThu, 19 Oct 2017 21:36:48 +0000
reviewersdustin
bugs1410250
milestone58.0a1
Bug 1410250 - Stop keying entire 'mozharness' section by-test-platform, r?dustin Many of the 'test' tasks key the entire 'mozharness' section by-test-platform. This is bad because: A) Configuration under 'mozharness' can't be shared across platforms B) We can't use the 'job-defaults' simplification since merging is naive Instead of keying the entire 'mozharness' section, this change keys only the specific configuration that needs it. MozReview-Commit-ID: EaPlOzsESQ3
taskcluster/ci/test/compiled.yml
taskcluster/ci/test/marionette.yml
taskcluster/ci/test/misc.yml
taskcluster/ci/test/mochitest.yml
taskcluster/ci/test/reftest.yml
taskcluster/ci/test/xpcshell.yml
taskcluster/taskgraph/transforms/tests.py
--- a/taskcluster/ci/test/compiled.yml
+++ b/taskcluster/ci/test/compiled.yml
@@ -1,39 +1,37 @@
 job-defaults:
     e10s: false
+    mozharness:
+        no-read-buildbot-config: true
+        script:
+            by-test-platform:
+                android.*: android_emulator_unittest.py
+                default: desktop_unittest.py
+        config:
+            by-test-platform:
+                android.*:
+                    - android/androidarm_4_3.py
+                linux.*:
+                    - unittests/linux_unittest.py
+                    - remove_executables.py
+                macosx.*:
+                    - unittests/mac_unittest.py
+                windows.*:
+                    - unittests/win_taskcluster_unittest.py
 
 cppunit:
     description: "CPP Unit Tests"
     suite: cppunittest
     treeherder-symbol: tc(Cpp)
     run-on-projects:
         by-test-platform:
             windows10-64-asan/opt: []  # as an exception to windows.*
             linux64-qr/.*: ['mozilla-central', 'try']
             default: built-projects
-    mozharness:
-        by-test-platform:
-            android.*:
-                script: android_emulator_unittest.py
-                no-read-buildbot-config: true
-                config:
-                    - android/androidarm_4_3.py
-            default:
-                script: desktop_unittest.py
-                no-read-buildbot-config: true
-                config:
-                    by-test-platform:
-                        windows.*:
-                            - unittests/win_taskcluster_unittest.py
-                        macosx.*:
-                            - unittests/mac_unittest.py
-                        linux.*:
-                            - unittests/linux_unittest.py
-                            - remove_executables.py
     tier:
         by-test-platform:
             windows10-64-asan.*: 3
             default: default
 
 gtest:
     description: "GTests run"
     suite: gtest
@@ -41,28 +39,16 @@ gtest:
     instance-size: xlarge
     run-on-projects:
         by-test-platform:
             linux64-qr/.*: ['mozilla-central', 'try']
             windows.*-pgo/.*: [] # permafails on pgo
             windows.*-nightly/.*: [] # permafails on nightly too
             .*-devedition/.*: [] # don't run on devedition
             default: built-projects
-    mozharness:
-        script: desktop_unittest.py
-        no-read-buildbot-config: true
-        config:
-            by-test-platform:
-                windows.*:
-                    - unittests/win_taskcluster_unittest.py
-                macosx.*:
-                    - unittests/mac_unittest.py
-                linux.*:
-                    - unittests/linux_unittest.py
-                    - remove_executables.py
     tier:
         by-test-platform:
             windows7-32-pgo.*: 3
             windows10-64-pgo.*: 3
             windows10-64-asan.*: 3
             default: default
 
 jittest:
@@ -79,23 +65,12 @@ jittest:
             macosx.*: 1
             default: 6
     mozharness:
         chunked:
           by-test-platform:
             windows.*: false
             macosx.*: false
             default: true
-        script: desktop_unittest.py
-        no-read-buildbot-config: true
-        config:
-            by-test-platform:
-                windows.*:
-                    - unittests/win_taskcluster_unittest.py
-                macosx.*:
-                    - unittests/mac_unittest.py
-                linux.*:
-                    - unittests/linux_unittest.py
-                    - remove_executables.py
     tier:
         by-test-platform:
             windows10-64-asan.*: 3
             default: default
--- a/taskcluster/ci/test/marionette.yml
+++ b/taskcluster/ci/test/marionette.yml
@@ -1,10 +1,28 @@
 job-defaults:
     suite: marionette
+    mozharness:
+        no-read-buildbot-config: true
+        script:
+            by-test-platform:
+                android.*: android_emulator_unittest.py
+                default: marionette.py
+        config:
+            by-test-platform:
+                android.*:
+                    - android/androidarm_4_3.py
+                macosx.*:
+                    - marionette/prod_config.py
+                    - marionette/mac_taskcluster_config.py
+                windows.*:
+                    - marionette/windows_taskcluster_config.py
+                default:
+                    - marionette/prod_config.py
+                    - remove_executables.py
 
 marionette:
     description: "Marionette unittest run"
     treeherder-symbol: tc(Mn)
     max-run-time:
         by-test-platform:
             android.*: 3600
             default: 5400
@@ -16,55 +34,21 @@ marionette:
         by-test-platform:
             android.*: 2
             windows10-64-asan.*: 3
             default: default
     chunks:
         by-test-platform:
             android.*: 10
             default: 1
-    mozharness:
-        by-test-platform:
-            android.*:
-                script: android_emulator_unittest.py
-                no-read-buildbot-config: true
-                config:
-                    - android/androidarm_4_3.py
-                extra-options:
-                    - --test-suite=marionette
-            default:
-                script: marionette.py
-                no-read-buildbot-config: true
-                config:
-                    by-test-platform:
-                        windows.*:
-                            - marionette/windows_taskcluster_config.py
-                        macosx.*:
-                            - marionette/prod_config.py
-                            - marionette/mac_taskcluster_config.py
-                        default:
-                            - marionette/prod_config.py
-                            - remove_executables.py
 
 marionette-headless:
     description: "Marionette headless unittest run"
     treeherder-symbol: tc(MnH)
     max-run-time: 5400
     instance-size: default
     mozharness:
-        script: marionette.py
-        no-read-buildbot-config: true
-        config:
-            by-test-platform:
-                windows.*:
-                    - marionette/windows_taskcluster_config.py
-                macosx.*:
-                    - marionette/prod_config.py
-                    - marionette/mac_taskcluster_config.py
-                default:
-                    - marionette/prod_config.py
-                    - remove_executables.py
         extra-options:
             - --headless
     tier:
         by-test-platform:
             windows10-64-asan.*: 3
             default: default
--- a/taskcluster/ci/test/misc.yml
+++ b/taskcluster/ci/test/misc.yml
@@ -61,31 +61,27 @@ test-verify:
             linux64-ccov/.*: []
             default: built-projects
     tier:
         by-test-platform:
             android.*: 3
             windows10-64-asan.*: 3
             default: 2
     mozharness:
-        by-test-platform:
-            android.*:
-                script: android_emulator_unittest.py
-                config:
+        script:
+            by-test-platform:
+                android.*: android_emulator_unittest.py
+                default: desktop_unittest.py
+        config:
+            by-test-platform:
+                android.*:
                     - android/androidarm_4_3.py
-                no-read-buildbot-config: true
-                extra-options:
-                    - --verify
-            default:
-                script: desktop_unittest.py
-                config:
-                    by-test-platform:
-                        windows.*:
-                            - unittests/win_taskcluster_unittest.py
-                        macosx.*:
-                            - remove_executables.py
-                            - unittests/mac_unittest.py
-                        linux.*:
-                            - unittests/linux_unittest.py
-                            - remove_executables.py
-                no-read-buildbot-config: true
-                extra-options:
-                    - --verify
+                linux.*:
+                    - unittests/linux_unittest.py
+                    - remove_executables.py
+                macosx.*:
+                    - remove_executables.py
+                    - unittests/mac_unittest.py
+                windows.*:
+                    - unittests/win_taskcluster_unittest.py
+        no-read-buildbot-config: true
+        extra-options:
+            - --verify
--- a/taskcluster/ci/test/mochitest.yml
+++ b/taskcluster/ci/test/mochitest.yml
@@ -1,8 +1,29 @@
+job-defaults:
+    mozharness:
+        no-read-buildbot-config: true
+        script:
+            by-test-platform:
+                android.*: android_emulator_unittest.py
+                default: desktop_unittest.py
+        config:
+            by-test-platform:
+                android-4.2-x86/opt:
+                    - android/androidx86.py
+                android.*:
+                    - android/androidarm_4_3.py
+                linux.*:
+                    - unittests/linux_unittest.py
+                    - remove_executables.py
+                macosx.*:
+                    - unittests/mac_unittest.py
+                windows.*:
+                    - unittests/win_taskcluster_unittest.py
+
 mochitest:
     description: "Mochitest plain run"
     suite:
         by-test-platform:
             linux64-jsdcov/opt: mochitest/plain-chunked-coverage
             default: mochitest/plain-chunked
     treeherder-symbol: tc-M()
     loopback-video: true
@@ -31,64 +52,39 @@ mochitest:
             linux64-jsdcov/opt: 10800
             default: 5400
     allow-software-gl-layers: false
     tier:
         by-test-platform:
             windows10-64-asan.*: 3
             default: default
     mozharness:
-        by-test-platform:
-            android.*:
-                mochitest-flavor: plain
-                script: android_emulator_unittest.py
-                no-read-buildbot-config: true
-                config:
-                    - android/androidarm_4_3.py
-                extra-options:
+        mochitest-flavor: plain
+        extra-options:
+            by-test-platform:
+                android.*:
                     - --test-suite=mochitest
-            default:
-                mochitest-flavor: plain
-                script: desktop_unittest.py
-                no-read-buildbot-config: true
-                chunked: true
-                config:
-                    by-test-platform:
-                        windows.*:
-                            - unittests/win_taskcluster_unittest.py
-                        macosx.*:
-                            - unittests/mac_unittest.py
-                        linux.*:
-                            - unittests/linux_unittest.py
-                            - remove_executables.py
+                default: []
+        chunked:
+            by-test-platform:
+                android.*: false
+                default: true
 
 mochitest-a11y:
     description: "Mochitest a11y run"
     suite: mochitest/a11y
     treeherder-symbol: tc-M(a11y)
     loopback-video: true
     e10s: false
     run-on-projects:
         by-test-platform:
             linux64-qr/.*: ['mozilla-central', 'try']
             default: built-projects
     mozharness:
-        script: desktop_unittest.py
-        no-read-buildbot-config: true
-        chunked: false
         mochitest-flavor: a11y
-        config:
-            by-test-platform:
-                windows.*:
-                    - unittests/win_taskcluster_unittest.py
-                macosx.*:
-                    - unittests/mac_unittest.py
-                linux.*:
-                    - unittests/linux_unittest.py
-                    - remove_executables.py
     tier:
         by-test-platform:
             windows10-64-asan.*: 3
             default: default
 
 mochitest-browser-chrome:
     description: "Mochitest browser-chrome run"
     suite:
@@ -117,28 +113,17 @@ mochitest-browser-chrome:
             linux64-ccov/opt: 7200
             linux64/debug: 5400
             linux64-stylo-disabled/debug: 5400
             linux32/debug: 5400
             linux32-stylo-disabled/debug: 5400
             default: 3600
     mozharness:
         mochitest-flavor: browser
-        script: desktop_unittest.py
-        no-read-buildbot-config: true
         chunked: true
-        config:
-            by-test-platform:
-                windows.*:
-                    - unittests/win_taskcluster_unittest.py
-                macosx.*:
-                    - unittests/mac_unittest.py
-                linux.*:
-                    - unittests/linux_unittest.py
-                    - remove_executables.py
     # Bug 1281241: migrating to m3.large instances
     instance-size:
         by-test-platform:
             linux64-jsdcov/opt: xlarge
             default: legacy
     allow-software-gl-layers: false
     tier:
         by-test-platform:
@@ -156,27 +141,16 @@ mochitest-browser-screenshots:
             linux64/opt: ['mozilla-central', 'try']
             macosx.*/opt: ['mozilla-central', 'try']
             windows7-32-devedition/opt: []
             windows10-64-devedition/opt: []
             default: []
     max-run-time: 3600
     mozharness:
         mochitest-flavor: browser
-        script: desktop_unittest.py
-        no-read-buildbot-config: true
-        config:
-            by-test-platform:
-                windows.*:
-                    - unittests/win_taskcluster_unittest.py
-                macosx.*:
-                    - unittests/mac_unittest.py
-                linux.*:
-                    - unittests/linux_unittest.py
-                    - remove_executables.py
     allow-software-gl-layers: false
 
 mochitest-chrome:
     description: "Mochitest chrome run"
     suite: mochitest/chrome
     treeherder-symbol: tc-M(c)
     loopback-video: true
     instance-size:
@@ -186,44 +160,30 @@ mochitest-chrome:
     chunks:
         by-test-platform:
             android-4.3-arm7-api-16/debug: 4
             android.*: 2
             default: 3
     max-run-time: 3600
     e10s: false
     mozharness:
-        by-test-platform:
-            android.*:
-                mochitest-flavor: chrome
-                script: android_emulator_unittest.py
-                no-read-buildbot-config: true
-                config:
-                    by-test-platform:
-                        android-4.2-x86/opt:
-                            - android/androidx86.py
-                        default:
-                            - android/androidarm_4_3.py
-                extra-options:
+        mochitest-flavor: chrome
+        config:
+            by-test-platform:
+                macosx.*:
+                    - remove_executables.py
+        extra-options:
+            by-test-platform:
+                android.*:
                     - --test-suite=mochitest-chrome
-            default:
-                mochitest-flavor: chrome
-                script: desktop_unittest.py
-                no-read-buildbot-config: true
-                chunked: true
-                config:
-                    by-test-platform:
-                        windows.*:
-                            - unittests/win_taskcluster_unittest.py
-                        macosx.*:
-                            - remove_executables.py
-                            - unittests/mac_unittest.py
-                        linux.*:
-                            - unittests/linux_unittest.py
-                            - remove_executables.py
+                default: []
+        chunked:
+            by-test-platform:
+                android.*: false
+                default: true
     tier:
         by-test-platform:
             windows10-64-asan.*: 3
             default: default
 
 mochitest-clipboard:
     description: "Mochitest clipboard run"
     suite: mochitest/clipboard
@@ -236,42 +196,27 @@ mochitest-clipboard:
             windows7-32.*: buildbot-bridge/buildbot-bridge
             windows10-64.*: buildbot-bridge/buildbot-bridge
             default: null
     e10s:
         by-test-platform:
             windows7-32/debug: both
             default: true
     mozharness:
-        by-test-platform:
-            android.*:
-                mochitest-flavor: plain
-                script: android_emulator_unittest.py
-                no-read-buildbot-config: true
-                config:
-                    - android/androidarm_4_3.py
-                extra-options:
+        mochitest-flavor: plain
+        config:
+            by-test-platform:
+                macosx.*:
+                    - remove_executables.py
+        extra-options:
+            by-test-platform:
+                android.*:
                     # note that Android runs fewer suites than other platforms
                     - --test-suite=mochitest-plain-clipboard
-            default:
-                mochitest-flavor: plain
-                script: desktop_unittest.py
-                no-read-buildbot-config: true
-                chunked: false
-                config:
-                    by-test-platform:
-                        windows.*:
-                            - unittests/win_taskcluster_unittest.py
-                        macosx.*:
-                            - remove_executables.py
-                            - unittests/mac_unittest.py
-                        linux.*:
-                            - unittests/linux_unittest.py
-                            - remove_executables.py
-                extra-options:
+                default:
                     - --mochitest-suite=plain-clipboard,chrome-clipboard,browser-chrome-clipboard
 
 mochitest-devtools-chrome:
     description: "Mochitest devtools-chrome run"
     suite:
         by-test-platform:
             linux64-jsdcov/opt: mochitest/mochitest-devtools-chrome-coverage
             default: mochitest/mochitest-devtools-chrome-chunked
@@ -285,28 +230,17 @@ mochitest-devtools-chrome:
             default: 10
     e10s:
         by-test-platform:
             linux64-jsdcov/opt: false
             windows7-32/debug: both
             default: true
     mozharness:
         mochitest-flavor: chrome
-        script: desktop_unittest.py
-        no-read-buildbot-config: true
         chunked: true
-        config:
-            by-test-platform:
-                windows.*:
-                    - unittests/win_taskcluster_unittest.py
-                macosx.*:
-                    - unittests/mac_unittest.py
-                linux.*:
-                    - unittests/linux_unittest.py
-                    - remove_executables.py
     instance-size:
         by-test-platform:
             # Bug 1281241: migrating to m3.large instances
             linux64-asan/opt: legacy
             default: default
     # Bug 1296086: high number of intermittents observed with software GL and large instances
     allow-software-gl-layers: false
     tier:
@@ -320,41 +254,23 @@ mochitest-gpu:
     treeherder-symbol: tc-M(gpu)
     loopback-video: true
     virtualization: virtual-with-gpu
     e10s:
         by-test-platform:
             windows7-32/debug: both
             default: true
     mozharness:
-        by-test-platform:
-            android.*:
-                mochitest-flavor: plain
-                script: android_emulator_unittest.py
-                no-read-buildbot-config: true
-                config:
-                    - android/androidarm_4_3.py
-                extra-options:
+        mochitest-flavor: plain
+        extra-options:
+            by-test-platform:
+                android.*:
                     # note that Android runs fewer suites than other platforms
                     - --test-suite=mochitest-plain-gpu
-            default:
-                mochitest-flavor: plain
-                script: desktop_unittest.py
-                no-read-buildbot-config: true
-                chunked: false
-                config:
-                    by-test-platform:
-                        windows.*:
-                            - unittests/win_taskcluster_unittest.py
-                        macosx.*:
-                            - unittests/mac_unittest.py
-                        linux.*:
-                            - unittests/linux_unittest.py
-                            - remove_executables.py
-                extra-options:
+                default:
                     - --mochitest-suite=plain-gpu,chrome-gpu,browser-chrome-gpu
     tier:
         by-test-platform:
             linux64-qr/.*: 1
             windows10-64-asan.*: 3
             default: default
 
 mochitest-media:
@@ -369,41 +285,23 @@ mochitest-media:
             default: large
     chunks:
         by-test-platform:
             android.*: 3
             macosx64.*: 1
             windows10-64.*: 1
             default: 3
     mozharness:
-        by-test-platform:
-            android.*:
-                mochitest-flavor: plain
-                script: android_emulator_unittest.py
-                no-read-buildbot-config: true
-                config:
-                    - android/androidarm_4_3.py
-            default:
-                mochitest-flavor: plain
-                script: desktop_unittest.py
-                no-read-buildbot-config: true
-                chunked:
-                  by-test-platform:
-                    macosx64.*: false
-                    windows10-64.*: false
-                    default: true
-                config:
-                    by-test-platform:
-                        windows.*:
-                            - unittests/win_taskcluster_unittest.py
-                        macosx.*:
-                            - unittests/mac_unittest.py
-                        linux.*:
-                            - unittests/linux_unittest.py
-                            - remove_executables.py
+        mochitest-flavor: plain
+        chunked:
+            by-test-platform:
+                android.*: false
+                macosx64.*: false
+                windows10-64.*: false
+                default: true
     tier:
         by-test-platform:
             linux64-qr/.*: 1
             windows10-64-asan.*: 3
             default: default
 
 mochitest-plain-headless:
     description: "Mochitest plain headless run"
@@ -415,28 +313,17 @@ mochitest-plain-headless:
         by-test-platform:
             linux.*: 10
     e10s: true
     max-run-time: 5400
     allow-software-gl-layers: false
     tier: default
     mozharness:
         mochitest-flavor: plain
-        script: desktop_unittest.py
-        no-read-buildbot-config: true
         chunked: true
-        config:
-            by-test-platform:
-                windows.*:
-                    - unittests/win_taskcluster_unittest.py
-                macosx.*:
-                    - unittests/mac_unittest.py
-                linux.*:
-                    - unittests/linux_unittest.py
-                    - remove_executables.py
         extra-options:
             - --headless
 
 mochitest-valgrind:
     description: "Mochitest plain Valgrind run"
     suite: mochitest/valgrind-plain
     treeherder-symbol: tc-M-V()
     run-on-projects: []
@@ -445,28 +332,17 @@ mochitest-valgrind:
     chunks: 40
     max-run-time: 14400
     # We could re-enable e10s later.
     # There's no intrinsic reason not to use it.
     e10s: false
     allow-software-gl-layers: false
     mozharness:
         mochitest-flavor: plain
-        script: desktop_unittest.py
-        no-read-buildbot-config: true
         chunked: true
-        config:
-            by-test-platform:
-                windows.*:
-                    - unittests/win_taskcluster_unittest.py
-                macosx.*:
-                    - unittests/mac_unittest.py
-                linux.*:
-                    - unittests/linux_unittest.py
-                    - remove_executables.py
 
 mochitest-webgl:
     description: "Mochitest webgl run"
     suite: mochitest/mochitest-gl
     treeherder-symbol: tc-M(gl)
     virtualization: virtual-with-gpu
     chunks:
         by-test-platform:
@@ -485,34 +361,18 @@ mochitest-webgl:
             default: 3600
     instance-size:
         by-test-platform:
             android.*: xlarge
             default: default
     # Bug 1296733: llvmpipe with mesa 9.2.1 lacks thread safety
     allow-software-gl-layers: false
     mozharness:
-        by-test-platform:
-            android.*:
-                mochitest-flavor: plain
-                script: android_emulator_unittest.py
-                no-read-buildbot-config: true
-                config:
-                    - android/androidarm_4_3.py
-            default:
-                mochitest-flavor: plain
-                script: desktop_unittest.py
-                no-read-buildbot-config: true
-                chunked: true
-                config:
-                    by-test-platform:
-                        windows.*:
-                            - unittests/win_taskcluster_unittest.py
-                        macosx.*:
-                            - unittests/mac_unittest.py
-                        linux.*:
-                            - unittests/linux_unittest.py
-                            - remove_executables.py
+        mochitest-flavor: plain
+        chunked:
+            by-test-platform:
+                android.*: false
+                default: true
     tier:
         by-test-platform:
             linux64-qr/.*: 1
             windows10-64-asan.*: 3
             default: default
--- a/taskcluster/ci/test/reftest.yml
+++ b/taskcluster/ci/test/reftest.yml
@@ -1,8 +1,27 @@
+job-defaults:
+    mozharness:
+        no-read-buildbot-config: true
+        script:
+            by-test-platform:
+                android.*: android_emulator_unittest.py
+                default: desktop_unittest.py
+        config:
+            by-test-platform:
+                android.*:
+                    - android/androidarm_4_3.py
+                linux.*:
+                    - unittests/linux_unittest.py
+                    - remove_executables.py
+                macosx.*:
+                    - unittests/mac_unittest.py
+                windows.*:
+                    - unittests/win_taskcluster_unittest.py
+
 crashtest:
     description: "Crashtest run"
     suite: reftest/crashtest
     treeherder-symbol: tc-R(C)
     instance-size:
         by-test-platform:
             android.*: xlarge
             default: default
@@ -10,36 +29,16 @@ crashtest:
         by-test-platform:
             android-4.3-arm7-api-16/debug: 10
             android.*: 4
             default: 1
     e10s:
         by-test-platform:
             windows10-64/debug: both
             default: true
-    mozharness:
-        by-test-platform:
-            android.*:
-                script: android_emulator_unittest.py
-                no-read-buildbot-config: true
-                config:
-                    - android/androidarm_4_3.py
-            default:
-                script: desktop_unittest.py
-                chunked: false
-                no-read-buildbot-config: true
-                config:
-                    by-test-platform:
-                        windows.*:
-                            - unittests/win_taskcluster_unittest.py
-                        macosx.*:
-                            - unittests/mac_unittest.py
-                        linux.*:
-                            - unittests/linux_unittest.py
-                            - remove_executables.py
     tier:
         by-test-platform:
             linux64-qr/.*: 1
             windows10-64-asan.*: 3
             default: default
 
 jsreftest:
     description: "JS Reftest run"
@@ -62,36 +61,16 @@ jsreftest:
         by-test-platform:
             linux64-jsdcov/opt: false
             windows10-64/debug: both
             default: true
     max-run-time:
         by-test-platform:
             android.*: 7200
             default: 3600
-    mozharness:
-        by-test-platform:
-            android.*:
-                script: android_emulator_unittest.py
-                no-read-buildbot-config: true
-                config:
-                    - android/androidarm_4_3.py
-            default:
-                script: desktop_unittest.py
-                no-read-buildbot-config: true
-                chunked: true
-                config:
-                    by-test-platform:
-                        windows.*:
-                            - unittests/win_taskcluster_unittest.py
-                        macosx.*:
-                            - unittests/mac_unittest.py
-                        linux.*:
-                            - unittests/linux_unittest.py
-                            - remove_executables.py
     when:
         schedules: ['jsreftest']
     tier:
         by-test-platform:
             linux64-qr/.*: 1
             windows10-64-asan.*: 3
             default: default
 
@@ -121,40 +100,22 @@ reftest:
         by-test-platform:
             windows10-64/debug: both
             default: true
     max-run-time:
         by-test-platform:
             android.*: 7200
             default: 3600
     mozharness:
-        by-test-platform:
-            android.*:
-                script: android_emulator_unittest.py
-                no-read-buildbot-config: true
-                config:
-                    - android/androidarm_4_3.py
-            default:
-                script: desktop_unittest.py
-                no-read-buildbot-config: true
-                chunked:
-                  by-test-platform:
-                    macosx64/opt: false
-                    windows10-64.*/opt: false
-                    windows10-64.*/debug: true
-                    default: true
-                config:
-                    by-test-platform:
-                        windows.*:
-                            - unittests/win_taskcluster_unittest.py
-                        macosx.*:
-                            - unittests/mac_unittest.py
-                        linux.*:
-                            - unittests/linux_unittest.py
-                            - remove_executables.py
+        chunked:
+            by-test-platform:
+                android.*: false
+                macosx64/opt: false
+                windows10-64.*/opt: false
+                default: true
     tier:
         by-test-platform:
             linux64-qr/.*: 1
             windows10-64-asan.*: 3
             default: default
 
 reftest-gpu:
     description: "Reftest GPU run"
@@ -165,28 +126,17 @@ reftest-gpu:
         by-test-platform:
             windows10.*: []
             windows8-64.*: []
             default: built-projects
     instance-size: default
     virtualization: virtual-with-gpu
     max-run-time: 3600
     mozharness:
-        script: desktop_unittest.py
-        no-read-buildbot-config: true
         chunked: true
-        config:
-            by-test-platform:
-                windows.*:
-                    - unittests/win_taskcluster_unittest.py
-                macosx.*:
-                    - unittests/mac_unittest.py
-                linux.*:
-                    - unittests/linux_unittest.py
-                    - remove_executables.py
     tier: default
 
 reftest-no-accel:
     description: "Reftest not accelerated run"
     suite: reftest/reftest-no-accel
     treeherder-symbol: tc-R(Ru)
     virtualization: virtual-with-gpu
     worker-type:
@@ -200,47 +150,24 @@ reftest-no-accel:
             windows10-64.*/opt: 1
             default: 8
     e10s:
         by-test-platform:
             linux64-jsdcov/opt: false
             windows10-64/debug: both
             default: true
     mozharness:
-        script: desktop_unittest.py
-        no-read-buildbot-config: true
         chunked:
             by-test-platform:
                 windows10-64.*/opt: false
                 macosx.*: false
                 default: true
-        config:
-            by-test-platform:
-                windows.*:
-                    - unittests/win_taskcluster_unittest.py
-                macosx.*:
-                    - unittests/mac_unittest.py
-                linux.*:
-                    - unittests/linux_unittest.py
-                    - remove_executables.py
     tier:
         by-test-platform:
             windows10-64-asan.*: 3
             default: default
 
 reftest-stylo:
     description: "Reftest run in Stylo vs. Gecko mode"
     suite: reftest/reftest-stylo
     treeherder-symbol: tc-R(Rs)
     virtualization: virtual-with-gpu
     chunks: 8
-    mozharness:
-        script: desktop_unittest.py
-        no-read-buildbot-config: true
-        config:
-            by-test-platform:
-                windows.*:
-                    - unittests/win_taskcluster_unittest.py
-                macosx.*:
-                    - unittests/mac_unittest.py
-                default:
-                    - unittests/linux_unittest.py
-                    - remove_executables.py
--- a/taskcluster/ci/test/xpcshell.yml
+++ b/taskcluster/ci/test/xpcshell.yml
@@ -1,8 +1,34 @@
+job-defaults:
+    mozharness:
+        no-read-buildbot-config: true
+        script:
+            by-test-platform:
+                android.*: android_emulator_unittest.py
+                default: desktop_unittest.py
+        config:
+            by-test-platform:
+                android-4.2-x86/opt:
+                    - android/androidx86.py
+                android.*:
+                    - android/androidarm_4_3.py
+                linux.*:
+                    - unittests/linux_unittest.py
+                    - remove_executables.py
+                macosx.*:
+                    - unittests/mac_unittest.py
+                windows.*:
+                    - unittests/win_taskcluster_unittest.py
+        requires-signed-builds:
+            by-test-platform:
+                windows10-64-asan/opt: false    # No XPCShell on ASAN yet
+                windows.*: true
+                default: false
+
 xpcshell:
     description: "xpcshell test run"
     suite:
         by-test-platform:
             linux64-jsdcov/opt: xpcshell/xpcshell-coverage
             default: xpcshell
     treeherder-symbol: tc-X(X)
     run-on-projects:
@@ -20,40 +46,12 @@ xpcshell:
             default: 8
     instance-size:
         by-test-platform:
             android.*: xlarge
             default: default
     max-run-time: 5400
     e10s: false
     allow-software-gl-layers: false
-    mozharness:
-        by-test-platform:
-            android.*:
-                script: android_emulator_unittest.py
-                no-read-buildbot-config: true
-                config:
-                    by-test-platform:
-                        android-4.2-x86/opt:
-                            - android/androidx86.py
-                        default:
-                            - android/androidarm_4_3.py
-            default:
-                script: desktop_unittest.py
-                no-read-buildbot-config: true
-                config:
-                    by-test-platform:
-                        windows.*:
-                            - unittests/win_taskcluster_unittest.py
-                        macosx.*:
-                            - unittests/mac_unittest.py
-                        linux.*:
-                            - unittests/linux_unittest.py
-                            - remove_executables.py
-                requires-signed-builds:
-                    by-test-platform:
-                        windows10-64-asan/opt: false    # No XPCShell on ASAN yet
-                        windows.*: true
-                        default: false
     tier:
         by-test-platform:
             windows10-64-asan.*: 3
             default: default
--- a/taskcluster/taskgraph/transforms/tests.py
+++ b/taskcluster/taskgraph/transforms/tests.py
@@ -258,86 +258,86 @@ test_description_schema = Schema({
     # Whether to perform a gecko checkout.
     Required('checkout', default=False): bool,
 
     # Wheter to perform a machine reboot after test is done
     Optional('reboot', default=False):
         Any(False, 'always', 'on-exception', 'on-failure'),
 
     # What to run
-    Required('mozharness'): optionally_keyed_by(
-        'test-platform', {
-            # the mozharness script used to run this task
-            Required('script'): basestring,
+    Required('mozharness'): {
+        # the mozharness script used to run this task
+        Required('script'): optionally_keyed_by(
+            'test-platform',
+            basestring),
 
-            # the config files required for the task
-            Required('config'): optionally_keyed_by(
-                'test-platform',
-                [basestring]),
+        # the config files required for the task
+        Required('config'): optionally_keyed_by(
+            'test-platform',
+            [basestring]),
 
-            # mochitest flavor for mochitest runs
-            Optional('mochitest-flavor'): basestring,
+        # mochitest flavor for mochitest runs
+        Optional('mochitest-flavor'): basestring,
 
-            # any additional actions to pass to the mozharness command
-            Optional('actions'): [basestring],
+        # any additional actions to pass to the mozharness command
+        Optional('actions'): [basestring],
 
-            # additional command-line options for mozharness, beyond those
-            # automatically added
-            Required('extra-options', default=[]): optionally_keyed_by(
-                'test-platform',
-                [basestring]),
+        # additional command-line options for mozharness, beyond those
+        # automatically added
+        Required('extra-options', default=[]): optionally_keyed_by(
+            'test-platform',
+            [basestring]),
 
-            # the artifact name (including path) to test on the build task; this is
-            # generally set in a per-kind transformation
-            Optional('build-artifact-name'): basestring,
+        # the artifact name (including path) to test on the build task; this is
+        # generally set in a per-kind transformation
+        Optional('build-artifact-name'): basestring,
 
-            # If true, tooltool downloads will be enabled via relengAPIProxy.
-            Required('tooltool-downloads', default=False): bool,
+        # If true, tooltool downloads will be enabled via relengAPIProxy.
+        Required('tooltool-downloads', default=False): bool,
 
-            # This mozharness script also runs in Buildbot and tries to read a
-            # buildbot config file, so tell it not to do so in TaskCluster
-            Required('no-read-buildbot-config', default=False): bool,
+        # This mozharness script also runs in Buildbot and tries to read a
+        # buildbot config file, so tell it not to do so in TaskCluster
+        Required('no-read-buildbot-config', default=False): bool,
 
-            # Add --blob-upload-branch=<project> mozharness parameter
-            Optional('include-blob-upload-branch'): bool,
-
-            # The setting for --download-symbols (if omitted, the option will not
-            # be passed to mozharness)
-            Optional('download-symbols'): Any(True, 'ondemand'),
+        # Add --blob-upload-branch=<project> mozharness parameter
+        Optional('include-blob-upload-branch'): bool,
 
-            # If set, then MOZ_NODE_PATH=/usr/local/bin/node is included in the
-            # environment.  This is more than just a helpful path setting -- it
-            # causes xpcshell tests to start additional servers, and runs
-            # additional tests.
-            Required('set-moz-node-path', default=False): bool,
+        # The setting for --download-symbols (if omitted, the option will not
+        # be passed to mozharness)
+        Optional('download-symbols'): Any(True, 'ondemand'),
 
-            # If true, include chunking information in the command even if the number
-            # of chunks is 1
-            Required('chunked', default=False): optionally_keyed_by(
-                'test-platform',
-                bool),
+        # If set, then MOZ_NODE_PATH=/usr/local/bin/node is included in the
+        # environment.  This is more than just a helpful path setting -- it
+        # causes xpcshell tests to start additional servers, and runs
+        # additional tests.
+        Required('set-moz-node-path', default=False): bool,
 
-            # The chunking argument format to use
-            Required('chunking-args', default='this-chunk'): Any(
-                # Use the usual --this-chunk/--total-chunk arguments
-                'this-chunk',
-                # Use --test-suite=<suite>-<chunk-suffix>; see chunk-suffix, below
-                'test-suite-suffix',
-            ),
+        # If true, include chunking information in the command even if the number
+        # of chunks is 1
+        Required('chunked', default=False): optionally_keyed_by(
+            'test-platform',
+            bool),
 
-            # the string to append to the `--test-suite` arugment when
-            # chunking-args = test-suite-suffix; "<CHUNK>" in this string will
-            # be replaced with the chunk number.
-            Optional('chunk-suffix'): basestring,
+        # The chunking argument format to use
+        Required('chunking-args', default='this-chunk'): Any(
+            # Use the usual --this-chunk/--total-chunk arguments
+            'this-chunk',
+            # Use --test-suite=<suite>-<chunk-suffix>; see chunk-suffix, below
+            'test-suite-suffix',
+        ),
 
-            Required('requires-signed-builds', default=False): optionally_keyed_by(
-                'test-platform',
-                bool),
-        }
-    ),
+        # the string to append to the `--test-suite` arugment when
+        # chunking-args = test-suite-suffix; "<CHUNK>" in this string will
+        # be replaced with the chunk number.
+        Optional('chunk-suffix'): basestring,
+
+        Required('requires-signed-builds', default=False): optionally_keyed_by(
+            'test-platform',
+            bool),
+    },
 
     # The current chunk; this is filled in by `all_kinds.py`
     Optional('this-chunk'): int,
 
     # os user groups for test task workers; required scopes, will be
     # added automatically
     Optional('os-groups', default=[]): optionally_keyed_by(
         'test-platform',
@@ -611,16 +611,17 @@ def handle_keyed_by(config, tests):
         'e10s',
         'suite',
         'run-on-projects',
         'os-groups',
         'mozharness.chunked',
         'mozharness.config',
         'mozharness.extra-options',
         'mozharness.requires-signed-builds',
+        'mozharness.script',
         'worker-type',
     ]
     for test in tests:
         for field in fields:
             resolve_keyed_by(test, field, item_name=test['test-name'],
                              project=config.params['project'])
         yield test