Skip to content

Commit

Permalink
sq: fix upgrade test - use adjusted path
Browse files Browse the repository at this point in the history
upgrade plugin sets it to `testdir` but in `discover.go()` it gets
changed to `'.'`. This git_root/fmf_root change doesn't happen in
`do_the_discovery`
  • Loading branch information
lukaszachy committed Mar 1, 2024
1 parent 884cd64 commit a7b3dd4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tmt/steps/discover/fmf.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,11 +470,13 @@ def assert_git_url(plan_name: Optional[str] = None) -> None:
raise tmt.utils.DiscoverError(
"Failed to process 'dist-git-source'.") from error
# Discover tests
self.do_the_discovery()
self.do_the_discovery(path)

def do_the_discovery(self) -> None:
def do_the_discovery(self, path: Optional[Path] = None) -> None:
""" Discover the tests """
path = Path(cast(str, self.get('path'))) if self.get('path') else None
# Original path might adjusted already in go()
if path is None:
path = Path(cast(str, self.get('path'))) if self.get('path') else None
prune = self.get('prune')
# Adjust path and optionally show
if path is None or path.resolve() == Path.cwd().resolve():
Expand Down

0 comments on commit a7b3dd4

Please sign in to comment.