summaryrefslogtreecommitdiff
path: root/t/valgrind/.gitignore
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2009-02-04 00:25:59 +0100
committerJunio C Hamano <gitster@pobox.com>2009-02-03 22:00:58 -0800
commit4e1be63c3b05fd379b51b611b7e869ff6977d8ab (patch)
tree01c142ae1b5014d8850980c6d7c1f38580ddb27d /t/valgrind/.gitignore
parente656fc97a2be4586bfef25714d588f002d2605a2 (diff)
downloadgit-4e1be63c3b05fd379b51b611b7e869ff6977d8ab.tar.gz
Add valgrind support in test scripts
This patch adds the ability to use valgrind's memcheck tool to diagnose memory problems in Git while running the test scripts. It requires valgrind 3.4.0 or newer. It works by creating symlinks to a valgrind script, which have the same name as our Git binaries, and then putting that directory in front of the test script's PATH as well as set GIT_EXEC_PATH to that directory. Git scripts are symlinked from that directory directly. That way, Git binaries called by Git scripts are valgrinded, too. Valgrind can be used by specifying "GIT_TEST_OPTS=--valgrind" in the make invocation. Any invocation of git that finds any errors under valgrind will exit with failure code 126. Any valgrind output will go to the usual stderr channel for tests (i.e., /dev/null, unless -v has been specified). If you need to pass options to valgrind -- you might want to run another tool than memcheck, for example -- you can set the environment variable GIT_VALGRIND_OPTIONS. A few default suppressions are included, since libz seems to trigger quite a few false positives. We'll assume that libz works and that we can ignore any errors which are reported there. Note: it is safe to run the valgrind tests in parallel, as the links in t/valgrind/bin/ are created using proper locking. Initial patch and all the hard work by Jeff King. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/valgrind/.gitignore')
-rw-r--r--t/valgrind/.gitignore2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/valgrind/.gitignore b/t/valgrind/.gitignore
new file mode 100644
index 0000000000..d4ae6676d1
--- /dev/null
+++ b/t/valgrind/.gitignore
@@ -0,0 +1,2 @@
+/bin/
+/templates