Runs a command and captures its output, printing the command first.
(cmd: list, cwd=None)
| 12 | from test_harness import ( |
| 13 | ROOT, |
| 14 | TestCase, |
| 15 | build_test, |
| 16 | cpu_count, |
| 17 | discover_tests, |
| 18 | jar_path, |
| 19 | prepare_shared_cache, |
| 20 | prime_core, |
| 21 | run_command, |
| 22 | ) |
| 23 | |
| 24 | |
| 25 | def write_process_log( |
| 26 | path: Path, command: list[str], proc: subprocess.CompletedProcess[str] |
| 27 | ) -> None: |
| 28 | if command: |
| 29 | rendered_command = " ".join(command) |