Bugzilla – Bug 124
it would be nice if waf check could also run the tests under valgrind
Last modified: 2008-07-01 13:32:22 UTC
or maybe you could define a new target waf valgrindcheck
There is a not too complicated way to run unit tests under valgrind, kind of documented in [1]. Basically: waf --run run-tests --command-template "valgrind %s" Unfortunately waf does not allow wscripts to add new targets, only new options, like --valgrind. So our full range of options is: 1. Do nothing, document the 'waf --run run-tests --command-template "valgrind %s"' option; 2. Add a waf --valgrindcheck option, which runs the unit tests under valgrind immediately; 3. Add a waf "configure --enable-valgrind" configure option which turns on valgrind for when 'waf check' is run in the future; 4. Automatically detect the presence of valgrind during waf configure and use it for waf check if it was found, unconditionally. Personally I think 1 is just fine... :-) [1] http://www.nsnam.org/wiki/index.php/User_FAQ#How_to_run_NS-3_programs_under_another_tool
I would opt for 2.
Added --valgrind option (waf check --valgrind, or waf --run something --valgrind).