Fix rebase bug.
authorTim Newsome <tim@sifive.com>
Tue, 15 Aug 2017 22:32:24 +0000 (15:32 -0700)
committerTim Newsome <tim@sifive.com>
Mon, 28 Aug 2017 19:16:39 +0000 (12:16 -0700)
debug/testlib.py

index 8ef50e657527138905a34c067823f809a3150810..692afb6f70f2b0587862c4d1ac755e983e6b5799 100644 (file)
@@ -185,6 +185,8 @@ class Openocd(object):
     print "OpenOCD Temporary Log File: %s" % logname
 
     def __init__(self, server_cmd=None, config=None, debug=False, timeout=60):
+        self.timeout = timeout
+
         if server_cmd:
             cmd = shlex.split(server_cmd)
         else:
@@ -255,7 +257,7 @@ class Openocd(object):
                 if not messaged and time.time() - start > 1:
                     messaged = True
                     print "Waiting for OpenOCD to start..."
-                if (time.time() - start) > timeout:
+                if (time.time() - start) > self.timeout:
                     raise Exception("ERROR: Timed out waiting for OpenOCD to "
                             "listen for gdb")
             return process