diff options
author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-05-14 17:49:39 +0200 |
---|---|---|
committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-05-14 17:49:39 +0200 |
commit | 239515bccea55b34ba5d706741894b605cb6b3d1 (patch) | |
tree | 8b9cef2cd82ececa147d0086b527a26a7d3caef2 | |
parent | 4fb6d00c979984f7c462d5db1cadfdb0fa087dab (diff) | |
download | redis-239515bccea55b34ba5d706741894b605cb6b3d1.tar.gz |
check for memory leaks before killing a server
-rw-r--r-- | test/support/server.tcl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/support/server.tcl b/test/support/server.tcl index 62d9ec9e6..53ca46830 100644 --- a/test/support/server.tcl +++ b/test/support/server.tcl @@ -10,6 +10,15 @@ proc error_and_quit {config_file error} { proc kill_server config { set pid [dict get $config pid] + # check for leaks + catch { + if {[string match {*Darwin*} [exec uname -a]]} { + test {Check for memory leaks} { + exec leaks $pid + } {*0 leaks*} + } + } + # kill server and wait for the process to be totally exited exec kill $pid while 1 { |