| 112 | |
| 113 | |
| 114 | def run_cmd(name: str) -> int: |
| 115 | status = 0 |
| 116 | if name in cmds: |
| 117 | cmd = cmds[name] |
| 118 | else: |
| 119 | if name.endswith(".test"): |
| 120 | cmd = ["pytest", f"mypy/test/testcheck.py::TypeCheckSuite::{name}"] |
| 121 | else: |
| 122 | cmd = ["pytest", "-n0", "-k", name] |
| 123 | print(f"run {name}: {cmd}") |
| 124 | proc = subprocess.run(cmd, stderr=subprocess.STDOUT) |
| 125 | if proc.returncode: |
| 126 | print("\nFAILED: %s" % name) |
| 127 | status = proc.returncode |
| 128 | if name in FAST_FAIL: |
| 129 | exit(status) |
| 130 | return status |
| 131 | |
| 132 | |
| 133 | def start_background_cmd(name: str) -> Popen: |