diff options
author | danielk1977 <danielk1977@noemail.net> | 2008-03-28 07:42:53 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2008-03-28 07:42:53 +0000 |
commit | dbdc4d49cbf81aaadfa43f9bb84582f467473aa0 (patch) | |
tree | 2eeab02a79f54e9960173b71bfd217e1bc1e96b9 /test | |
parent | 19db935225bc66eafbc830e3a76262a0d68d870a (diff) | |
download | sqlite-dbdc4d49cbf81aaadfa43f9bb84582f467473aa0.tar.gz sqlite-dbdc4d49cbf81aaadfa43f9bb84582f467473aa0.zip |
If memory is leaked when running a test script with the --malloctrace option, write out a file called leaks.sql in the same format as mallocs.sql containing th e leaked applications. The same tools can then be used to examine the stack traces associated with leaked allocations. (CVS 4926)
FossilOrigin-Name: f1b97ed93183378ff56b4fe7ae8ea269c24092fc
Diffstat (limited to 'test')
-rw-r--r-- | test/tester.tcl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/tester.tcl b/test/tester.tcl index f15f0cb28..09b86b00f 100644 --- a/test/tester.tcl +++ b/test/tester.tcl @@ -11,7 +11,7 @@ # This file implements some common TCL routines used for regression # testing the SQLite library # -# $Id: tester.tcl,v 1.110 2008/03/22 01:08:01 drh Exp $ +# $Id: tester.tcl,v 1.111 2008/03/28 07:42:54 danielk1977 Exp $ set tcl_precision 15 @@ -260,6 +260,12 @@ proc finalize_testing {} { memdebug_log_sql sqlite3_memdebug_log stop sqlite3_memdebug_log clear + + if {[sqlite3_memory_used]>0} { + puts "Writing leaks.sql..." + sqlite3_memdebug_log sync + memdebug_log_sql leaks.sql + } } foreach f [glob -nocomplain test.db-*-journal] { file delete -force $f |