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
4c378d7f
Commit
4c378d7f
authored
Jul 11, 2011
by
antirez
Browse files
new test engine valgrind support
parent
c7c16a32
Changes
3
Show whitespace changes
Inline
Side-by-side
tests/integration/aof.tcl
View file @
4c378d7f
...
@@ -32,6 +32,7 @@ tags {"aof"} {
...
@@ -32,6 +32,7 @@ tags {"aof"} {
start_server_aof
[
list dir $server_path
]
{
start_server_aof
[
list dir $server_path
]
{
test
"Unfinished MULTI: Server should not have been started"
{
test
"Unfinished MULTI: Server should not have been started"
{
if
{
$::valgrind
}
{
after 2000
}
assert_equal 0
[
is_alive $srv
]
assert_equal 0
[
is_alive $srv
]
}
}
...
@@ -49,6 +50,7 @@ tags {"aof"} {
...
@@ -49,6 +50,7 @@ tags {"aof"} {
start_server_aof
[
list dir $server_path
]
{
start_server_aof
[
list dir $server_path
]
{
test
"Short read: Server should not have been started"
{
test
"Short read: Server should not have been started"
{
if
{
$::valgrind
}
{
after 2000
}
assert_equal 0
[
is_alive $srv
]
assert_equal 0
[
is_alive $srv
]
}
}
...
...
tests/integration/replication.tcl
View file @
4c378d7f
...
@@ -54,6 +54,7 @@ start_server {tags {"repl"}} {
...
@@ -54,6 +54,7 @@ start_server {tags {"repl"}} {
test
{
SET on the master should immediately propagate
}
{
test
{
SET on the master should immediately propagate
}
{
r -1 set mykey bar
r -1 set mykey bar
if
{
$::valgrind
}
{
after 2000
}
r 0 get mykey
r 0 get mykey
}
{
bar
}
}
{
bar
}
}
}
...
...
tests/support/server.tcl
View file @
4c378d7f
...
@@ -19,10 +19,7 @@ proc check_valgrind_errors stderr {
...
@@ -19,10 +19,7 @@ proc check_valgrind_errors stderr {
if
{
!
[
regexp --
{
ERROR SUMMARY: 0 errors
}
$buf
]
||
if
{
!
[
regexp --
{
ERROR SUMMARY: 0 errors
}
$buf
]
||
(
!
[
regexp --
{
definitely lost: 0 bytes
}
$buf
]
&&
(
!
[
regexp --
{
definitely lost: 0 bytes
}
$buf
]
&&
!
[
regexp --
{
no leaks are possible
}
$buf
])}
{
!
[
regexp --
{
no leaks are possible
}
$buf
])}
{
puts
"*** VALGRIND ERRORS ***"
send_data_packet $::test_server_fd err
"Valgrind error:
$buf
\n
"
puts $buf
puts
"-----------------------"
append ::valgrind_errors
"
$buf
\n\n
"
}
}
}
}
...
...
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