diff --git a/taskcluster/ci/desktop-test/tests.yml b/taskcluster/ci/desktop-test/tests.yml index b1462bda0f6e..9c60434b19a5 100644 --- a/taskcluster/ci/desktop-test/tests.yml +++ b/taskcluster/ci/desktop-test/tests.yml @@ -14,8 +14,15 @@ cppunit: script: mozharness/scripts/desktop_unittest.py no-read-buildbot-config: true config: - - mozharness/configs/unittests/linux_unittest.py - - mozharness/configs/remove_executables.py + by-test-platform: + # Coming soon: + # win.*: + # - mozharness/configs/unittests/win_unittest.py + # - mozharness/configs/remove_executables.py + # ... + default: + - mozharness/configs/unittests/linux_unittest.py + - mozharness/configs/remove_executables.py extra-options: - --cppunittest-suite=cppunittest @@ -28,8 +35,10 @@ crashtest: chunked: true no-read-buildbot-config: true config: - - mozharness/configs/unittests/linux_unittest.py - - mozharness/configs/remove_executables.py + by-test-platform: + default: + - mozharness/configs/unittests/linux_unittest.py + - mozharness/configs/remove_executables.py extra-options: - --reftest-suite=crashtest @@ -87,8 +96,10 @@ gtest: script: mozharness/scripts/desktop_unittest.py no-read-buildbot-config: true config: - - mozharness/configs/unittests/linux_unittest.py - - mozharness/configs/remove_executables.py + by-test-platform: + default: + - mozharness/configs/unittests/linux_unittest.py + - mozharness/configs/remove_executables.py extra-options: - --gtest-suite=gtest @@ -102,8 +113,10 @@ jittests: script: mozharness/scripts/desktop_unittest.py no-read-buildbot-config: true config: - - mozharness/configs/unittests/linux_unittest.py - - mozharness/configs/remove_executables.py + by-test-platform: + default: + - mozharness/configs/unittests/linux_unittest.py + - mozharness/configs/remove_executables.py extra-options: - --jittest-suite=jittest-chunked @@ -116,8 +129,10 @@ jsreftest: script: mozharness/scripts/desktop_unittest.py no-read-buildbot-config: true config: - - mozharness/configs/unittests/linux_unittest.py - - mozharness/configs/remove_executables.py + by-test-platform: + default: + - mozharness/configs/unittests/linux_unittest.py + - mozharness/configs/remove_executables.py extra-options: - --reftest-suite=jsreftest @@ -145,8 +160,10 @@ mochitest: no-read-buildbot-config: true chunked: true config: - - mozharness/configs/unittests/linux_unittest.py - - mozharness/configs/remove_executables.py + by-test-platform: + default: + - mozharness/configs/unittests/linux_unittest.py + - mozharness/configs/remove_executables.py extra-options: - --mochitest-suite=plain-chunked @@ -161,8 +178,10 @@ mochitest-a11y: no-read-buildbot-config: true chunked: true config: - - mozharness/configs/unittests/linux_unittest.py - - mozharness/configs/remove_executables.py + by-test-platform: + default: + - mozharness/configs/unittests/linux_unittest.py + - mozharness/configs/remove_executables.py extra-options: - --mochitest-suite=a11y @@ -180,8 +199,10 @@ mochitest-browser-chrome: script: mozharness/scripts/desktop_unittest.py no-read-buildbot-config: true config: - - mozharness/configs/unittests/linux_unittest.py - - mozharness/configs/remove_executables.py + by-test-platform: + default: + - mozharness/configs/unittests/linux_unittest.py + - mozharness/configs/remove_executables.py extra-options: - --mochitest-suite=browser-chrome-chunked @@ -196,8 +217,10 @@ mochitest-chrome: script: mozharness/scripts/desktop_unittest.py no-read-buildbot-config: true config: - - mozharness/configs/unittests/linux_unittest.py - - mozharness/configs/remove_executables.py + by-test-platform: + default: + - mozharness/configs/unittests/linux_unittest.py + - mozharness/configs/remove_executables.py extra-options: - --mochitest-suite=chrome @@ -212,8 +235,10 @@ mochitest-clipboard: no-read-buildbot-config: true chunked: true config: - - mozharness/configs/unittests/linux_unittest.py - - mozharness/configs/remove_executables.py + by-test-platform: + default: + - mozharness/configs/unittests/linux_unittest.py + - mozharness/configs/remove_executables.py extra-options: - --mochitest-suite=plain-clipboard,chrome-clipboard,browser-chrome-clipboard,jetpack-package-clipboard @@ -233,8 +258,10 @@ mochitest-devtools-chrome: script: mozharness/scripts/desktop_unittest.py no-read-buildbot-config: true config: - - mozharness/configs/unittests/linux_unittest.py - - mozharness/configs/remove_executables.py + by-test-platform: + default: + - mozharness/configs/unittests/linux_unittest.py + - mozharness/configs/remove_executables.py extra-options: - --mochitest-suite=mochitest-devtools-chrome-chunked @@ -248,8 +275,10 @@ mochitest-gpu: no-read-buildbot-config: true chunked: true config: - - mozharness/configs/unittests/linux_unittest.py - - mozharness/configs/remove_executables.py + by-test-platform: + default: + - mozharness/configs/unittests/linux_unittest.py + - mozharness/configs/remove_executables.py extra-options: - --mochitest-suite=plain-gpu,chrome-gpu,browser-chrome-gpu @@ -265,8 +294,10 @@ mochitest-jetpack: no-read-buildbot-config: true chunked: true config: - - mozharness/configs/unittests/linux_unittest.py - - mozharness/configs/remove_executables.py + by-test-platform: + default: + - mozharness/configs/unittests/linux_unittest.py + - mozharness/configs/remove_executables.py extra-options: - --mochitest-suite=jetpack-package @@ -283,8 +314,10 @@ mochitest-media: no-read-buildbot-config: true chunked: true config: - - mozharness/configs/unittests/linux_unittest.py - - mozharness/configs/remove_executables.py + by-test-platform: + default: + - mozharness/configs/unittests/linux_unittest.py + - mozharness/configs/remove_executables.py extra-options: - --mochitest-suite=mochitest-media @@ -299,8 +332,10 @@ mochitest-webgl: no-read-buildbot-config: true chunked: true config: - - mozharness/configs/unittests/linux_unittest.py - - mozharness/configs/remove_executables.py + by-test-platform: + default: + - mozharness/configs/unittests/linux_unittest.py + - mozharness/configs/remove_executables.py extra-options: - --mochitest-suite=mochitest-gl @@ -313,8 +348,10 @@ reftest: script: mozharness/scripts/desktop_unittest.py no-read-buildbot-config: true config: - - mozharness/configs/unittests/linux_unittest.py - - mozharness/configs/remove_executables.py + by-test-platform: + default: + - mozharness/configs/unittests/linux_unittest.py + - mozharness/configs/remove_executables.py extra-options: - --reftest-suite=reftest @@ -327,8 +364,10 @@ reftest-no-accel: script: mozharness/scripts/desktop_unittest.py no-read-buildbot-config: true config: - - mozharness/configs/unittests/linux_unittest.py - - mozharness/configs/remove_executables.py + by-test-platform: + default: + - mozharness/configs/unittests/linux_unittest.py + - mozharness/configs/remove_executables.py extra-options: - --reftest-suite=reftest-no-accel @@ -379,7 +418,9 @@ xpcshell: script: mozharness/scripts/desktop_unittest.py no-read-buildbot-config: true config: - - mozharness/configs/unittests/linux_unittest.py - - mozharness/configs/remove_executables.py + by-test-platform: + default: + - mozharness/configs/unittests/linux_unittest.py + - mozharness/configs/remove_executables.py extra-options: - --xpcshell-suite=xpcshell diff --git a/taskcluster/taskgraph/transforms/base.py b/taskcluster/taskgraph/transforms/base.py index 1d7916bcde37..3965e3cad4eb 100644 --- a/taskcluster/taskgraph/transforms/base.py +++ b/taskcluster/taskgraph/transforms/base.py @@ -4,6 +4,7 @@ from __future__ import absolute_import, print_function, unicode_literals +import re import voluptuous @@ -77,8 +78,9 @@ def get_keyed_by(item, field, item_name, subfield=None): other attribute of the item, perform that lookup. For example, this supports chunks: - by-item-platform: + by-test-platform: macosx-10.11/debug: 13 + win.*: 6 default: 12 The `item_name` parameter is used to generate useful error messages. @@ -87,7 +89,7 @@ def get_keyed_by(item, field, item_name, subfield=None): mozharness: config: - by-item-platform: + by-test-platform: default: ... """ value = item[field] @@ -103,6 +105,13 @@ def get_keyed_by(item, field, item_name, subfield=None): values = value[keyed_by] if keyed_by.startswith('by-'): keyed_by = keyed_by[3:] # extract just the keyed-by field name + if item[keyed_by] in values: + return values[item[keyed_by]] + for k in values.keys(): + if re.match(k, item[keyed_by]): + return values[k] + if 'default' in values: + return values['default'] for k in item[keyed_by], 'default': if k in values: return values[k]