mirror of
https://github.com/espressif/openthread.git
synced 2026-08-15 23:27:47 +00:00
[test] move expect timeout settings to _common.exp (#5242)
This moves all settings of timeout to one place. Also changes the default timeout to 10 seconds, can probably solve the occasional timeout when dataset commit active.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
|
||||
proc wait_for {command expected} {
|
||||
set result 0
|
||||
set timeout 1
|
||||
for {set i 0} {$i < 20} {incr i} {
|
||||
if {$command != ""} {
|
||||
send "$command\n"
|
||||
@@ -67,3 +68,5 @@ proc dispose {} {
|
||||
send "\x04"
|
||||
expect eof
|
||||
}
|
||||
|
||||
set timeout 10
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
set timeout 3
|
||||
|
||||
send "ifconfig up\n"
|
||||
expect "Done"
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
set timeout 3
|
||||
setup_nodes
|
||||
|
||||
set spawn_id $spawn_2
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
set timeout 3
|
||||
setup_nodes
|
||||
|
||||
set spawn_id $spawn_2
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
set timeout 3
|
||||
setup_nodes
|
||||
|
||||
set spawn_id $spawn_1
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
set timeout 3
|
||||
setup_nodes
|
||||
|
||||
set spawn_id $spawn_1
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
set timeout 3
|
||||
|
||||
send "coex disable\n"
|
||||
expect "Done"
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
set timeout 3
|
||||
setup_nodes
|
||||
|
||||
set spawn_id $spawn_2
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
set timeout 3
|
||||
|
||||
send "counters\n"
|
||||
expect "mac"
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
set timeout 3
|
||||
setup_nodes
|
||||
|
||||
set spawn_id $spawn_1
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
set timeout 3
|
||||
|
||||
send "extaddr 99aabbccddeeff00\n"
|
||||
expect "Done"
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
set timeout 3
|
||||
setup_nodes
|
||||
|
||||
set spawn_id $spawn_1
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
set timeout 3
|
||||
|
||||
send "log level\n"
|
||||
expect "1"
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
set timeout 3
|
||||
|
||||
send "mac retries direct 5\n"
|
||||
expect "Done"
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
set timeout 3
|
||||
|
||||
send "macfilter\n"
|
||||
expect "Address Mode: Disabled"
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
set timeout 3
|
||||
setup_nodes
|
||||
set spawn_id $spawn_1
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
set timeout 3
|
||||
setup_nodes
|
||||
|
||||
set spawn_id $spawn_2
|
||||
|
||||
@@ -31,9 +31,6 @@ source "tests/scripts/expect/_common.exp"
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
|
||||
set timeout 3
|
||||
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
|
||||
send "ping ::1 1 2 1 1\n"
|
||||
|
||||
@@ -31,9 +31,6 @@ source "tests/scripts/expect/_common.exp"
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
|
||||
set timeout 3
|
||||
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
|
||||
send "promiscuous\n"
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
set timeout 3
|
||||
|
||||
send "pskc 00112233445566778899aabbccddeeff\n"
|
||||
expect "Done"
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
set timeout 3
|
||||
setup_nodes
|
||||
|
||||
set spawn_id $spawn_1
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
set timeout 3
|
||||
|
||||
send "routereligible disable\n"
|
||||
expect "Done"
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
set timeout 3
|
||||
setup_nodes
|
||||
|
||||
set spawn_id [spawn_node 3]
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
set timeout 3
|
||||
setup_nodes
|
||||
|
||||
set spawn_id $spawn_2
|
||||
|
||||
@@ -27,11 +27,10 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
spawn $env(OT_COMMAND) "spinel+hdlc+uart://$env(RCP_COMMAND)?forkpty-arg=1"
|
||||
set timeout 3
|
||||
expect_after {
|
||||
timeout { exit 1 }
|
||||
}
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
|
||||
send "diag rcp\n"
|
||||
expect "diagnostics mode is disabled"
|
||||
expect "Done"
|
||||
@@ -54,5 +53,5 @@ expect "status 0x7"
|
||||
expect "Done"
|
||||
send "diag rcp power 10\n"
|
||||
expect "Done"
|
||||
send "\x04"
|
||||
expect eof
|
||||
|
||||
dispose
|
||||
|
||||
@@ -27,9 +27,10 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
# allows 11-25 and forbidden 26
|
||||
spawn $env(OT_COMMAND) "spinel+hdlc+uart://$env(RCP_COMMAND)?max-power-table=11,12,13,14,15,16,17,18,19,20,21,22,23,24,-1,0x7f&forkpty-arg=1"
|
||||
set timeout 3
|
||||
expect_after {
|
||||
timeout { exit 1 }
|
||||
}
|
||||
@@ -43,7 +44,6 @@ send "\x04"
|
||||
expect eof
|
||||
# allows all channels by default
|
||||
spawn $env(OT_COMMAND) "spinel+hdlc+uart://$env(RCP_COMMAND)?forkpty-arg=1"
|
||||
set timeout 3
|
||||
expect_after {
|
||||
timeout { exit 1 }
|
||||
}
|
||||
|
||||
@@ -29,11 +29,7 @@
|
||||
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
spawn $env(OT_COMMAND) "spinel+hdlc+uart://$env(RCP_COMMAND)?forkpty-arg=1"
|
||||
set timeout 3
|
||||
expect_after {
|
||||
timeout { exit 1 }
|
||||
}
|
||||
set spawn_id [spawn_node 1]
|
||||
|
||||
send "rcp version\n"
|
||||
expect "Done"
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
set timeout 3
|
||||
|
||||
spawn $env(OT_COMMAND) "spinel+hdlc+uart://$env(RCP_COMMAND)?forkpty-arg=--sleep-to-tx 1"
|
||||
set node_1 $spawn_id
|
||||
expect_after {
|
||||
|
||||
@@ -29,11 +29,7 @@
|
||||
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
spawn $env(OT_COMMAND) "spinel+hdlc+uart://$env(RCP_COMMAND)?forkpty-arg=1"
|
||||
set timeout 3
|
||||
expect_after {
|
||||
timeout { exit 1 }
|
||||
}
|
||||
set spawn_id [spawn_node 1]
|
||||
|
||||
send "panid 0xface\n"
|
||||
expect "Done"
|
||||
|
||||
@@ -29,11 +29,7 @@
|
||||
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
spawn $env(OT_COMMAND) "spinel+hdlc+uart://$env(RCP_COMMAND)?forkpty-arg=1"
|
||||
set timeout 3
|
||||
expect_after {
|
||||
timeout { exit 1 }
|
||||
}
|
||||
set spawn_id [spawn_node 1]
|
||||
|
||||
send "netif\n"
|
||||
expect -re {[\r\n][^\r\n:]+?:\d+}
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
set timeout 3
|
||||
set spawn_id [spawn_node 1]
|
||||
|
||||
send "ifconfig up\n"
|
||||
|
||||
@@ -29,11 +29,7 @@
|
||||
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
spawn $env(OT_COMMAND) "spinel+hdlc+uart://$env(RCP_COMMAND)?forkpty-arg=1"
|
||||
set timeout 3
|
||||
expect_after {
|
||||
timeout { exit 1 }
|
||||
}
|
||||
set spawn_id [spawn_node 1]
|
||||
|
||||
send "panid 0xface\n"
|
||||
expect "Done"
|
||||
|
||||
Reference in New Issue
Block a user