diff --git a/testing/taskcluster/job_flags.yml b/testing/taskcluster/job_flags.yml index 2643f8ec85e..aa743495f51 100644 --- a/testing/taskcluster/job_flags.yml +++ b/testing/taskcluster/job_flags.yml @@ -98,8 +98,12 @@ tests: # - builds/b2g_desktop.yml mochitests: allowed_build_tasks: - - tasks/builds/b2g_desktop.yml - - tasks/builds/b2g_desktop_debug.yml - - tasks/builds/mulet_linux.yml - task: tasks/tests/b2g_mochitest.yml - chunks: 5 + tasks/builds/b2g_desktop.yml: + task: tasks/tests/b2g_mochitest.yml + chunks: 5 + tasks/builds/b2g_desktop_debug.yml: + task: tasks/tests/b2g_mochitest.yml + chunks: 5 + tasks/builds/mulet_linux.yml: + task: tasks/tests/mulet_mochitests.yml + chunks: 5 diff --git a/testing/taskcluster/mach_commands.py b/testing/taskcluster/mach_commands.py index 1d9907913aa..e064fd58735 100644 --- a/testing/taskcluster/mach_commands.py +++ b/testing/taskcluster/mach_commands.py @@ -185,6 +185,7 @@ class TryGraph(object): ) for test in build['dependents']: + test = test['allowed_build_tasks'][build['task']] test_parameters = copy.copy(build_parameters) test_parameters['build_url'] = build_url test_parameters['tests_url'] = tests_url diff --git a/testing/taskcluster/tasks/tests/mulet_mochitests.yml b/testing/taskcluster/tasks/tests/mulet_mochitests.yml new file mode 100644 index 00000000000..313695e21a4 --- /dev/null +++ b/testing/taskcluster/tasks/tests/mulet_mochitests.yml @@ -0,0 +1,41 @@ +--- +task: + created: '{{now}}' + deadline: '{{#from_now}}24 hours{{/from_now}}' + metadata: + source: http://todo.com/soon + owner: {{owner}} + name: Mulet Mochitests {{chunk}} + description: Mulet Mochi test run {{chunk}} + + workerType: b2gtest + provisionerId: aws-provisioner + + payload: + + image: '{{#docker_image}}tester{{/docker_image}}' + maxRunTime: 3600 + + command: + - entrypoint # entrypoint ensures we are running in xvfb + - > + python ./mozharness/scripts/desktop_unittest.py + --no-read-buildbot-config + --config-file ./mozharness/configs/unittests/linux_unittest.py + --config-file ./mozharness_tmp/mulet_suite_options_config.py + --installer-url {{build_url}} + --test-url {{tests_url}} + --download-symbols ondemand + --mochitest-suite plain-chunked + --total-chunk={{total_chunks}} + --this-chunk={{chunk}} + artifacts: + 'public/build': + type: directory + path: '/home/worker/artifacts/' + expires: '{{#from_now}}1 year{{/from_now}}' + + extra: + treeherder: + symbol: M + diff --git a/testing/taskcluster/tests/test_commit_parser.py b/testing/taskcluster/tests/test_commit_parser.py index b2f5ccfcdaf..7d614f7bc43 100755 --- a/testing/taskcluster/tests/test_commit_parser.py +++ b/testing/taskcluster/tests/test_commit_parser.py @@ -57,8 +57,12 @@ class TestCommitParser(unittest.TestCase): 'builds': { 'linux': { 'types': { - 'opt': 'task/linux', - 'debug': 'task/linux-debug' + 'opt': { + 'task': 'task/linux', + }, + 'debug': { + 'task': 'task/linux-debug' + } } }, }, @@ -68,7 +72,8 @@ class TestCommitParser(unittest.TestCase): expected = [ { 'task': 'task/linux', - 'dependents': [] + 'dependents': [], + 'additional-parameters': {} } ] @@ -88,8 +93,12 @@ class TestCommitParser(unittest.TestCase): 'builds': { 'linux': { 'types': { - 'opt': 'task/linux', - 'debug': 'task/linux-debug' + 'opt': { + 'task': 'task/linux', + }, + 'debug': { + 'task': 'task/linux-debug' + } } }, }, @@ -99,7 +108,8 @@ class TestCommitParser(unittest.TestCase): expected = [ { 'task': 'task/linux', - 'dependents': [] + 'dependents': [], + 'additional-parameters': {} } ] @@ -119,17 +129,22 @@ class TestCommitParser(unittest.TestCase): 'builds': { 'linux': { 'types': { - 'opt': 'task/linux', - 'debug': 'task/linux-debug' + 'opt': { + 'task': 'task/linux', + }, + 'debug': { + 'task': 'task/linux-debug' + } } }, }, 'tests': { 'web-platform-tests': { - 'task': 'task/web-platform-tests', - 'allowed_build_tasks': [ - 'task/linux' - ] + 'allowed_build_tasks': { + 'task/linux': { + 'task': 'task/web-platform-tests', + } + } } } } @@ -137,14 +152,19 @@ class TestCommitParser(unittest.TestCase): expected = [ { 'task': 'task/linux-debug', - 'dependents': [] + 'dependents': [], + 'additional-parameters': {} }, { 'task': 'task/linux', 'dependents': [{ - 'task': 'task/web-platform-tests', - 'allowed_build_tasks': ['task/linux'] - }] + 'allowed_build_tasks': { + 'task/linux': { + 'task':'task/web-platform-tests' + } + } + }], + 'additional-parameters': {} } ] @@ -164,23 +184,43 @@ class TestCommitParser(unittest.TestCase): 'builds': { 'linux': { 'types': { - 'opt': 'task/linux', - 'debug': 'task/linux-debug' + 'opt': { + 'task': 'task/linux', + }, + 'debug': { + 'task': 'task/linux-debug' + } } }, 'win32': { 'platforms': ['windows'], 'types': { - 'opt': 'task/win32', + 'opt': { + 'task': 'task/win32', + } } }, }, 'tests': { 'web-platform-tests': { - 'task': 'task/web-platform-tests', + 'allowed_build_tasks': { + 'task/linux': { + 'task': 'task/web-platform-tests', + }, + 'task/win32': { + 'task': 'task/web-platform-tests', + } + } }, 'mochitest': { - 'task': 'task/mochitest', + 'allowed_build_tasks': { + 'task/linux-debug': { + 'task': 'task/mochitest', + }, + 'task/win32': { + 'task': 'task/mochitest', + } + } } } } @@ -188,18 +228,39 @@ class TestCommitParser(unittest.TestCase): expected = [ { 'task': 'task/linux', - 'dependents': [] + 'dependents': [], + 'additional-parameters': {} }, { 'task': 'task/linux-debug', - 'dependents': [] + 'dependents': [], + 'additional-parameters': {} }, { 'task': 'task/win32', 'dependents': [ - { 'task': 'task/web-platform-tests' }, - { 'task': 'task/mochitest' } - ] + { + 'allowed_build_tasks': { + 'task/linux': { + 'task': 'task/web-platform-tests', + }, + 'task/win32': { + 'task': 'task/web-platform-tests', + } + } + }, + { + 'allowed_build_tasks': { + 'task/linux-debug': { + 'task': 'task/mochitest', + }, + 'task/win32': { + 'task': 'task/mochitest', + } + } + } + ], + 'additional-parameters': {} } ] @@ -219,23 +280,43 @@ class TestCommitParser(unittest.TestCase): 'builds': { 'linux': { 'types': { - 'opt': 'task/linux', - 'debug': 'task/linux-debug' + 'opt': { + 'task': 'task/linux' + }, + 'debug': { + 'task': 'task/linux-debug' + } } }, 'win32': { 'platforms': ['windows'], 'types': { - 'opt': 'task/win32', + 'opt': { + 'task': 'task/win32' + } } }, }, 'tests': { 'web-platform-tests': { - 'task': 'task/web-platform-tests', + 'allowed_build_tasks': { + 'task/linux': { + 'task': 'task/web-platform-tests', + }, + 'task/win32': { + 'task': 'task/web-platform-tests', + } + } }, 'mochitest': { - 'task': 'task/mochitest', + 'allowed_build_tasks': { + 'task/linux-debug': { + 'task': 'task/mochitest', + }, + 'task/win32': { + 'task': 'task/mochitest', + } + } } } } @@ -244,8 +325,18 @@ class TestCommitParser(unittest.TestCase): { 'task': 'task/win32', 'dependents': [ - { 'task': 'task/mochitest' } - ] + { + 'allowed_build_tasks': { + 'task/linux-debug': { + 'task': 'task/mochitest', + }, + 'task/win32': { + 'task': 'task/mochitest', + } + } + } + ], + 'additional-parameters': {} } ] @@ -266,20 +357,41 @@ class TestCommitParser(unittest.TestCase): 'builds': { 'linux': { 'types': { - 'opt': 'task/linux', - 'debug': 'task/linux-debug' + 'opt': { + 'task': 'task/linux', + }, + 'debug': { + 'task': 'task/linux-debug' + } } }, 'linux64': { 'types': { - 'opt': 'task/linux64', - 'debug': 'task/linux64-debug' + 'opt': { + 'task': 'task/linux64', + }, + 'debug': { + 'task': 'task/linux64-debug' + } } } }, 'tests': { 'web-platform-tests': { - 'task': 'task/web-platform-tests' + 'allowed_build_tasks': { + 'task/linux': { + 'task': 'task/web-platform-tests', + }, + 'task/linux-debug': { + 'task': 'task/web-platform-tests', + }, + 'task/linux64': { + 'task': 'task/web-platform-tests', + }, + 'task/linux64-debug': { + 'task': 'task/web-platform-tests', + } + } } } } @@ -288,26 +400,90 @@ class TestCommitParser(unittest.TestCase): { 'task': 'task/linux', 'dependents': [ - { 'task': 'task/web-platform-tests' } - ] + { + 'allowed_build_tasks': { + 'task/linux': { + 'task': 'task/web-platform-tests', + }, + 'task/linux-debug': { + 'task': 'task/web-platform-tests', + }, + 'task/linux64': { + 'task': 'task/web-platform-tests', + }, + 'task/linux64-debug': { + 'task': 'task/web-platform-tests', + } + } + } + ], + 'additional-parameters': {} }, { 'task': 'task/linux-debug', 'dependents': [ - { 'task': 'task/web-platform-tests' } - ] + { + 'allowed_build_tasks': { + 'task/linux': { + 'task': 'task/web-platform-tests', + }, + 'task/linux-debug': { + 'task': 'task/web-platform-tests', + }, + 'task/linux64': { + 'task': 'task/web-platform-tests', + }, + 'task/linux64-debug': { + 'task': 'task/web-platform-tests', + } + } + } + ], + 'additional-parameters': {} }, { 'task': 'task/linux64', 'dependents': [ - { 'task': 'task/web-platform-tests' } - ] + { + 'allowed_build_tasks': { + 'task/linux': { + 'task': 'task/web-platform-tests', + }, + 'task/linux-debug': { + 'task': 'task/web-platform-tests', + }, + 'task/linux64': { + 'task': 'task/web-platform-tests', + }, + 'task/linux64-debug': { + 'task': 'task/web-platform-tests', + } + } + } + ], + 'additional-parameters': {} }, { 'task': 'task/linux64-debug', 'dependents': [ - { 'task': 'task/web-platform-tests' } - ] + { + 'allowed_build_tasks': { + 'task/linux': { + 'task': 'task/web-platform-tests', + }, + 'task/linux-debug': { + 'task': 'task/web-platform-tests', + }, + 'task/linux64': { + 'task': 'task/web-platform-tests', + }, + 'task/linux64-debug': { + 'task': 'task/web-platform-tests', + } + } + } + ], + 'additional-parameters': {} } ]