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
121ffc85
Commit
121ffc85
authored
Jul 11, 2011
by
antirez
Browse files
better recap of failed tests.
parent
04e2410d
Changes
3
Hide whitespace changes
Inline
Side-by-side
tests/support/test.tcl
View file @
121ffc85
...
@@ -98,9 +98,7 @@ proc test {name code {okpattern undefined}} {
...
@@ -98,9 +98,7 @@ proc test {name code {okpattern undefined}} {
incr ::num_tests
incr ::num_tests
set details
{}
set details
{}
lappend details $::curfile
lappend details
"
$name
in
$::curfile
"
lappend details $::tags
lappend details $name
send_data_packet $::test_server_fd testing $name
send_data_packet $::test_server_fd testing $name
...
@@ -111,7 +109,7 @@ proc test {name code {okpattern undefined}} {
...
@@ -111,7 +109,7 @@ proc test {name code {okpattern undefined}} {
lappend ::tests_failed $details
lappend ::tests_failed $details
incr ::num_failed
incr ::num_failed
send_data_packet $::test_server_fd err
$name
send_data_packet $::test_server_fd err
[
join $details
"
\n
"
]
}
else
{
}
else
{
# Re-raise, let handler up the stack take care of this.
# Re-raise, let handler up the stack take care of this.
error $error $::errorInfo
error $error $::errorInfo
...
@@ -126,7 +124,7 @@ proc test {name code {okpattern undefined}} {
...
@@ -126,7 +124,7 @@ proc test {name code {okpattern undefined}} {
lappend ::tests_failed $details
lappend ::tests_failed $details
incr ::num_failed
incr ::num_failed
send_data_packet $::test_server_fd err
$name
send_data_packet $::test_server_fd err
[
join $details
"
\n
"
]
}
}
}
}
...
...
tests/test_helper.tcl
View file @
121ffc85
...
@@ -277,7 +277,7 @@ proc the_end {} {
...
@@ -277,7 +277,7 @@ proc the_end {} {
puts
"
$time
seconds -
$name
"
puts
"
$time
seconds -
$name
"
}
}
if
{[
llength $::failed_tests
]}
{
if
{[
llength $::failed_tests
]}
{
puts
"!!! WARNING
:
The following tests failed
\n
"
puts
"
\n
[
colorstr bold-red
{
!!! WARNING
}]
The following tests failed
:
\n
"
foreach failed $::failed_tests
{
foreach failed $::failed_tests
{
puts
"***
$failed
"
puts
"***
$failed
"
}
}
...
...
tests/unit/other.tcl
View file @
121ffc85
start_server
{
tags
{
"other"
}}
{
start_server
{
tags
{
"other"
}}
{
if
{
$::force
_failure
}
{
# This is used just for test suite development purposes.
test
{
Failing test
}
{
format err
}
{
ok
}
}
test
{
SAVE - make sure there are all the types as values
}
{
test
{
SAVE - make sure there are all the types as values
}
{
# Wait for a background saving in progress to terminate
# Wait for a background saving in progress to terminate
waitForBgsave r
waitForBgsave r
...
@@ -242,11 +249,4 @@ start_server {tags {"other"}} {
...
@@ -242,11 +249,4 @@ start_server {tags {"other"}} {
test
{
Perform a final SAVE to leave a clean DB on disk
}
{
test
{
Perform a final SAVE to leave a clean DB on disk
}
{
r save
r save
}
{
OK
}
}
{
OK
}
if
{
$::force
_failure
}
{
# This is used just for test suite development purposes.
test
{
Failing test
}
{
format err
}
{
ok
}
}
}
}
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