mirror of
https://github.com/espressif/openthread.git
synced 2026-08-29 21:39:54 +00:00
[test] enhance parsing addresses (#6045)
Expect sometimes matches the pattern before a line is fully printed to TTY. As a result, the address returned may not be accurate. This commit fixes this issue by matching line breaks.
This commit is contained in:
@@ -34,47 +34,47 @@ spawn_node 2
|
||||
|
||||
switch_node 1
|
||||
send "networkname Thread\\ Network\n"
|
||||
expect "Done"
|
||||
expect_line "Done"
|
||||
send "ifconfig up\n"
|
||||
expect "Done"
|
||||
expect_line "Done"
|
||||
send "thread start\n"
|
||||
expect "Done"
|
||||
expect_line "Done"
|
||||
wait_for "state" "leader"
|
||||
expect "Done"
|
||||
expect_line "Done"
|
||||
|
||||
switch_node 2
|
||||
send "scan\n"
|
||||
expect "Thread Network"
|
||||
expect "Done"
|
||||
expect_line "Done"
|
||||
|
||||
switch_node 1
|
||||
send "thread stop\n"
|
||||
expect "Done"
|
||||
expect_line "Done"
|
||||
send "networkname Thread\\ 网络\n"
|
||||
expect "Done"
|
||||
expect_line "Done"
|
||||
send "thread start\n"
|
||||
expect "Done"
|
||||
expect_line "Done"
|
||||
wait_for "state" "leader"
|
||||
expect "Done"
|
||||
expect_line "Done"
|
||||
|
||||
switch_node 2
|
||||
send "scan\n"
|
||||
expect "Thread 网络"
|
||||
expect "Done"
|
||||
expect_line "Done"
|
||||
|
||||
switch_node 1
|
||||
send "thread stop\n"
|
||||
expect "Done"
|
||||
expect_line "Done"
|
||||
send "networkname スレッド\n"
|
||||
expect "Done"
|
||||
expect_line "Done"
|
||||
send "thread start\n"
|
||||
expect "Done"
|
||||
expect_line "Done"
|
||||
wait_for "state" "leader"
|
||||
expect "Done"
|
||||
expect_line "Done"
|
||||
|
||||
switch_node 2
|
||||
send "scan\n"
|
||||
expect "スレッド"
|
||||
expect "Done"
|
||||
expect_line "Done"
|
||||
|
||||
dispose_all
|
||||
|
||||
Reference in New Issue
Block a user