mirror of
https://github.com/espressif/openthread.git
synced 2026-09-09 18:50:07 +00:00
[github-actions] fix expects fail by chance (#5157)
This commit tries to reduce expects fails in GitHub actions: - wait_for only sends command when it's not empty - increases the default expect timeout from 1s to 3s.
This commit is contained in:
@@ -30,7 +30,10 @@
|
||||
proc wait_for {command expected} {
|
||||
set result 0
|
||||
for {set i 0} {$i < 20} {incr i} {
|
||||
send "$command\n"
|
||||
if {$command != ""} {
|
||||
send "$command\n"
|
||||
}
|
||||
|
||||
expect {
|
||||
-re $expected {
|
||||
set result 1
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
|
||||
send "ifconfig up\n"
|
||||
expect "Done"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
setup_nodes
|
||||
|
||||
set spawn_id $spawn_2
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
setup_nodes
|
||||
|
||||
set spawn_id $spawn_2
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
|
||||
send "coex disable\n"
|
||||
expect "Done"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
|
||||
send "counters\n"
|
||||
expect "mac"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
setup_nodes
|
||||
|
||||
set spawn_id $spawn_1
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
|
||||
send "extaddr 99aabbccddeeff00\n"
|
||||
expect "Done"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
setup_nodes
|
||||
|
||||
set spawn_id $spawn_1
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
|
||||
send "log level\n"
|
||||
expect "1"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
|
||||
send "mac retries direct 5\n"
|
||||
expect "Done"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
|
||||
send "macfilter\n"
|
||||
expect "Address Mode: Disabled"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
setup_nodes
|
||||
set spawn_id $spawn_1
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
setup_nodes
|
||||
|
||||
set spawn_id $spawn_2
|
||||
|
||||
@@ -31,7 +31,7 @@ source "tests/scripts/expect/_common.exp"
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
|
||||
@@ -31,7 +31,7 @@ source "tests/scripts/expect/_common.exp"
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
|
||||
send "pskc 00112233445566778899aabbccddeeff\n"
|
||||
expect "Done"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
setup_nodes
|
||||
|
||||
set spawn_id $spawn_1
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
set spawn_id [spawn_node 1]
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
|
||||
send "routereligible disable\n"
|
||||
expect "Done"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
source "tests/scripts/expect/_multinode.exp"
|
||||
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
setup_nodes
|
||||
|
||||
set spawn_id [spawn_node 3]
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#
|
||||
|
||||
spawn $env(OT_COMMAND) "spinel+hdlc+uart://$env(RCP_COMMAND)?forkpty-arg=1"
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
expect_after {
|
||||
timeout { exit 1 }
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
# 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 1
|
||||
set timeout 3
|
||||
expect_after {
|
||||
timeout { exit 1 }
|
||||
}
|
||||
@@ -43,7 +43,7 @@ send "\x04"
|
||||
expect eof
|
||||
# allows all channels by default
|
||||
spawn $env(OT_COMMAND) "spinel+hdlc+uart://$env(RCP_COMMAND)?forkpty-arg=1"
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
expect_after {
|
||||
timeout { exit 1 }
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
spawn $env(OT_COMMAND) "spinel+hdlc+uart://$env(RCP_COMMAND)?forkpty-arg=1"
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
expect_after {
|
||||
timeout { exit 1 }
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
|
||||
spawn $env(OT_COMMAND) "spinel+hdlc+uart://$env(RCP_COMMAND)?forkpty-arg=--sleep-to-tx 1"
|
||||
set node_1 $spawn_id
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
spawn $env(OT_COMMAND) "spinel+hdlc+uart://$env(RCP_COMMAND)?forkpty-arg=1"
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
expect_after {
|
||||
timeout { exit 1 }
|
||||
}
|
||||
@@ -44,7 +44,6 @@ expect "Done"
|
||||
wait_for "state" "leader"
|
||||
expect "Done"
|
||||
|
||||
set timeout 2
|
||||
send "dns resolve ipv6.google.com ::1 53\n"
|
||||
expect "DNS response for ipv6.google.com"
|
||||
expect "Done"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
spawn $env(OT_COMMAND) "spinel+hdlc+uart://$env(RCP_COMMAND)?forkpty-arg=1"
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
expect_after {
|
||||
timeout { exit 1 }
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
source "tests/scripts/expect/_common.exp"
|
||||
|
||||
spawn $env(OT_COMMAND) "spinel+hdlc+uart://$env(RCP_COMMAND)?forkpty-arg=1"
|
||||
set timeout 1
|
||||
set timeout 3
|
||||
expect_after {
|
||||
timeout { exit 1 }
|
||||
}
|
||||
@@ -44,7 +44,6 @@ expect "Done"
|
||||
wait_for "state" "leader"
|
||||
expect "Done"
|
||||
|
||||
set timeout 2
|
||||
send "sntp query ::1 123\n"
|
||||
expect -re {SNTP response - Unix time: \d+ \(era: \d+\)}
|
||||
expect "Done"
|
||||
|
||||
Reference in New Issue
Block a user