From 923f62fc1dec4244180c00e0b1f8a845aeaa90e8 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Tue, 20 Sep 2016 09:47:11 -0700 Subject: [PATCH] Minor tweaks to trigger tests for openocd. --- debug/gdbserver.py | 25 +++++++++++++++---------- debug/testlib.py | 1 + 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/debug/gdbserver.py b/debug/gdbserver.py index 75ab292..bb82c4b 100755 --- a/debug/gdbserver.py +++ b/debug/gdbserver.py @@ -1,12 +1,13 @@ #!/usr/bin/env python +import argparse +import binascii import os +import random +import re import sys -import argparse import tempfile import time -import random -import binascii import traceback import testlib @@ -223,6 +224,10 @@ def assertTrue(a): if not a: raise TestFailed("%r is not True" % a) +def assertRegexpMatches(text, regexp): + if not re.search(regexp, text): + raise TestFailed("can't find %r in %r" % (regexp, text)) + class SimpleRegisterTest(GdbTest): def check_reg(self, name): a = random.randrange(1<