Fix test framework to detect proper server PID

Previously the PID format was:
[PID] Timestamp

But it recently changed to:
PID:X Timestamp

The tcl testing framework was grabbing the PID from \[\d+\], but
that's not valid anymore.

Now we grab the pid from "PID: <PID>" in the part of Redis startup
output to the right of the ASCII logo.
This commit is contained in:
Matt Stancliff 2014-05-23 13:54:29 -04:00
parent d0566daeaf
commit 6c16ecaaaa

View File

@ -236,7 +236,7 @@ proc start_server {options {code undefined}} {
# find out the pid
while {![info exists pid]} {
regexp {\[(\d+)\]} [exec cat $stdout] _ pid
regexp {PID:\s(\d+)} [exec cat $stdout] _ pid
after 100
}