Running unit tests under valgrind

John Ralls jralls at
Tue May 22 10:55:19 EDT 2012

On May 22, 2012, at 7:38 AM, Derek Atkins wrote:

> Don,
> Donald Allen <donaldcallen at> writes:
>>> Are you offering to help do this periodic testing!?   If so, thank you!
>> Yes, I said so above. Make a valgrind+gnucash executable available to
>> me (or tell me how to build one), and I will put it through the kind
>> of paces that I use gnucash for normally. I've got a very fast box
>> with 8 Gb of memory and SSDs running Linux that should make the
>> performance hit tolerable. I can easily test both the db (postgresql)
>> and xml backends.
> There is a gnucash-valgrind script that gets generated on all platforms
> except Windows, and it gets installed into the bindir alongside
> gnucash.  So you should just be able to run "gnucash-valgrind" instead
> of "gnucash" already.

Assuming that you have installed Valgrind, of course. Depending on how your distro packages Gnucash, you may need to build your own to get symbols, and the Valgrind docs recommend turning off optimizations (-O0) as well. Some useful instructions:

John Ralls

More information about the gnucash-devel mailing list