[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:
Moandor
2020-07-15 20:57:56 -07:00
committed by GitHub
parent b6027f9e65
commit 6e98f3bb5b
32 changed files with 24 additions and 59 deletions
+3
View File
@@ -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
-1
View File
@@ -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"
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
-1
View File
@@ -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"
+1 -1
View File
@@ -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
-1
View File
@@ -30,7 +30,6 @@
source "tests/scripts/expect/_common.exp"
set spawn_id [spawn_node 1]
set timeout 3
send "counters\n"
expect "mac"
-1
View File
@@ -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
-1
View File
@@ -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"
+1 -1
View File
@@ -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
-1
View File
@@ -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"
-1
View File
@@ -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"
-1
View File
@@ -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"
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
-3
View File
@@ -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"
-3
View File
@@ -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"
-1
View File
@@ -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"
-1
View File
@@ -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]
+1 -1
View File
@@ -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
+6 -7
View File
@@ -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 }
}
+1 -5
View File
@@ -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 {
+1 -5
View File
@@ -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"
+1 -5
View File
@@ -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+}
-1
View File
@@ -29,7 +29,6 @@
source "tests/scripts/expect/_common.exp"
set timeout 3
set spawn_id [spawn_node 1]
send "ifconfig up\n"
+1 -5
View File
@@ -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"