From: Richard Xia Date: Thu, 10 Nov 2016 22:24:08 +0000 (-0800) Subject: Decrease sleep time to 0.1s. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=da7763c222260acc4b5807a25c316f8710b80923;p=riscv-tests.git Decrease sleep time to 0.1s. --- 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):