From: Tim Newsome Date: Wed, 19 Oct 2016 20:16:47 +0000 (-0700) Subject: Actually test something in regs test. X-Git-Url: https://git.libre-soc.org/?p=riscv-tests.git;a=commitdiff_plain;h=3308ca71bb3a3f196cd55b2f75119586a4a51994 Actually test something in regs test. --- 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(