Previous: , Up: Running self-tests under valgrind   [Contents][Index]


19.7.4 How to use Valgrind with shell scripts

It is not desirable to apply valgrind to shell scripts or other non-binaries, because

There are two ways to avoid this:

However, with this measure in place, binaries invoked through scripts will not be invoked under valgrind. This can be solved by defining environment variables in the TESTS_ENVIRONMENT variable that are then used by the shell scripts. For example, add the following:

TESTS_ENVIRONMENT = VALGRIND='$(LOG_VALGRIND)'

And then modify the shell scripts to invoke the binary prefixed with $VALGRIND.