Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/dvsim/testplan.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,19 @@ def _parse_testplan(self, filename: Path, tags: set[str], repo_top: Path) -> Non
Testplan._check_duplicates("testpoint", all_tps)
Testplan._check_duplicates("covergroup", all_cgs)

# The testplan might have been filtered with a set of tags. Apply that
# filter, then check that we haven't discarded everything.
self.testpoints = [t for t in all_tps if t.has_tags(tags)]
self.covergroups = [cg for cg in all_cgs if cg.has_tags(tags)]

if not (self.testpoints or self.covergroups):
msg = (
f"Merged testplan has no testpoints or covergroups, after "
f"filtering with tags {tags}. Before filtering, the numbers of "
f"testpoints and covergroups were {len(all_tps)}, {len(all_cgs)}."
)
raise ValueError(msg)

# Wildcards in testpoints can mostly point to any value from the
# object. The following names are *not* allowed (because they wouldn't
# really make much sense).
Expand Down
Loading