From 4c378d7f6caae6783c64ed177f86c9098ea3da78 Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 11 Jul 2011 13:41:06 +0200 Subject: [PATCH] new test engine valgrind support --- tests/integration/aof.tcl | 2 ++ tests/integration/replication.tcl | 1 + tests/support/server.tcl | 5 +---- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/integration/aof.tcl b/tests/integration/aof.tcl index 3c77cb96..a554f9ef 100644 --- a/tests/integration/aof.tcl +++ b/tests/integration/aof.tcl @@ -32,6 +32,7 @@ tags {"aof"} { start_server_aof [list dir $server_path] { test "Unfinished MULTI: Server should not have been started" { + if {$::valgrind} {after 2000} assert_equal 0 [is_alive $srv] } @@ -49,6 +50,7 @@ tags {"aof"} { start_server_aof [list dir $server_path] { test "Short read: Server should not have been started" { + if {$::valgrind} {after 2000} assert_equal 0 [is_alive $srv] } diff --git a/tests/integration/replication.tcl b/tests/integration/replication.tcl index 4756b82c..0a1cd409 100644 --- a/tests/integration/replication.tcl +++ b/tests/integration/replication.tcl @@ -54,6 +54,7 @@ start_server {tags {"repl"}} { test {SET on the master should immediately propagate} { r -1 set mykey bar + if {$::valgrind} {after 2000} r 0 get mykey } {bar} } diff --git a/tests/support/server.tcl b/tests/support/server.tcl index fb8c43d0..3fa1725f 100644 --- a/tests/support/server.tcl +++ b/tests/support/server.tcl @@ -19,10 +19,7 @@ proc check_valgrind_errors stderr { if {![regexp -- {ERROR SUMMARY: 0 errors} $buf] || (![regexp -- {definitely lost: 0 bytes} $buf] && ![regexp -- {no leaks are possible} $buf])} { - puts "*** VALGRIND ERRORS ***" - puts $buf - puts "-----------------------" - append ::valgrind_errors "$buf\n\n" + send_data_packet $::test_server_fd err "Valgrind error: $buf\n" } } -- 2.47.2