tests: add Valgrind support

Now running tests with the "--valgrind" option will run cgit under
Valgrind instead of all Git commands.

Signed-off-by: John Keeping <john@keeping.me.uk>
这个提交包含在:
John Keeping
2013-04-08 20:12:38 +01:00
提交者 Jason A. Donenfeld
父节点 382ecf152e
当前提交 1b1974c45e
共有 2 个文件被更改,包括 48 次插入1 次删除

12
tests/valgrind/bin/cgit 可执行文件
查看文件

@@ -0,0 +1,12 @@
#!/bin/sh
# Note that we currently use Git's suppression file and there are variables
# $GIT_VALGRIND and $CGIT_VALGRIND which point to different places.
exec valgrind -q --error-exitcode=126 \
--suppressions="$GIT_VALGRIND/default.supp" \
--gen-suppressions=all \
--leak-check=no \
--track-origins=yes \
--log-fd=4 \
--input-fd=4 \
"$CGIT_VALGRIND/../../cgit" "$@"