aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2016-10-19 13:16:47 -0700
committerTim Newsome <tim@sifive.com>2016-10-19 13:16:47 -0700
commit3308ca71bb3a3f196cd55b2f75119586a4a51994 (patch)
treec0511b82e079330d328acbf932963de4a67a4c04
parent6a64f119fbda35f415d0c8238909aba70acc1654 (diff)
downloadriscv-tests-3308ca71bb3a3f196cd55b2f75119586a4a51994.zip
riscv-tests-3308ca71bb3a3f196cd55b2f75119586a4a51994.tar.gz
riscv-tests-3308ca71bb3a3f196cd55b2f75119586a4a51994.tar.bz2
Actually test something in regs test.
-rwxr-xr-xdebug/openocd.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/debug/openocd.py b/debug/openocd.py
index 0c7e7d2..4a71035 100755
--- a/debug/openocd.py
+++ b/debug/openocd.py
@@ -7,7 +7,7 @@ import sys
import targets
import testlib
-from testlib import assertGreater
+from testlib import assertRegexpMatches
class OpenOcdTest(testlib.BaseTest):
def __init__(self, target):
@@ -23,8 +23,10 @@ class OpenOcdTest(testlib.BaseTest):
class RegTest(OpenOcdTest):
def test(self):
+ self.cli.command("halt")
output = self.cli.command("reg")
- assertGreater(len(output), 1)
+ assertRegexpMatches(output, r"x18 \(/%d\): 0x[0-9A-F]+" %
+ self.target.xlen)
def main():
parser = argparse.ArgumentParser(