Skip to content

Commit

Permalink
fix: make A/B tests work in release branches
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Barbáchano <pablob@amazon.com>
  • Loading branch information
pb8o committed Dec 19, 2023
1 parent ee73ec4 commit 9ca2e2f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/framework/ab_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,13 @@ def temporary_checkout(revision: str):
# it cannot be some arbitrary subdirectory. Therefore:
_, git_root, _ = utils.run_cmd("git rev-parse --show-toplevel")
# split off the '\n' at the end of the stdout
utils.run_cmd(f"git clone {git_root.strip()} {tmp_dir}")

with chdir(tmp_dir):
utils.run_cmd(f"git checkout {revision}")
# utils.run_cmd(f"git branch revision_a {revision}")

utils.run_cmd(f"git worktree add -b revision_a {tmp_dir} {revision}")

# with chdir(tmp_dir):
# utils.run_cmd(f"git switch {revision}")

yield Path(tmp_dir)

Expand Down

0 comments on commit 9ca2e2f

Please sign in to comment.