|
From: | Paul Eggert |
Subject: | bug#17512: Valgrind and regression tests? |
Date: | Fri, 16 May 2014 17:35:46 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
behoffski wrote:
1. Use a shell alias: grep="valgrind --log-file=foo grep" make check
That won't work, as too many parts of the system ignore the aliases.
2. Replace grep/egrep/fgrep as appropriate to execute the program within a shell, where valgrind plus any options is incorporated into the program invocation and the logfile is treated appropriately in the program invocation aftermath.
Yes, something like that should work. You can set up your own implementation of grep, like this:
#! /bin/sh exec valgrind --log-file=foo /full/path/to/actual/grep "$@"in a shell script called 'grep', in a different directory, and prepand that directory to your PATH.
Perhaps Jim has a better way to do it, though -- he's more of a valgrind wizard than I.
[Prev in Thread] | Current Thread | [Next in Thread] |