test-lib: valgrind for only tests matching a pattern

With the new --valgrind-only=<pattern> option, one can enable
--valgrind at a per-test granularity, exactly analogous to
--verbose-only from the previous commit.

The options are wired such that --valgrind implies --verbose (as
before), but --valgrind-only=<pattern> implies
--verbose-only=<pattern> unless --verbose is also in effect.

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Thomas Rast
2013-06-23 20:12:57 +02:00
committed by Junio C Hamano
parent ff09af3fb8
commit 5dfc368f5e
3 changed files with 43 additions and 1 deletions

View File

@ -4,6 +4,9 @@ base=$(basename "$0")
TOOL_OPTIONS='--leak-check=no'
test -z "$GIT_VALGRIND_ENABLED" &&
exec "$GIT_VALGRIND"/../../"$base" "$@"
case "$GIT_VALGRIND_MODE" in
memcheck-fast)
;;