Bug 1343327 - Export more test job state as environment vars in taskcluster draft
authorWilliam Lachance <wlachance@mozilla.com>
Wed, 01 Mar 2017 13:07:04 -0500
changeset 495999 559c518da4c3d61f80cae4b7dbb0a97dae3b299b
parent 495950 34585620e529614c79ecc007705646de748e592d
child 496000 1a5c4db9ac0267a9f715294beb6a1ddbffdb8e3b
child 496007 fbaecd8a3532b5fad630e2be19575338fee3aed3
child 496016 ced67679cef2a9e7c9356254f048e0b46a2d9428
push id48499
push userwlachance@mozilla.com
push dateThu, 09 Mar 2017 17:38:46 +0000
bugs1343327
milestone55.0a1
Bug 1343327 - Export more test job state as environment vars in taskcluster MozReview-Commit-ID: GBmL4lhAa8u
taskcluster/ci/test/tests.yml
taskcluster/taskgraph/transforms/job/mozharness_test.py
taskcluster/taskgraph/transforms/tests.py
--- a/taskcluster/ci/test/tests.yml
+++ b/taskcluster/ci/test/tests.yml
@@ -409,23 +409,25 @@ mochitest:
         by-test-platform:
             android-4.3-arm7-api-15/debug: 10800
             linux64-jsdcov/opt: 10800
             default: 5400
     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
                 extra-options:
                     - --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.*:
@@ -451,16 +453,17 @@ mochitest-a11y:
     run-on-projects:
         by-test-platform:
             linux64-qr/.*: ['graphics']
             default: ['all']
     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.*:
                     - remove_executables.py
                     - unittests/mac_unittest.py
                 linux.*:
@@ -493,16 +496,17 @@ mochitest-browser-chrome:
     max-run-time:
         by-test-platform:
             linux64-jsdcov/opt: 7200
             linux64-ccov/opt: 7200
             linux64/debug: 5400
             linux32/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.*:
@@ -532,16 +536,17 @@ mochitest-browser-screenshots:
     loopback-video: true
     run-on-projects:
         by-test-platform:
             linux64/opt: ['mozilla-central', 'try']
             default: []
     e10s: true
     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.*:
                     - remove_executables.py
@@ -568,27 +573,29 @@ mochitest-chrome:
             android-4.3-arm7-api-15/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:
                     - --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.*:
@@ -608,24 +615,26 @@ mochitest-clipboard:
     instance-size: xlarge
     e10s:
       by-test-platform:
         macosx64/debug: true
         default: both
     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:
                     # 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.*:
@@ -659,16 +668,17 @@ mochitest-devtools-chrome:
         by-test-platform:
             linux64-ccov/opt: false
             linux64-jsdcov/opt: false
             # Bug 1304433: mochitest-devtools-chrome (e10s) not greened on windows
             windows.*: false
             macosx64/debug: true
             default: both
     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.*:
@@ -705,24 +715,26 @@ mochitest-gpu:
         by-test-platform:
             windows.*: both
             android.*: false
             macosx64/opt: 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:
                     # 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.*:
@@ -742,16 +754,17 @@ mochitest-jetpack:
     e10s: false
     max-run-time: 5400
     docker-image: {"in-tree": "desktop1604-test"}
     run-on-projects:
         by-test-platform:
             windows.*: ['mozilla-central', 'try']
             default: ['all']
     mozharness:
+        mochitest-flavor: jetpack-package
         script: desktop_unittest.py
         no-read-buildbot-config: true
         chunked: false
         config:
             by-test-platform:
                 windows.*:
                     - unittests/win_taskcluster_unittest.py
                 macosx.*:
@@ -782,23 +795,25 @@ mochitest-media:
         by-test-platform:
             android.*: 3
             macosx64.*: 1
             default: 3
     docker-image: {"in-tree": "desktop1604-test"}
     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:
                     - --test-suite=mochitest-media
             default:
+                mochitest-flavor: plain
                 script: desktop_unittest.py
                 no-read-buildbot-config: true
                 chunked:
                   by-test-platform:
                     macosx64.*: false
                     default: true
                 config:
                     by-test-platform:
@@ -821,16 +836,17 @@ mochitest-valgrind:
     loopback-video: true
     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
                 linux.*:
@@ -865,23 +881,25 @@ mochitest-webgl:
         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
                 extra-options:
                     - --test-suite=mochitest-gl
             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.*:
@@ -899,16 +917,17 @@ mochitest-style:
     treeherder-symbol: tc-M(s)
     loopback-video: true
     e10s: false
     run-on-projects:
         by-test-platform:
             linux64-stylo/.*: [ 'stylo', 'autoland', 'mozilla-inbound', 'mozilla-central', 'try' ]
             default: ['all']
     mozharness:
+        mochitest-flavor: plain
         script: desktop_unittest.py
         no-read-buildbot-config: true
         config:
             by-test-platform:
                 default:
                     - unittests/linux_unittest.py
                     - remove_executables.py
         extra-options:
--- a/taskcluster/taskgraph/transforms/job/mozharness_test.py
+++ b/taskcluster/taskgraph/transforms/job/mozharness_test.py
@@ -78,18 +78,22 @@ def mozharness_test_on_docker(config, jo
     }]
 
     env = worker['env'] = {
         'MOZHARNESS_CONFIG': ' '.join(mozharness['config']),
         'MOZHARNESS_SCRIPT': mozharness['script'],
         'MOZILLA_BUILD_URL': {'task-reference': installer_url},
         'NEED_PULSEAUDIO': 'true',
         'NEED_WINDOW_MANAGER': 'true',
+        'ENABLE_E10S': str(bool(test.get('e10s'))).lower(),
     }
 
+    if mozharness.get('mochitest-flavor'):
+        env['MOCHITEST_FLAVOR'] = mozharness['mochitest-flavor']
+
     if mozharness['set-moz-node-path']:
         env['MOZ_NODE_PATH'] = '/usr/local/bin/node'
 
     if 'actions' in mozharness:
         env['MOZHARNESS_ACTIONS'] = ' '.join(mozharness['actions'])
 
     if config.params['project'] == 'try':
         env['TRY_COMMIT_MSG'] = config.params['message']
--- a/taskcluster/taskgraph/transforms/tests.py
+++ b/taskcluster/taskgraph/transforms/tests.py
@@ -187,16 +187,19 @@ test_description_schema = Schema({
             # the mozharness script used to run this task
             Required('script'): 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,
+
             # 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]),