Schedule linux64 taskcluster tests on try draft
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Thu, 15 Oct 2015 15:35:45 -0400
changeset 301174 c91ffdd021cc66dbd79ef6e8e1e8bcb6ca77e448
parent 301084 e193b4da0a8c1025aa76a403c64663ff1cd41709
child 510189 c506e2bb9b449e59b9d297d3bdf72e85dd9ce9d5
push id6407
push userahalberstadt@mozilla.com
push dateThu, 15 Oct 2015 19:37:15 +0000
milestone44.0a1
Schedule linux64 taskcluster tests on try
testing/taskcluster/mach_commands.py
testing/taskcluster/tasks/branches/base_job_flags.yml
testing/taskcluster/tasks/branches/try/job_flags.yml
testing/taskcluster/tasks/builds/firefox_base.yml
testing/taskcluster/tasks/builds/linux64_clobber.yml
testing/taskcluster/tasks/tests/fx_linux64_mochitest_bc.yml
testing/taskcluster/tasks/tests/fx_linux64_mochitest_dt.yml
testing/taskcluster/tasks/tests/fx_linux64_mochitest_gl.yml
testing/taskcluster/tasks/tests/fx_linux64_mochitest_plain.yml
testing/taskcluster/tasks/tests/fx_linux64_reftest.yml
testing/taskcluster/tasks/tests/fx_linux64_xpcshell.yml
testing/taskcluster/tasks/tests/fx_unittest_base.yml
testing/taskcluster/tasks/tests/mulet_mochitests.yml
--- a/testing/taskcluster/mach_commands.py
+++ b/testing/taskcluster/mach_commands.py
@@ -467,30 +467,38 @@ class Graph(object):
                 test_parameters = copy.copy(build_parameters)
                 if tests_url:
                     test_parameters['tests_url'] = tests_url
                 if test_packages_url:
                     test_parameters['test_packages_url'] = test_packages_url
                 if mozharness_url:
                     test_parameters['mozharness_url'] = mozharness_url
                 test_definition = templates.load(test['task'], {})['task']
-                chunk_config = test_definition['extra']['chunks']
+                chunk_config = test_definition['extra'].get('chunks', {})
 
                 # Allow branch configs to override task level chunking...
                 if 'chunks' in test:
                     chunk_config['total'] = test['chunks']
 
-                test_parameters['total_chunks'] = chunk_config['total']
+                chunked = 'total' in chunk_config
+                if chunked:
+                    test_parameters['total_chunks'] = chunk_config['total']
 
-                for chunk in range(1, chunk_config['total'] + 1):
-                    if 'only_chunks' in test and \
+                if 'suite' in test_definition['extra']:
+                    suite_config = test_definition['extra']['suite']
+                    test_parameters['suite'] = suite_config['name']
+                    test_parameters['flavor'] = suite_config.get('flavor', '')
+
+                for chunk in range(1, chunk_config.get('total', 1) + 1):
+                    if 'only_chunks' in test and chunked and \
                         chunk not in test['only_chunks']:
                         continue
 
-                    test_parameters['chunk'] = chunk
+                    if chunked:
+                        test_parameters['chunk'] = chunk
                     test_task = configure_dependent_task(test['task'],
                                                          test_parameters,
                                                          slugid(),
                                                          templates,
                                                          build_treeherder_config)
                     set_interactive_task(test_task, interactive)
 
                     if params['revision_hash']:
--- a/testing/taskcluster/tasks/branches/base_job_flags.yml
+++ b/testing/taskcluster/tasks/branches/base_job_flags.yml
@@ -57,16 +57,19 @@ flags:
     - gaia-ui-test-functional-dsds
     - gaia-ui-test-unit
     - jetpack
     - jittests
     - jsreftest
     - marionette
     - marionette-webapi
     - mochitest
+    - mochitest-browser-chrome
+    - mochitest-devtools-chrome
+    - mochitest-webgl
     - mochitest-media
     - mochitest-oop
     - mozmill
     - reftest
     - reftest-ipc
     - reftest-no-accel
     - reftest-sanity-oop
     - web-platform-tests
--- a/testing/taskcluster/tasks/branches/try/job_flags.yml
+++ b/testing/taskcluster/tasks/branches/try/job_flags.yml
@@ -301,34 +301,64 @@ tests:
       tasks/builds/b2g_emulator_x86_kk_opt.yml:
         task: tasks/tests/b2g_emulator_mochitest.yml
       tasks/builds/b2g_emulator_ics_opt.yml:
         task: tasks/tests/b2g_emulator_mochitest.yml
       tasks/builds/b2g_emulator_ics_debug.yml:
         task: tasks/tests/b2g_emulator_mochitest.yml
       tasks/builds/mulet_linux.yml:
         task: tasks/tests/mulet_mochitests.yml
