Commit 8348d507 authored by Robert Iannucci's avatar Robert Iannucci Committed by Commit Bot

[test_env.py] Warm up vpython virtualenv cache on swarming task shards.

This will prevent tests sensitive to cold vpython startup time from
timing out.

Bug: 804174
Change-Id: Ieaf6e0d94fa668fd26481fe3efcaf6d0e968864d
Reviewed-on: https://chromium-review.googlesource.com/917802Reviewed-by: default avatarDaniel Jacques <dnj@chromium.org>
Reviewed-by: default avatarAndrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536766}
parent fa333914
......@@ -240,6 +240,14 @@ def run_executable(cmd, env, stdoutfile=None):
cmd[0] = cmd[0].replace('/', os.path.sep)
cmd = fix_python_path(cmd)
# Warm vpython virtualenv cache. Some tests are sensitive to vpython startup
# time when it has a cold cache (crbug.com/804174).
vpython = 'vpython.bat' if sys.platform == 'win32' else 'vpython'
subprocess.check_call([
vpython, '-vpython-spec', os.path.join(ROOT_DIR, '.vpython'),
'-vpython-tool', 'install',
])
print('Additional test environment:\n%s\n'
'Command: %s\n' % (
'\n'.join(' %s=%s' %
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment