Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
fa470fe7
Commit
fa470fe7
authored
Jan 09, 2015
by
Matt Stancliff
Committed by
antirez
Jan 22, 2015
Browse files
Tell sentinel/cluster tests to allow valgrind
parent
26698af3
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/instances.tcl
View file @
fa470fe7
...
...
@@ -16,6 +16,7 @@ source ../support/server.tcl
source ../support/test.tcl
set ::verbose 0
set ::valgrind 0
set ::pause_on_error 0
set ::simulate_error 0
set ::sentinel_instances
{}
...
...
@@ -65,7 +66,13 @@ proc spawn_instance {type base_port count {conf {}}} {
}
else
{
error
"Unknown instance type."
}
set pid
[
exec ../../../src/$
{
prgname
}
$cfgfile &
]
if
{
$::valgrind
}
{
set pid
[
exec valgrind --suppressions=../../../src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full ../../../src/$
{
prgname
}
$cfgfile &
]
}
else
{
set pid
[
exec ../../../src/$
{
prgname
}
$cfgfile &
]
}
lappend ::pids $pid
# Check availability
...
...
@@ -113,6 +120,8 @@ proc parse_options {} {
set ::pause_on_error 1
}
elseif
{
$opt
eq
"--fail"
}
{
set ::simulate_error 1
}
elseif
{
$opt
eq
{
--valgrind
}}
{
set ::valgrind 1
}
elseif
{
$opt
eq
"--help"
}
{
puts
"Hello, I'm sentinel.tcl and I run Sentinel unit tests."
puts
"
\n
Options:"
...
...
@@ -390,7 +399,13 @@ proc restart_instance {type id} {
}
else
{
set prgname redis-sentinel
}
set pid
[
exec ../../../src/$
{
prgname
}
$cfgfile &
]
if
{
$::valgrind
}
{
set pid
[
exec valgrind --suppressions=../../../src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full ../../../src/$
{
prgname
}
$cfgfile &
]
}
else
{
set pid
[
exec ../../../src/$
{
prgname
}
$cfgfile &
]
}
set_instance_attrib $type $id pid $pid
lappend ::pids $pid
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment