aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2016-03-16 11:02:52 -0700
committerTim Newsome <tim@sifive.com>2016-05-23 12:12:10 -0700
commit4efefcf5fe74e15409f3ea65b6645e46ebc7c39b (patch)
tree4fa8587096092941b04de747bfe35403d2365285 /tests
parent9f0d9a40322b31c8630f3591d2bd2247929e0629 (diff)
downloadspike-4efefcf5fe74e15409f3ea65b6645e46ebc7c39b.zip
spike-4efefcf5fe74e15409f3ea65b6645e46ebc7c39b.tar.gz
spike-4efefcf5fe74e15409f3ea65b6645e46ebc7c39b.tar.bz2
Test 'info registers all' as well as 'info all-registers'
Diffstat (limited to 'tests')
-rwxr-xr-xtests/gdbserver-smoke.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/gdbserver-smoke.py b/tests/gdbserver-smoke.py
index 51e8cc9..16af626 100755
--- a/tests/gdbserver-smoke.py
+++ b/tests/gdbserver-smoke.py
@@ -45,10 +45,12 @@ class DebugTest(unittest.TestCase):
self.assertIn("Remote connection closed", output)
def test_registers(self):
- output = self.gdb.command("info all-registers")
- self.assertNotIn("Could not", output)
- for reg in ('zero', 'ra', 'sp', 'gp', 'tp'):
- self.assertIn(reg, output)
+ # Try both forms to test gdb.
+ for cmd in ("info all-registers", "info registers all"):
+ output = self.gdb.command(cmd)
+ self.assertNotIn("Could not", output)
+ for reg in ('zero', 'ra', 'sp', 'gp', 'tp'):
+ self.assertIn(reg, output)
# mcpuid is one of the few registers that should have the high bit set
# (for rv64).
self.assertRegexpMatches(output, ".*mcpuid *0x80")