Commit 21813050 authored by Robert Iannucci's avatar Robert Iannucci Committed by Commit Bot

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

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

Relands https://chromium-review.googlesource.com/c/chromium/src/+/917802 . We
expect this to work because test shards now include a hermetic copy of
cpython as well as vpython (which was the failure observed in
crbug.com/812693).

R=dpranke@chromium.org, kbr@chromium.org, tandrii@chromium.org

Bug: 804174,812693
Change-Id: Ic38845f8af366d9af211bef64df135176ab9ee1d
Reviewed-on: https://chromium-review.googlesource.com/933107Reviewed-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@{#538652}
parent 6459a2fd
...@@ -240,6 +240,14 @@ def run_executable(cmd, env, stdoutfile=None): ...@@ -240,6 +240,14 @@ def run_executable(cmd, env, stdoutfile=None):
cmd[0] = cmd[0].replace('/', os.path.sep) cmd[0] = cmd[0].replace('/', os.path.sep)
cmd = fix_python_path(cmd) 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' print('Additional test environment:\n%s\n'
'Command: %s\n' % ( 'Command: %s\n' % (
'\n'.join(' %s=%s' % '\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