From 4b918769a1d89e08c88d570913a5911f7d891efe Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 10 Dec 2010 15:40:48 +0100 Subject: [PATCH] command line option in test suite to activate valgrind mode --- tests/support/server.tcl | 2 +- tests/test_helper.tcl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/support/server.tcl b/tests/support/server.tcl index 1507088e..144bc2f5 100644 --- a/tests/support/server.tcl +++ b/tests/support/server.tcl @@ -171,7 +171,7 @@ proc start_server {options {code undefined}} { set stderr [format "%s/%s" [dict get $config "dir"] "stderr"] if {$::valgrind} { - exec valgrind src/redis-server $config_file > $stdout 2> $stderr & + exec valgrind --suppressions=src/valgrind.sup src/redis-server $config_file > $stdout 2> $stderr & } else { exec src/redis-server $config_file > $stdout 2> $stderr & } diff --git a/tests/test_helper.tcl b/tests/test_helper.tcl index 4c207f64..82c4f91a 100644 --- a/tests/test_helper.tcl +++ b/tests/test_helper.tcl @@ -167,6 +167,8 @@ for {set j 0} {$j < [llength $argv]} {incr j} { } } incr j + } elseif {$opt eq {--valgrind}} { + set ::valgrind 1 } elseif {$opt eq {--file}} { set ::file $arg incr j -- 2.47.2