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
--- 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'])