[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:
Simon Lin
2020-06-30 11:01:10 -07:00
committed by GitHub
parent eaaaa59071
commit b0bff4f8c3
27 changed files with 31 additions and 30 deletions
+4 -1
View File
@@ -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