From da7763c222260acc4b5807a25c316f8710b80923 Mon Sep 17 00:00:00 2001 From: Richard Xia Date: Thu, 10 Nov 2016 14:24:08 -0800 Subject: [PATCH] Decrease sleep time to 0.1s. --- debug/testlib.py | 4 ++-- 1 file 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\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): -- 2.30.2