(binary, cache, args, timeout=60, extra_env=None)
| 35 | |
| 36 | |
| 37 | def run_cli(binary, cache, args, timeout=60, extra_env=None): |
| 38 | env = dict(os.environ) |
| 39 | env["CBM_CACHE_DIR"] = cache |
| 40 | # Daemon coordination is account-wide and CBM_CACHE_DIR does not move the |
| 41 | # rendezvous; a private CBM_RUNTIME_DIR per cache is what isolates a call |
| 42 | # from every other daemon on the account (and makes a cold call cold). |
| 43 | env["CBM_RUNTIME_DIR"] = runtime_for(cache) |
| 44 | if extra_env: |
| 45 | env.update(extra_env) |
| 46 | return subprocess.run([binary] + args, capture_output=True, timeout=timeout, env=env) |
| 47 | |
| 48 | |
| 49 | def output_text(result): |
no test coverage detected