mirror of
https://github.com/rust-vmm/rust-vmm-ci.git
synced 2026-08-05 03:08:31 +00:00
fix: have benchmark test clean working directory
Before checking out different commits, clean the working directory to avoid checkout failures to to temporary files created during benchmark execution (as is done by linux-loader) Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
This commit is contained in:
@@ -101,14 +101,21 @@ def _run_critcmp():
|
||||
print(p.stderr.decode("utf-8"))
|
||||
|
||||
|
||||
def _clean_workdir():
|
||||
subprocess.run("git restore .", shell=True, check=True)
|
||||
subprocess.run("git clean -fd", shell=True, check=True)
|
||||
|
||||
|
||||
def _git_checkout_upstream_branch():
|
||||
subprocess.run(
|
||||
"git fetch {} {}".format(REMOTE, BASE_BRANCH), shell=True, check=True
|
||||
)
|
||||
_clean_workdir()
|
||||
subprocess.run("git checkout FETCH_HEAD", shell=True, check=True)
|
||||
|
||||
|
||||
def _git_checkout_pr_branch():
|
||||
_clean_workdir()
|
||||
subprocess.run(
|
||||
"git checkout -",
|
||||
shell=True,
|
||||
|
||||
Reference in New Issue
Block a user