CI: change icmp example test address

Use a server that is inside the great firewall of china for CI test.
This avoid issues due to proxies, network configs etc.
This commit is contained in:
Marius Vikhammer 2020-12-25 15:12:08 +08:00
parent 0cee6a9e17
commit 9fc771ad1b

View File

@ -1,6 +1,7 @@
from __future__ import unicode_literals
import re
import ttfw_idf
import os
@ttfw_idf.idf_example_test(env_tag='Example_WIFI')
@ -11,7 +12,10 @@ def test_examples_icmp_echo(env, extra_data):
dut.expect('example_connect: Connected to')
dut.expect('esp>')
dut.write('ping www.espressif.com')
ping_dest = os.getenv('EXAMPLE_ICMP_SERVER', 'www.espressif.com')
dut.write('ping {}'.format(ping_dest))
ip_re = r'\.'.join((r'\d{1,3}',) * 4)
ip = dut.expect(re.compile(r'64 bytes from ({}) icmp_seq=1 ttl=\d+ time=\d+ ms'.format(ip_re)))[0]