Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: have benchmark test clean working directory #169

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions integration_tests/test_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading