mirror of
https://github.com/espressif/openthread.git
synced 2026-09-18 15:10:12 +00:00
[test] split cli-2-nodes.exp into multiple files (#5066)
This splits cli-2-nodes.exp into multiple files each of which contains tests for a single command.
This commit is contained in:
@@ -27,8 +27,14 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
spawn $env(OT_COMMAND) 1
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
|
||||
set timeout 1
|
||||
|
||||
|
||||
spawn $env(OT_COMMAND) 1
|
||||
expect_after {
|
||||
timeout { exit 1 }
|
||||
}
|
||||
@@ -42,5 +48,23 @@ send "ping stop\n"
|
||||
expect "Done"
|
||||
send "ping ::1 1 2 1 1 1\n"
|
||||
expect "Error 7: InvalidArgs"
|
||||
send "\x04"
|
||||
expect eof
|
||||
dispose
|
||||
|
||||
|
||||
setup_nodes
|
||||
|
||||
set spawn_id $spawn_2
|
||||
send "ipaddr\n"
|
||||
expect -re {(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4})}
|
||||
set addr $expect_out(1,string)
|
||||
expect "Done"
|
||||
|
||||
set spawn_id $spawn_1
|
||||
send "ping $addr\n"
|
||||
expect "16 bytes from $addr: icmp_seq=1"
|
||||
send "ping $addr 20 10 0.00123456 255\n"
|
||||
for {set i 2} {$i <= 11} {incr i} {
|
||||
expect "28 bytes from $addr: icmp_seq=$i"
|
||||
}
|
||||
|
||||
dispose_nodes
|
||||
|
||||
Reference in New Issue
Block a user