mirror of
https://github.com/espressif/openthread.git
synced 2026-09-13 04:30:08 +00:00
[test] fix network name capturing in expect scripts (#5284)
This fixes some expect test failures caused by the following scenario: Sometimes the command prompt > can be put after the echo of the input command when inputs come too fast, because we are sending the next command as soon as we see Done, we don't wait for the next > . This commit adds expect "> " before sending the command to fix this.
This commit is contained in:
@@ -51,6 +51,7 @@ expect "extpanid"
|
||||
expect -re {([0-9a-f]{16})}
|
||||
set extpan $expect_out(1,string)
|
||||
expect "Done"
|
||||
expect "> "
|
||||
send "networkname\n"
|
||||
expect "networkname"
|
||||
expect -re {[\r\n]([^\r\n]+?)[\r\n]}
|
||||
|
||||
@@ -63,6 +63,7 @@ expect "extpanid"
|
||||
expect -re {([0-9a-f]{16})}
|
||||
set extpan $expect_out(1,string)
|
||||
expect "Done"
|
||||
expect "> "
|
||||
send "networkname\n"
|
||||
expect "networkname"
|
||||
expect -re {[\r\n]([^\r\n]+)[\r\n]}
|
||||
|
||||
Reference in New Issue
Block a user