Skip to content

Commit

Permalink
Add a simple mechanism to skip tests on targets. (riscv-software-src#251
Browse files Browse the repository at this point in the history
)
  • Loading branch information
timsifive authored Mar 5, 2020
1 parent fb0510f commit 34b02fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions debug/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ class Target:
# Supports simultaneous resume through hasel.
support_hasel = True

# Tests whose names are mentioned in this list will be skipped and marked
# as not applicable. This is a crude mechanism that can be handy, but in
# general it's better to define some property like those above that
# describe behavior of this target, and tests can use that to decide
# whether they are applicable or not.
skip_tests = []

# Internal variables:
directory = None
temporary_files = []
Expand Down
3 changes: 2 additions & 1 deletion debug/testlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,8 @@ def run(self):

sys.stdout.flush()

if not self.early_applicable():
if self.__class__.__name__ in self.target.skip_tests or \
not self.early_applicable():
return "not_applicable"

self.start = time.time()
Expand Down

0 comments on commit 34b02fd

Please sign in to comment.