diff options
Diffstat (limited to 'debug/openocd.py')
-rwxr-xr-x | debug/openocd.py | 6 |
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( |