From 3308ca71bb3a3f196cd55b2f75119586a4a51994 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Wed, 19 Oct 2016 13:16:47 -0700 Subject: [PATCH] Actually test something in regs test. --- debug/openocd.py | 6 ++++-- 1 file 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( -- 2.30.2