Run a git command based on *args
(self, *args, **kwargs)
| 43 | self.run("remote", "add", "origin", "https://github.com/apache/tvm.git") |
| 44 | |
| 45 | def run(self, *args, **kwargs): |
| 46 | """ |
| 47 | Run a git command based on *args |
| 48 | """ |
| 49 | proc = subprocess.run( |
| 50 | ["git"] + list(args), encoding="utf-8", cwd=self.cwd, check=False, **kwargs |
| 51 | ) |
| 52 | if proc.returncode != 0: |
| 53 | raise RuntimeError(f"git command failed: '{args}'") |
| 54 | |
| 55 | return proc |
| 56 | |
| 57 | |
| 58 | def run_script(command: list[Any], check: bool = True, **kwargs): |
no outgoing calls
no test coverage detected