Index: client/run_isolated.py |
diff --git a/client/run_isolated.py b/client/run_isolated.py |
index 72dcfff85af9dffeccf53253580f691fb3d8082d..21b415bfaeba46282a2fa4f154606967249137e2 100755 |
--- a/client/run_isolated.py |
+++ b/client/run_isolated.py |
@@ -93,7 +93,7 @@ RUN_TEST_CASES_LOG = 'run_test_cases.log' |
# Use short names for temporary directories. This is driven by Windows, which |
# imposes a relatively short maximum path length of 260 characters, often |
# referred to as MAX_PATH. It is relatively easy to create files with longer |
-# path length. A use case is with recursive depedency treesV like npm packages. |
+# path length. A use case is with recursive dependency trees like npm packages. |
# |
# It is recommended to start the script with a `root_dir` as short as |
# possible. |
@@ -121,9 +121,12 @@ def get_as_zip_package(executable=True): |
package.add_python_file(os.path.join(BASE_DIR, 'isolate_storage.py')) |
package.add_python_file(os.path.join(BASE_DIR, 'isolated_format.py')) |
package.add_python_file(os.path.join(BASE_DIR, 'isolateserver.py')) |
+ package.add_python_file(os.path.join(BASE_DIR, 'isolate.py')) |
+ package.add_python_file(os.path.join(BASE_DIR, 'isolate_format.py')) |
package.add_python_file(os.path.join(BASE_DIR, 'auth.py')) |
package.add_python_file(os.path.join(BASE_DIR, 'cipd.py')) |
package.add_python_file(os.path.join(BASE_DIR, 'named_cache.py')) |
+ package.add_python_file(os.path.join(BASE_DIR, 'run_isolated.py')) |
package.add_directory(os.path.join(BASE_DIR, 'libs')) |
package.add_directory(os.path.join(BASE_DIR, 'third_party')) |
package.add_directory(os.path.join(BASE_DIR, 'utils')) |
@@ -686,7 +689,8 @@ def noop_install_packages(_run_dir): |
yield None |
-def _install_packages(run_dir, cipd_cache_dir, client, packages, timeout): |
+def _install_packages(run_dir, cipd_cache_dir, client, packages, timeout, |
+ isolate_cache=None): |
"""Calls 'cipd ensure' for packages. |
Args: |
@@ -729,6 +733,7 @@ def _install_packages(run_dir, cipd_cache_dir, client, packages, timeout): |
}, |
cache_dir=cipd_cache_dir, |
timeout=timeout, |
+ isolate_cache=isolate_cache, |
) |
for subdir, pin_list in sorted(pins.iteritems()): |
@@ -744,7 +749,7 @@ def _install_packages(run_dir, cipd_cache_dir, client, packages, timeout): |
@contextlib.contextmanager |
def install_client_and_packages( |
run_dir, packages, service_url, client_package_name, |
- client_version, cache_dir, timeout=None): |
+ client_version, cache_dir, timeout=None, isolate_cache=None): |
"""Bootstraps CIPD client and installs CIPD packages. |
Yields CipdClient, stats, client info and pins (as single CipdInfo object). |
@@ -799,7 +804,7 @@ def install_client_and_packages( |
package_pins = [] |
if packages: |
package_pins = _install_packages( |
- run_dir, cipd_cache_dir, client, packages, timeoutfn()) |
+ run_dir, cipd_cache_dir, client, packages, timeoutfn(), isolate_cache) |
file_path.make_tree_files_read_only(run_dir) |
@@ -996,7 +1001,8 @@ def main(args): |
install_packages_fn = lambda run_dir: install_client_and_packages( |
run_dir, cipd.parse_package_args(options.cipd_packages), |
options.cipd_server, options.cipd_client_package, |
- options.cipd_client_version, cache_dir=options.cipd_cache) |
+ options.cipd_client_version, cache_dir=options.cipd_cache, |
+ isolate_cache=isolate_cache) |
@contextlib.contextmanager |
def init_named_caches(run_dir): |