From 239515bccea55b34ba5d706741894b605cb6b3d1 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Fri, 14 May 2010 17:49:39 +0200 Subject: [PATCH] check for memory leaks before killing a server --- test/support/server.tcl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/support/server.tcl b/test/support/server.tcl index 62d9ec9e..53ca4683 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 { -- 2.47.2