Detect and show crashes on Sentinel/Cluster tests.
This commit is contained in:
parent
fc3ca8ff87
commit
5432fc81db
@ -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 {} {
|
proc cleanup {} {
|
||||||
puts "Cleaning up..."
|
puts "Cleaning up..."
|
||||||
|
log_crashes
|
||||||
foreach pid $::pids {
|
foreach pid $::pids {
|
||||||
catch {exec kill -9 $pid}
|
catch {exec kill -9 $pid}
|
||||||
}
|
}
|
||||||
@ -110,6 +127,7 @@ proc cleanup {} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc abort_sentinel_test msg {
|
proc abort_sentinel_test msg {
|
||||||
|
incr ::failed
|
||||||
puts "WARNING: Aborting the test."
|
puts "WARNING: Aborting the test."
|
||||||
puts ">>>>>>>> $msg"
|
puts ">>>>>>>> $msg"
|
||||||
if {$::pause_on_error} pause_on_error
|
if {$::pause_on_error} pause_on_error
|
||||||
|
Loading…
x
Reference in New Issue
Block a user