Skip to content

Commit c651225

Browse files
committed
Go to discover tests directory after login
1 parent 45d611c commit c651225

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tmt/steps/__init__.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1958,7 +1958,16 @@ def _login(
19581958
# Attempt to push the workdir to the guest
19591959
try:
19601960
guest.push()
1961-
cwd = cwd or self.parent.plan.worktree
1961+
worktree = self.parent.plan.worktree
1962+
test_path = self.parent.plan.discover.tests(
1963+
)[-1].path if self.parent.plan.discover.tests() else None
1964+
1965+
if worktree and test_path:
1966+
test_path = worktree.parent / "discover" / test_path.unrooted()
1967+
else:
1968+
test_path = worktree
1969+
1970+
cwd = cwd or test_path
19621971
except tmt.utils.GeneralError:
19631972
self.warn("Failed to push workdir to the guest.")
19641973
cwd = None

0 commit comments

Comments
 (0)