mirror of
https://github.com/espressif/esp-idf.git
synced 2026-01-20 18:45:17 +00:00
Merge branch 'bugfix/update_thread_ci_testcases_v5.5' into 'release/v5.5'
feat(openthread): optimize fail cases in CI test (v5.5) See merge request espressif/esp-idf!43739
This commit is contained in:
@@ -141,11 +141,15 @@ def joinThreadNetwork(dut: IdfDut, thread: thread_parameter) -> None:
|
||||
|
||||
|
||||
def wait_for_join(dut: IdfDut, role: str) -> bool:
|
||||
clean_buffer(dut)
|
||||
for _ in range(1, 30):
|
||||
if getDeviceRole(dut) == role:
|
||||
wait(dut, 5)
|
||||
time.sleep(1)
|
||||
execute_command(dut, 'state')
|
||||
try:
|
||||
dut.expect(re.compile(role), timeout=5)
|
||||
return True
|
||||
wait(dut, 1)
|
||||
except Exception:
|
||||
continue
|
||||
return False
|
||||
|
||||
|
||||
|
||||
@@ -228,11 +228,14 @@ def test_Bidirectional_IPv6_connectivity(Init_interface: bool, dut: Tuple[IdfDut
|
||||
onlinkprefix = ocf.get_onlinkprefix(br)
|
||||
pattern = rf'\W+({onlinkprefix}(?:\w+:){{3}}\w+)\W+'
|
||||
host_global_unicast_addr = re.findall(pattern, out_str)
|
||||
logging.info(f'host_global_unicast_addr: {host_global_unicast_addr}')
|
||||
if host_global_unicast_addr is None:
|
||||
raise Exception(f'onlinkprefix: {onlinkprefix}, host_global_unicast_addr: {host_global_unicast_addr}')
|
||||
rx_nums = 0
|
||||
for ip_addr in host_global_unicast_addr:
|
||||
txrx_nums = ocf.ot_ping(cli, str(ip_addr), count=10)
|
||||
rx_nums = rx_nums + int(txrx_nums[1])
|
||||
logging.debug(f'rx_nums: {rx_nums}')
|
||||
logging.info(f'rx_nums: {rx_nums}')
|
||||
assert rx_nums != 0
|
||||
finally:
|
||||
ocf.stop_thread(cli)
|
||||
|
||||
Reference in New Issue
Block a user