Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
b0146aaf
Commit
b0146aaf
authored
Jan 09, 2015
by
Matt Stancliff
Committed by
antirez
Jan 21, 2015
Browse files
Tell sentinel/cluster tests to allow valgrind
parent
92cfab44
Changes
1
Show whitespace changes
Inline
Side-by-side
tests/instances.tcl
View file @
b0146aaf
...
@@ -16,6 +16,7 @@ source ../support/server.tcl
...
@@ -16,6 +16,7 @@ source ../support/server.tcl
source ../support/test.tcl
source ../support/test.tcl
set ::verbose 0
set ::verbose 0
set ::valgrind 0
set ::pause_on_error 0
set ::pause_on_error 0
set ::simulate_error 0
set ::simulate_error 0
set ::sentinel_instances
{}
set ::sentinel_instances
{}
...
@@ -65,7 +66,13 @@ proc spawn_instance {type base_port count {conf {}}} {
...
@@ -65,7 +66,13 @@ proc spawn_instance {type base_port count {conf {}}} {
}
else
{
}
else
{
error
"Unknown instance type."
error
"Unknown instance type."
}
}
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 pid
[
exec ../../../src/$
{
prgname
}
$cfgfile &
]
}
lappend ::pids $pid
lappend ::pids $pid
# Check availability
# Check availability
...
@@ -113,6 +120,8 @@ proc parse_options {} {
...
@@ -113,6 +120,8 @@ proc parse_options {} {
set ::pause_on_error 1
set ::pause_on_error 1
}
elseif
{
$opt
eq
"--fail"
}
{
}
elseif
{
$opt
eq
"--fail"
}
{
set ::simulate_error 1
set ::simulate_error 1
}
elseif
{
$opt
eq
{
--valgrind
}}
{
set ::valgrind 1
}
elseif
{
$opt
eq
"--help"
}
{
}
elseif
{
$opt
eq
"--help"
}
{
puts
"Hello, I'm sentinel.tcl and I run Sentinel unit tests."
puts
"Hello, I'm sentinel.tcl and I run Sentinel unit tests."
puts
"
\n
Options:"
puts
"
\n
Options:"
...
@@ -390,7 +399,13 @@ proc restart_instance {type id} {
...
@@ -390,7 +399,13 @@ proc restart_instance {type id} {
}
else
{
}
else
{
set prgname redis-sentinel
set prgname redis-sentinel
}
}
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 pid
[
exec ../../../src/$
{
prgname
}
$cfgfile &
]
}
set_instance_attrib $type $id pid $pid
set_instance_attrib $type $id pid $pid
lappend ::pids $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