+      tasks/builds/opt_linux64_clobber.yml:
+        task: tasks/tests/fx_linux64_mochitest_plain.yml
+      tasks/builds/dbg_linux64_clobber.yml:
+        task: tasks/tests/fx_linux64_mochitest_plain.yml
+  mochitest-browser-chrome:
+    allowed_build_tasks:
+      tasks/builds/opt_linux64_clobber.yml:
+        task: tasks/tests/fx_linux64_mochitest_bc.yml
+      tasks/builds/dbg_linux64_clobber.yml:
+        task: tasks/tests/fx_linux64_mochitest_bc.yml
+  mochitest-devtools-chrome:
+    allowed_build_tasks:
+      tasks/builds/opt_linux64_clobber.yml:
+        task: tasks/tests/fx_linux64_mochitest_dt.yml
+      tasks/builds/dbg_linux64_clobber.yml:
+        task: tasks/tests/fx_linux64_mochitest_dt.yml
+  mochitest-webgl:
+    allowed_build_tasks:
+      tasks/builds/opt_linux64_clobber.yml:
+        task: tasks/tests/fx_linux64_mochitest_gl.yml
+      tasks/builds/dbg_linux64_clobber.yml:
+        task: tasks/tests/fx_linux64_mochitest_gl.yml
   mochitest-oop:
     allowed_build_tasks:
       tasks/builds/b2g_desktop_opt.yml:
         task: tasks/tests/b2g_mochitest_oop.yml
   reftest:
     allowed_build_tasks:
       tasks/builds/mulet_linux.yml:
         task: tasks/tests/mulet_reftests.yml
       tasks/builds/b2g_emulator_x86_l_opt.yml:
         task: tasks/tests/b2g_emulator_reftest.yml
       tasks/builds/b2g_emulator_x86_kk_opt.yml:
         task: tasks/tests/b2g_emulator_reftest.yml
       tasks/builds/b2g_emulator_ics_opt.yml:
         task: tasks/tests/b2g_emulator_reftest.yml
+      tasks/builds/opt_linux64_clobber.yml:
+        task: tasks/tests/fx_linux64_reftest.yml
+      tasks/builds/dbg_linux64_clobber.yml:
+        task: tasks/tests/fx_linux64_reftest.yml
   reftest-sanity-oop:
     allowed_build_tasks:
       tasks/builds/b2g_desktop_opt.yml:
         task: tasks/tests/b2g_reftests_sanity_oop.yml
   xpcshell:
     allowed_build_tasks:
       tasks/builds/b2g_emulator_x86_kk_opt.yml:
         task: tasks/tests/b2g_emulator_xpcshell_chunked.yml
       tasks/builds/b2g_emulator_ics_opt.yml:
         task: tasks/tests/b2g_emulator_xpcshell_chunked.yml
       tasks/builds/b2g_emulator_ics_debug.yml:
         task: tasks/tests/b2g_emulator_xpcshell_chunked.yml
+      tasks/builds/opt_linux64_clobber.yml:
+        task: tasks/tests/fx_linux64_xpcshell.yml
+      tasks/builds/dbg_linux64_clobber.yml:
+        task: tasks/tests/fx_linux64_xpcshell.yml
--- a/testing/taskcluster/tasks/builds/firefox_base.yml
+++ b/testing/taskcluster/tasks/builds/firefox_base.yml
@@ -1,4 +1,9 @@
 $inherits:
   from: 'tasks/build.yml'
   variables:
     build_product: 'firefox'
+task:
+  extra:
+    locations:
+      mozharness: 'public/build/mozharness.zip'
+      test_packages: 'public/build/test_packages.json'
--- a/testing/taskcluster/tasks/builds/linux64_clobber.yml
+++ b/testing/taskcluster/tasks/builds/linux64_clobber.yml
@@ -43,9 +43,8 @@ task:
       machine:
         # see https://github.com/mozilla/treeherder/blob/master/ui/js/values.js
         platform: linux64
     # Rather then enforcing particular conventions we require that all build
     # tasks provide the "build" extra field to specify where the build and tests
     # files are located, relative to the task's artifacts URL
     locations:
       build: 'public/build/target.tar.bz2'
