command line option in test suite to activate valgrind mode

This commit is contained in:
antirez 2010-12-10 15:40:48 +01:00
parent e9bc56dbed
commit 4b918769a1
2 changed files with 3 additions and 1 deletions

View File

@ -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 &
}

View File

@ -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