Skip to content

Commit

Permalink
Go to discover tests directory after login
Browse files Browse the repository at this point in the history
  • Loading branch information
Ismail Ibrahim Quwarah committed Nov 12, 2024
1 parent 67bc662 commit 49df209
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tmt/steps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1958,7 +1958,16 @@ def _login(
# Attempt to push the workdir to the guest
try:
guest.push()
cwd = cwd or self.parent.plan.worktree
worktree = self.parent.plan.worktree
test_path = self.parent.plan.discover.tests(
)[-1].path if self.parent.plan.discover.tests() else None

if worktree and test_path:
test_path = worktree.parent / "discover" / test_path.unrooted()
else:
test_path = worktree

cwd = cwd or test_path
except tmt.utils.GeneralError:
self.warn("Failed to push workdir to the guest.")
cwd = None
Expand Down

0 comments on commit 49df209

Please sign in to comment.