Merge branch 'bugfix/asio_examples_v4.0' into 'release/v4.0'

asio: fix asio test code to start the test after ip address received from common example code (v4.0)

See merge request espressif/esp-idf!6699
This commit is contained in:
Jiang Jiang Jian 2019-11-15 23:50:22 +08:00
commit 9214c887f7
4 changed files with 4 additions and 4 deletions

View file

@ -81,7 +81,7 @@ def test_examples_protocol_asio_chat_client(env, extra_data):
thread1.start()
# 2. start the dut test and wait till client gets IP address
dut1.start_app()
dut1.expect(re.compile(r" sta ip: ([^,]+),"), timeout=30)
dut1.expect(re.compile(r" IPv4 address: ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)"), timeout=30)
# 3. send host's IP to the client i.e. the `dut1`
dut1.write(host_ip)
# 4. client `dut1` should receive a message

View file

@ -36,7 +36,7 @@ def test_examples_protocol_asio_chat_server(env, extra_data):
# 1. start test
dut1.start_app()
# 2. get the server IP address
data = dut1.expect(re.compile(r" sta ip: ([^,]+),"), timeout=30)
data = dut1.expect(re.compile(r" IPv4 address: ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)"), timeout=30)
# 3. create tcp client and connect to server
cli = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
cli.settimeout(30)

View file

@ -38,7 +38,7 @@ def test_examples_protocol_asio_tcp_server(env, extra_data):
# 1. start test
dut1.start_app()
# 2. get the server IP address
data = dut1.expect(re.compile(r" sta ip: ([^,]+),"), timeout=30)
data = dut1.expect(re.compile(r" IPv4 address: ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)"), timeout=30)
# 3. create tcp client and connect to server
cli = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
cli.settimeout(30)

View file

@ -38,7 +38,7 @@ def test_examples_protocol_asio_udp_server(env, extra_data):
# 1. start test
dut1.start_app()
# 2. get the server IP address
data = dut1.expect(re.compile(r" sta ip: ([^,]+),"), timeout=30)
data = dut1.expect(re.compile(r" IPv4 address: ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)"), timeout=30)
# 3. create tcp client and connect to server
cli = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
cli.settimeout(30)