Simon Josefsson <si...@josefsson.org> writes: > I'm running self-tests under valgrind in several projects, and it seems > like a general useful thing, so how about putting the macro for this in > gnulib?
It looks like this implementation requires rerunning "configure" to run tests under valgrind. If that's right, it seems inconvenient. I've used different approaches in my own projects so that this is not required: * In GNU PSPP, which mostly uses the built-in Automake test framework, the invocations of the test programs are all through shell scripts. Each invocation of a test program is preceded by $SUPERVISOR, e.g. "$SUPERVISOR pspp ...". Then running "make check" runs without valgrind; running "make check SUPERVISOR='libtool --mode=execute valgrind'" runs with valgrind; and so on. (Sometimes 'libtool --mode=execute gdb --args' is handy.) * In Open vSwitch, which uses Autotest, I added a "check-valgrind" target that generates a collection of wrapper scripts, one for each program to be tested, and puts them at the head of $PATH, so that the test suite automatically uses valgrind every time it invokes valgrind. -- Ben Pfaff http://benpfaff.org