X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/cc7c4158bc9c584b91560e9bf3dff51a9316c9b3..c984d42fb14c72aa8a97e971f0f3d3df189f82d0:/tests/support/server.tcl diff --git a/tests/support/server.tcl b/tests/support/server.tcl index 4f48d22d..3fa1725f 100644 --- a/tests/support/server.tcl +++ b/tests/support/server.tcl @@ -1,5 +1,6 @@ set ::global_overrides {} set ::tags {} +set ::valgrind_errors {} proc error_and_quit {config_file error} { puts "!!COULD NOT START REDIS-SERVER\n" @@ -16,11 +17,9 @@ proc check_valgrind_errors stderr { close $fd if {![regexp -- {ERROR SUMMARY: 0 errors} $buf] || - ![regexp -- {definitely lost: 0 bytes} $buf]} { - puts "*** VALGRIND ERRORS ***" - puts $buf - puts "--- press enter to continue ---" - gets stdin + (![regexp -- {definitely lost: 0 bytes} $buf] && + ![regexp -- {no leaks are possible} $buf])} { + send_data_packet $::test_server_fd err "Valgrind error: $buf\n" } } @@ -182,7 +181,7 @@ proc start_server {options {code undefined}} { # check that the server actually started # ugly but tries to be as fast as possible... - set retrynum 20 + set retrynum 100 set serverisup 0 if {$::verbose} { @@ -214,7 +213,7 @@ proc start_server {options {code undefined}} { # find out the pid while {![info exists pid]} { - regexp {^\[(\d+)\]} [exec head -n1 $stdout] _ pid + regexp {\[(\d+)\]} [exec cat $stdout] _ pid after 100 }