CI: fix ip address checker and trace log

This commit is contained in:
Chen Yudong
2022-07-03 19:44:00 +08:00
parent bf0e4943be
commit 9575f03b8d
10 changed files with 90 additions and 91 deletions

View File

@@ -76,10 +76,10 @@ def test_examples_protocol_mqtt_qos1(env, extra_data):
dut1.start_app()
# waiting for getting the IP address
try:
ip_address = dut1.expect(re.compile(r' (sta|eth) ip: ([^,]+),'), timeout=30)
print('Connected to AP with IP: {}'.format(ip_address))
ip_address = dut1.expect(re.compile(r'IPv4 address: ([^,]+),'), timeout=30)
print('Connected to AP/Ethernet with IP: {}'.format(ip_address))
except DUT.ExpectTimeout:
raise ValueError('ENV_TEST_FAILURE: Cannot connect to AP')
raise ValueError('ENV_TEST_FAILURE: Cannot connect to AP/Ethernet')
print('writing to device: {}'.format('mqtt://' + host_ip + '\n'))
dut1.write('mqtt://' + host_ip + '\n')