CI: optimize example protocol test cases

This commit is contained in:
Chen Yudong
2022-12-22 11:03:22 +08:00
committed by BOT
parent 2b04fa8059
commit db940f30bc
3 changed files with 21 additions and 5 deletions

View File

@@ -68,6 +68,7 @@ def test_examples_protocol_socket_tcpserver(env, extra_data):
ipv6_r = r':'.join((r'[0-9a-fA-F]{4}',) * 8) # expect all 8 octets from IPv6 (assumes it's printed in the long form)
ipv6 = dut1.expect(re.compile(r' IPv6 address: ({})'.format(ipv6_r)), timeout=30)[0]
print('Connected with IPv4={} and IPv6={}'.format(ipv4, ipv6))
dut1.expect('Socket listening')
# test IPv4
received = tcp_client(ipv4, MESSAGE)