Bug 1312552 - Better chunking support for TC Windows; r=grenade
authorGeoff Brown <gbrown@mozilla.com>
Tue, 25 Oct 2016 08:53:32 -0600
changeset 362251 5bb005960e9f53e1c1956bfaa4a1cf798b64d425
parent 362250 733063079b8e2d99364ceab3ca51e1f024314b26
child 362252 a01b000c7f67c8cc756fcc289e7caf93ffeb10d2
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-beta@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgrenade
bugs1312552
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1312552 - Better chunking support for TC Windows; r=grenade
taskcluster/taskgraph/transforms/tests/make_task_description.py
--- a/taskcluster/taskgraph/transforms/tests/make_task_description.py
+++ b/taskcluster/taskgraph/transforms/tests/make_task_description.py
@@ -344,16 +344,28 @@ def generic_worker_setup(config, test, t
     mh_command.extend(['--installer-url', installer_url])
     mh_command.extend(['--test-packages-url', test_packages_url])
     if mozharness.get('download-symbols'):
         if isinstance(mozharness['download-symbols'], basestring):
             mh_command.extend(['--download-symbols', mozharness['download-symbols']])
         else:
             mh_command.extend(['--download-symbols', 'true'])
 
+    # TODO: remove the need for run['chunked']
+    if mozharness.get('chunked') or test['chunks'] > 1:
+        # Implement mozharness['chunking-args'], modifying command in place
+        if mozharness['chunking-args'] == 'this-chunk':
+            mh_command.append('--total-chunk={}'.format(test['chunks']))
+            mh_command.append('--this-chunk={}'.format(test['this-chunk']))
+        elif mozharness['chunking-args'] == 'test-suite-suffix':
+            suffix = mozharness['chunk-suffix'].replace('<CHUNK>', str(test['this-chunk']))
+            for i, c in enumerate(mh_command):
+                if isinstance(c, basestring) and c.startswith('--test-suite'):
+                    mh_command[i] += suffix
+
     worker['command'] = [
         'mkdir {} {}'.format(env['APPDATA'], env['TMP']),
         {'task-reference': 'c:\\mozilla-build\\wget\\wget.exe {}'.format(mozharness_url)},
         'c:\\mozilla-build\\info-zip\\unzip.exe mozharness.zip',
         {'task-reference': ' '.join(mh_command)},
         'xcopy build\\blobber_upload_dir public\\test_info /e /i',
         'copy /y logs\\*.* public\\logs\\'
     ]