Facilitate debugging Git executables in tests with gdb

When prefixing a Git call in the test suite with 'TEST_GDB_GIT=1 ', it
will now be run with GDB, allowing the developer to debug test failures
more conveniently.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2015-02-24 19:20:13 +00:00
parent 8cd6e790d5
commit 5d73b74757

View File

@@ -19,4 +19,11 @@ GIT_TEXTDOMAINDIR='@@BUILD_DIR@@/po/build/locale'
PATH='@@BUILD_DIR@@/bin-wrappers:'"$PATH"
export GIT_EXEC_PATH GITPERLLIB PATH GIT_TEXTDOMAINDIR
if test -n "$TEST_GDB_GIT"
then
exec gdb -args "${GIT_EXEC_PATH}/@@PROG@@" "$@"
echo "Could not run gdb -args ${GIT_EXEC_PATH}/@@PROG@@ $*" >&2
exit 1
fi
exec "${GIT_EXEC_PATH}/@@PROG@@" "$@"