driazati commented on code in PR #12361:
URL: https://github.com/apache/tvm/pull/12361#discussion_r961193815
##########
tests/python/ci/test_utils.py:
##########
@@ -30,12 +31,41 @@ class TempGit:
def __init__(self, cwd):
self.cwd = cwd
+ # Jenkins git is too old and doesn't have 'git init --initial-branch'
+ self.run("init", stderr=subprocess.PIPE, stdout=subprocess.PIPE)
+ self.run("checkout", "-b", "main", stderr=subprocess.PIPE)
+ self.run("remote", "add", "origin",
"https://github.com/apache/tvm.git")
def run(self, *args, **kwargs):
+ """
+ Run a git command based on *args
+ """
proc = subprocess.run(
["git"] + list(args), encoding="utf-8", cwd=self.cwd, check=False,
**kwargs
)
if proc.returncode != 0:
raise RuntimeError(f"git command failed: '{args}'")
return proc
+
+
+def run_script(command: List[Any], check: bool = True, **kwargs):
Review Comment:
`check_output` is kind of the same but not really, it enables stdout
catching all the time but here usually we want to print out both streams on an
error and none if its fine (unless otherwise requested)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]