diff --git a/examples/protocols/http_server/advanced_tests/http_server_advanced_test.py b/examples/protocols/http_server/advanced_tests/http_server_advanced_test.py index ff10986bf7..215ab08ae2 100644 --- a/examples/protocols/http_server/advanced_tests/http_server_advanced_test.py +++ b/examples/protocols/http_server/advanced_tests/http_server_advanced_test.py @@ -51,7 +51,7 @@ def test_examples_protocol_http_server_advanced(env, extra_data): # Parse IP address of STA Utility.console_log('Waiting to connect with AP') - got_ip = dut1.expect(re.compile(r'(?:[\s\S]*)IPv4 address: (\d+.\d+.\d+.\d+)'), timeout=30)[0] + got_ip = dut1.expect(re.compile(r'(?:[\s\S]*)IPv4 address: (\d+\.\d+\.\d+\.\d+)[^\d]'), timeout=30)[0] got_port = dut1.expect(re.compile(r"(?:[\s\S]*)Started HTTP server on port: '(\d+)'"), timeout=15)[0] result = dut1.expect(re.compile(r"(?:[\s\S]*)Max URI handlers: '(\d+)'(?:[\s\S]*)Max Open Sessions: " # noqa: W605 diff --git a/examples/protocols/http_server/persistent_sockets/http_server_persistence_test.py b/examples/protocols/http_server/persistent_sockets/http_server_persistence_test.py index 1f463c754f..e21744c5dc 100644 --- a/examples/protocols/http_server/persistent_sockets/http_server_persistence_test.py +++ b/examples/protocols/http_server/persistent_sockets/http_server_persistence_test.py @@ -47,7 +47,7 @@ def test_examples_protocol_http_server_persistence(env, extra_data): # Parse IP address of STA Utility.console_log('Waiting to connect with AP') - got_ip = dut1.expect(re.compile(r'(?:[\s\S]*)IPv4 address: (\d+.\d+.\d+.\d+)'), timeout=30)[0] + got_ip = dut1.expect(re.compile(r'(?:[\s\S]*)IPv4 address: (\d+\.\d+\.\d+\.\d+)[^\d]'), timeout=30)[0] got_port = dut1.expect(re.compile(r"(?:[\s\S]*)Starting server on port: '(\d+)'"), timeout=30)[0] Utility.console_log('Got IP : ' + got_ip) diff --git a/examples/protocols/http_server/simple/http_server_simple_test.py b/examples/protocols/http_server/simple/http_server_simple_test.py index ea4992c199..336269d3b3 100644 --- a/examples/protocols/http_server/simple/http_server_simple_test.py +++ b/examples/protocols/http_server/simple/http_server_simple_test.py @@ -78,7 +78,7 @@ def test_examples_protocol_http_server_simple(env, extra_data): # Parse IP address of STA Utility.console_log('Waiting to connect with AP') - got_ip = dut1.expect(re.compile(r'(?:[\s\S]*)IPv4 address: (\d+.\d+.\d+.\d+)'), timeout=30)[0] + got_ip = dut1.expect(re.compile(r'(?:[\s\S]*)IPv4 address: (\d+\.\d+\.\d+\.\d+)[^\d]'), timeout=30)[0] got_port = dut1.expect(re.compile(r"(?:[\s\S]*)Starting server on port: '(\d+)'"), timeout=30)[0] Utility.console_log('Got IP : ' + got_ip) diff --git a/examples/protocols/http_server/ws_echo_server/ws_server_example_test.py b/examples/protocols/http_server/ws_echo_server/ws_server_example_test.py index 2767051752..ab15f8dfb9 100644 --- a/examples/protocols/http_server/ws_echo_server/ws_server_example_test.py +++ b/examples/protocols/http_server/ws_echo_server/ws_server_example_test.py @@ -63,7 +63,7 @@ def test_examples_protocol_http_ws_echo_server(env, extra_data): # Parse IP address of STA Utility.console_log('Waiting to connect with AP') - got_ip = dut1.expect(re.compile(r'IPv4 address: (\d+.\d+.\d+.\d+)'), timeout=60)[0] + got_ip = dut1.expect(re.compile(r'IPv4 address: (\d+\.\d+\.\d+\.\d+)[^\d]'), timeout=60)[0] got_port = dut1.expect(re.compile(r"Starting server on port: '(\d+)'"), timeout=60)[0] Utility.console_log('Got IP : ' + got_ip) diff --git a/examples/protocols/https_server/simple/example_test.py b/examples/protocols/https_server/simple/example_test.py index 9a3a4083ba..7f75b7895d 100644 --- a/examples/protocols/https_server/simple/example_test.py +++ b/examples/protocols/https_server/simple/example_test.py @@ -106,11 +106,11 @@ def test_examples_protocol_https_server_simple(env, extra_data): # type: (tiny_ # start test dut1.start_app() # Parse IP address and port of the server - dut1.expect(re.compile(r'Starting server')) - got_port = dut1.expect(re.compile(r'Server listening on port (\d+)'), timeout=30)[0] + dut1.expect(re.compile(r'Starting server'), timeout=60) + got_port = dut1.expect(re.compile(r'Server listening on port (\d+)[^\d]'), timeout=30)[0] Utility.console_log('Waiting to connect with AP') - got_ip = dut1.expect(re.compile(r'IPv4 address: (\d+\.\d+\.\d+\.\d+)'), timeout=30)[0] + got_ip = dut1.expect(re.compile(r'IPv4 address: (\d+\.\d+\.\d+\.\d+)[^\d]'), timeout=30)[0] # Expected logs Utility.console_log('Got IP : ' + got_ip) diff --git a/examples/protocols/https_server/wss_server/wss_server_example_test.py b/examples/protocols/https_server/wss_server/wss_server_example_test.py index b7e088b4a1..56a7b471a7 100644 --- a/examples/protocols/https_server/wss_server/wss_server_example_test.py +++ b/examples/protocols/https_server/wss_server/wss_server_example_test.py @@ -133,9 +133,9 @@ def test_examples_protocol_https_wss_server(env, extra_data): # type: (tiny_tes dut1.start_app() # Parse IP address of STA - got_port = dut1.expect(re.compile(r'Server listening on port (\d+)'), timeout=60)[0] + got_port = dut1.expect(re.compile(r'Server listening on port (\d+)[^\d]'), timeout=60)[0] Utility.console_log('Waiting to connect with AP') - got_ip = dut1.expect(re.compile(r'IPv4 address: (\d+\.\d+\.\d+\.\d+)'), timeout=60)[0] + got_ip = dut1.expect(re.compile(r'IPv4 address: (\d+\.\d+\.\d+\.\d+)[^\d]'), timeout=60)[0] Utility.console_log('Got IP : ' + got_ip) Utility.console_log('Got Port : ' + got_port)