-      tests: 'public/build/target.tests.zip'
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/tests/fx_linux64_mochitest_bc.yml
@@ -0,0 +1,18 @@
+---
+$inherits:
+  from: 'tasks/tests/fx_unittest_base.yml'
+task:
+  metadata:
+    name: '[TC] Linux64 mochitest-browser-chrome M(bc{{chunk}})'
+    description: Mochitest browser-chrome run {{chunk}}
+  extra:
+    chunks:
+      total: 7
+    suite:
+      name: mochitest
+      flavor: browser-chrome-chunked
+    treeherder:
+      groupName: Desktop mochitests
+      groupSymbol: tc-M
+      symbol: bc{{chunk}}
+
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/tests/fx_linux64_mochitest_dt.yml
@@ -0,0 +1,17 @@
+---
+$inherits:
+  from: 'tasks/tests/fx_unittest_base.yml'
+task:
+  metadata:
+    name: '[TC] Linux64 mochitest-devtools-chrome M(dt{{chunk}})'
+    description: Mochitest devtools-chrome run {{chunk}}
+  extra:
+    chunks:
+      total: 2
+    suite:
+      name: mochitest
+      flavor: mochitest-devtools-chrome
+    treeherder:
+      groupName: Desktop mochitests
+      groupSymbol: tc-M
+      symbol: dt{{chunk}}
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/tests/fx_linux64_mochitest_gl.yml
@@ -0,0 +1,14 @@
+$inherits:
+  from: 'tasks/tests/fx_unittest_base.yml'
+task:
+  metadata:
+    name: '[TC] Linux64 mochitest-gl M(gl)'
+    description: Mochitest webgl run
+  extra:
+    suite:
+      name: mochitest
+      flavor: mochitest-gl
+    treeherder:
+      groupName: Desktop mochitests
+      groupSymbol: tc-M
+      symbol: gl
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/tests/fx_linux64_mochitest_plain.yml
@@ -0,0 +1,17 @@
+---
+$inherits:
+  from: 'tasks/tests/fx_unittest_base.yml'
+task:
+  metadata:
+    name: '[TC] Linux64 mochitest-plain {{chunk}}'
+    description: Mochitest plain run {{chunk}}
+  extra:
+    chunks:
+      total: 5
+    suite:
+      name: mochitest
+      flavor: plain-chunked
+    treeherder:
+      groupName: Desktop mochitests
+      groupSymbol: tc-M
+      symbol: {{chunk}}
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/tests/fx_linux64_reftest.yml
@@ -0,0 +1,17 @@
+---
+$inherits:
+  from: 'tasks/tests/fx_unittest_base.yml'
+task:
+  metadata:
+    name: '[TC] Linux64 reftest {{chunk}}'
+    description: Reftest run {{chunk}}
+  extra:
+    chunks:
+      total: 4
+    suite:
+      name: reftest
+      flavor: reftest
+    treeherder:
+      groupName: Desktop reftest
+      groupSymbol: tc-R
+      symbol: {{chunk}}
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/tests/fx_linux64_xpcshell.yml
@@ -0,0 +1,17 @@
+---
+$inherits:
+  from: 'tasks/tests/fx_unittest_base.yml'
+task:
+  metadata:
+    name: '[TC] Linux64 xpcshell {{chunk}}'
+    description: XPCShell run {{chunk}}
+  extra:
+    chunks:
+      total: 2
+    suite:
+      name: xpcshell
+      flavor: xpcshell
+    treeherder:
+      groupName: Desktop xpcshell tests
+      groupSymbol: tc-X
+      symbol: {{chunk}}
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/tests/fx_unittest_base.yml
@@ -0,0 +1,28 @@
+---
+$inherits:
+  from: 'tasks/test.yml'
+task:
+  payload:
+    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_configs/remove_executables.py
+        --installer-url {{build_url}}
+        --test-packages-url {{test_packages_url}}
+        --download-symbols ondemand
+        --{{suite}}-suite {{flavor}}
+        --total-chunk={{total_chunks}}
+        --this-chunk={{chunk}}
+    artifacts:
+      'public/build':
+        type: directory
+        path: '/home/worker/artifacts/'
+        expires: '{{#from_now}}1 year{{/from_now}}'
+
+  extra:
+    treeherderEnv:
+      - production
+      - staging
--- a/testing/taskcluster/tasks/tests/mulet_mochitests.yml
+++ b/testing/taskcluster/tasks/tests/mulet_mochitests.yml
@@ -1,37 +1,17 @@
 ---
 $inherits:
-  from: 'tasks/test.yml'
+  from: 'tasks/tests/fx_unittest_base.yml'
 task:
   metadata:
     name: '[TC] Mulet Mochitests ( {{chunk}} )'
     description: Mulet Mochitest run {{chunk}}
-  payload:
-    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_configs/remove_executables.py
-        --installer-url {{build_url}}
-        --test-packages-url {{test_packages_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:
-    treeherderEnv:
-      - production
-      - staging
     chunks:
       total: 5
+    suite:
+      name: mochitest
+      flavor: plain-chunked
     treeherder:
       groupSymbol: M
       groupName: Mulet mochitests
       symbol: {{chunk}}