aboutsummaryrefslogtreecommitdiff
path: root/debug
diff options
context:
space:
mode:
authorRichard Xia <rxia@sifive.com>2016-11-10 14:24:08 -0800
committerRichard Xia <rxia@sifive.com>2016-11-10 14:24:08 -0800
commitda7763c222260acc4b5807a25c316f8710b80923 (patch)
tree32a967a8b4d775632b7b2c38adc34c8dd93751f3 /debug
parent14b56c155ded80ba7f5a5f6194cef83d654c16d8 (diff)
downloadriscv-tests-da7763c222260acc4b5807a25c316f8710b80923.zip
riscv-tests-da7763c222260acc4b5807a25c316f8710b80923.tar.gz
riscv-tests-da7763c222260acc4b5807a25c316f8710b80923.tar.bz2
Decrease sleep time to 0.1s.
Diffstat (limited to 'debug')
-rw-r--r--debug/testlib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/debug/testlib.py b/debug/testlib.py
index 40daad5..b8e9ad4 100644
--- a/debug/testlib.py
+++ b/debug/testlib.py
@@ -161,7 +161,7 @@ class Openocd(object):
def _get_gdb_server_port(self):
"""Get port that OpenOCD's gdb server is listening on."""
- MAX_ATTEMPTS = 5
+ MAX_ATTEMPTS = 50
PORT_REGEX = re.compile(r'(?P<port>\d+) \(LISTEN\)')
for _ in range(MAX_ATTEMPTS):
with open(os.devnull, 'w') as devnull:
@@ -179,7 +179,7 @@ class Openocd(object):
elif matches:
[match] = matches
return int(match.group('port'))
- time.sleep(1)
+ time.sleep(0.1)
raise Exception("Timed out waiting for gdb server to obtain port.")
def __del__(self):