Skip to content

Commit 2b9938d

Browse files
author
Jiang Jiang Jian
committed
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
2 parents 332c73b + 674514e commit 2b9938d

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

examples/openthread/ot_ci_function.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,15 @@ def joinThreadNetwork(dut: IdfDut, thread: thread_parameter) -> None:
141141

142142

143143
def wait_for_join(dut: IdfDut, role: str) -> bool:
144+
clean_buffer(dut)
144145
for _ in range(1, 30):
145-
if getDeviceRole(dut) == role:
146-
wait(dut, 5)
146+
time.sleep(1)
147+
execute_command(dut, 'state')
148+
try:
149+
dut.expect(re.compile(role), timeout=5)
147150
return True
148-
wait(dut, 1)
151+
except Exception:
152+
continue
149153
return False
150154

151155

examples/openthread/pytest_otbr.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,14 @@ def test_Bidirectional_IPv6_connectivity(Init_interface: bool, dut: Tuple[IdfDut
228228
onlinkprefix = ocf.get_onlinkprefix(br)
229229
pattern = rf'\W+({onlinkprefix}(?:\w+:){{3}}\w+)\W+'
230230
host_global_unicast_addr = re.findall(pattern, out_str)
231+
logging.info(f'host_global_unicast_addr: {host_global_unicast_addr}')
232+
if host_global_unicast_addr is None:
233+
raise Exception(f'onlinkprefix: {onlinkprefix}, host_global_unicast_addr: {host_global_unicast_addr}')
231234
rx_nums = 0
232235
for ip_addr in host_global_unicast_addr:
233236
txrx_nums = ocf.ot_ping(cli, str(ip_addr), count=10)
234237
rx_nums = rx_nums + int(txrx_nums[1])
235-
logging.debug(f'rx_nums: {rx_nums}')
238+
logging.info(f'rx_nums: {rx_nums}')
236239
assert rx_nums != 0
237240
finally:
238241
ocf.stop_thread(cli)

0 commit comments

Comments
 (0)