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
5432fc81
Commit
5432fc81
authored
Jan 15, 2016
by
antirez
Browse files
Detect and show crashes on Sentinel/Cluster tests.
parent
fc3ca8ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/instances.tcl
View file @
5432fc81
...
...
@@ -99,8 +99,25 @@ proc spawn_instance {type base_port count {conf {}}} {
}
}
proc log_crashes
{}
{
set start_pattern
{
*REDIS BUG REPORT START*
}
set logs
[
glob */log.txt
]
foreach log $logs
{
set fd
[
open $log
]
set found 0
while
{[
gets $fd line
]
>= 0
}
{
if
{[
string match $start_pattern $line
]}
{
puts
"
\n
*** Crash report found in
$log
***"
set found 1
}
if
{
$found
}
{
puts $line
}
}
}
}
proc cleanup
{}
{
puts
"Cleaning up..."
log_crashes
foreach pid $::pids
{
catch
{
exec kill -9 $pid
}
}
...
...
@@ -110,6 +127,7 @@ proc cleanup {} {
}
proc abort_sentinel_test msg
{
incr ::failed
puts
"WARNING: Aborting the test."
puts
">>>>>>>>
$msg
"
if
{
$::pause
_on_error
}
pause_on_error
...
...
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