Bug 1311966 - symlink rather than copy artifacts; r?pmoore
MozReview-Commit-ID: 5cFjuwtUgEr
--- a/taskcluster/taskgraph/transforms/tests/make_task_description.py
+++ b/taskcluster/taskgraph/transforms/tests/make_task_description.py
@@ -324,23 +324,21 @@ def generic_worker_setup(config, test, t
['generic-worker:os-group:{}'.format(group) for group in test['os-groups']])
worker = taskdesc['worker'] = {}
worker['os-groups'] = test['os-groups']
worker['implementation'] = test['worker-implementation']
worker['max-run-time'] = test['max-run-time']
worker['artifacts'] = artifacts
- env = worker['env'] = {
- # Bug 1306989
+ worker['env'] = {
'APPDATA': '%cd%\\AppData\\Roaming',
'LOCALAPPDATA': '%cd%\\AppData\\Local',
'TEMP': '%cd%\\AppData\\Local\\Temp',
'TMP': '%cd%\\AppData\\Local\\Temp',
- 'USERPROFILE': '%cd%',
}
# assemble the command line
mh_command = [
'c:\\mozilla-build\\python\\python.exe',
'-u',
'mozharness\\scripts\\' + normpath(mozharness['script'])
]
@@ -364,23 +362,25 @@ def generic_worker_setup(config, test, t
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']),
+ # bug 1311966 - symlink to artifacts until generic worker supports virtual artifact paths
+ artifact_link_commands = ['mklink /d %cd%\\public\\test_info %cd%\\build\\blobber_upload_dir']
+ for link in [a['path'] for a in artifacts if a['path'].startswith('public\\logs\\')]:
+ artifact_link_commands.append('mklink %cd%\\{} %cd%\\{}'.format(link, link[7:]))
+
+ worker['command'] = artifact_link_commands + [
{'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\\'
+ {'task-reference': ' '.join(mh_command)}
]
@worker_setup_function("macosx-engine")
def macosx_engine_setup(config, test, taskdesc):
mozharness = test['mozharness']
installer_url = ARTIFACT_URL.format('<build>', mozharness['build-artifact-name'])