diff options
Diffstat (limited to 'tests/support')
-rw-r--r-- | tests/support/server.tcl | 5 | ||||
-rw-r--r-- | tests/support/util.tcl | 22 |
2 files changed, 26 insertions, 1 deletions
diff --git a/tests/support/server.tcl b/tests/support/server.tcl index b673b70ae..6cc846b97 100644 --- a/tests/support/server.tcl +++ b/tests/support/server.tcl @@ -300,7 +300,7 @@ proc wait_server_started {config_file stdout pid} { set maxiter [expr {120*1000/$checkperiod}] ; # Wait up to 2 minutes. set port_busy 0 while 1 { - if {[regexp -- " PID: $pid" [exec cat $stdout]]} { + if {[regexp -- " PID: $pid.*Server initialized" [exec cat $stdout]]} { break } after $checkperiod @@ -464,6 +464,9 @@ proc start_server {options {code undefined}} { set data [split [exec cat "tests/assets/$baseconfig"] "\n"] set config {} if {$::tls} { + if {$::tls_module} { + lappend config_lines [list "loadmodule" [format "%s/src/redis-tls.so" [pwd]]] + } dict set config "tls-cert-file" [format "%s/tests/tls/server.crt" [pwd]] dict set config "tls-key-file" [format "%s/tests/tls/server.key" [pwd]] dict set config "tls-client-cert-file" [format "%s/tests/tls/client.crt" [pwd]] diff --git a/tests/support/util.tcl b/tests/support/util.tcl index 8153ad8bb..c7aef0f50 100644 --- a/tests/support/util.tcl +++ b/tests/support/util.tcl @@ -1039,3 +1039,25 @@ proc memory_usage {key} { } return $usage } + +# forward compatibility, lmap missing in TCL 8.5 +proc lmap args { + set body [lindex $args end] + set args [lrange $args 0 end-1] + set n 0 + set pairs [list] + foreach {varnames listval} $args { + set varlist [list] + foreach varname $varnames { + upvar 1 $varname var$n + lappend varlist var$n + incr n + } + lappend pairs $varlist $listval + } + set temp [list] + foreach {*}$pairs { + lappend temp [uplevel 1 $body] + } + set temp +} |