aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2020-03-05 11:28:22 -0800
committerGitHub <noreply@github.com>2020-03-05 11:28:22 -0800
commit34b02fde809bca37c76630986c08ea910c547a69 (patch)
tree2b3a71ba1a5ec2ab32490602ac31eeac84dcc1dc
parentfb0510f8495173dbebe3d0cf926bae81938fc387 (diff)
downloadriscv-tests-34b02fde809bca37c76630986c08ea910c547a69.zip
riscv-tests-34b02fde809bca37c76630986c08ea910c547a69.tar.gz
riscv-tests-34b02fde809bca37c76630986c08ea910c547a69.tar.bz2
Add a simple mechanism to skip tests on targets. (#251)
-rw-r--r--debug/targets.py7
-rw-r--r--debug/testlib.py3
2 files changed, 9 insertions, 1 deletions
diff --git a/debug/targets.py b/debug/targets.py
index d797f64..f4192b6 100644
--- a/debug/targets.py
+++ b/debug/targets.py
@@ -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 = []
diff --git a/debug/testlib.py b/debug/testlib.py
index 6f5c9d5..8a6e402 100644
--- a/debug/testlib.py
+++ b/debug/testlib.py
@@ -980,7 +980,8 @@ class BaseTest:
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()