Bug 1381577 - Part E; Add assertion that there is no space in each action or option passed to mozharness tests. r=dustin
authorJustin Wood <Callek@gmail.com>
Mon, 17 Jul 2017 15:35:02 -0400
changeset 418968 9fb0158afc853e908610583e865fa7882f3da772
parent 418967 fdb3b53456b2bd2f4e6e8ba60e40c940df41c7b9
child 418969 c0e4c46f2954ca655e21ca97c40dca7abc5352f6
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1381577
milestone56.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 1381577 - Part E; Add assertion that there is no space in each action or option passed to mozharness tests. r=dustin Land date changes to support windows nightlies onto central This is needed because on Linux these arrays are joined by a space then passed to the shell as 'for foo in $bar' which will treat spaces as valid delimiters, whereas for windows workers the structure is evaluated completely in python, which means a single value with spaces won't generate the correct command output. Enforcing this prevents mistakes with yaml syntax going unnoticed. MozReview-Commit-ID: 3U4orzyiBuf
taskcluster/taskgraph/transforms/job/mozharness.py
--- a/taskcluster/taskgraph/transforms/job/mozharness.py
+++ b/taskcluster/taskgraph/transforms/job/mozharness.py
@@ -237,19 +237,21 @@ def mozharness_on_generic_worker(config,
     mh_command.append('\\'.join([r'.\build\src\testing', run['script'].replace('/', '\\')]))
     for cfg in run['config']:
         mh_command.append('--config ' + cfg.replace('/', '\\'))
     if run['use-magic-mh-args']:
         mh_command.append('--branch ' + config.params['project'])
         mh_command.append(r'--skip-buildbot-actions')
     mh_command.append(r'--work-dir %cd:Z:=z:%\build')
     for action in run.get('actions', []):
+        assert ' ' not in action
         mh_command.append('--' + action)
 
     for option in run.get('options', []):
+        assert ' ' not in option
         mh_command.append('--' + option)
     if run.get('custom-build-variant-cfg'):
         mh_command.append('--custom-build-variant')
         mh_command.append(run['custom-build-variant-cfg'])
 
     hg_command = ['"c:\\Program Files\\Mercurial\\hg.exe"']
     hg_command.append('robustcheckout')
     hg_command.extend(['--sharebase', 'y:\\hg-shared'])