Skip to content

Commit

Permalink
Discover only enabled tests [fix psss#170]
Browse files Browse the repository at this point in the history
  • Loading branch information
psss committed Mar 23, 2020
1 parent 466b20c commit 9b02bba
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tmt/steps/discover/fmf.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,13 @@ def go(self):
if self.filters:
for filter_ in self.filters:
self.info('filter', filter_, 'green')
# Initialize the metadata tree
# Initialize the metadata tree (filter enabled tests only)
self.debug(f"Check metadata tree in '{testdir}'.")
# Nothing more to do here when in dry mode
if self.opt('dry'):
return []
tests = tmt.Tree(testdir).tests(filters=self.filters)
tests = [
test for test in tmt.Tree(testdir).tests(filters=self.filters)
if test.enabled]
# Modify test names and paths to make them unique
for test in tests:
test.name = f"/{self.name}{test.name}"
Expand Down

0 comments on commit 9b02bba

Please sign in to comment.