mirror of
https://github.com/git/git.git
synced 2026-01-18 22:56:21 +00:00
Tests: optionally skip redirecting stdin/stdout/stderr
There is a really useful debugging technique developed by Sverre Rabbelier that inserts "bash &&" somewhere in the test scripts, letting the developer interact at given points with the current state. Another debugging technique, used a lot by this here coder, is to run certain executables via gdb by guarding a "gdb -args" call in bin-wrappers/git. Both techniques were disabled by 781f76b1(test-lib: redirect stdin of tests). Let's reinstate the ability to run an interactive shell by making the redirection optional: setting the TEST_NO_REDIRECT environment variable will skip the redirection. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
@@ -648,7 +648,12 @@ test_eval_ () {
|
||||
# be _inside_ the block to avoid polluting the "set -x" output
|
||||
#
|
||||
|
||||
test_eval_inner_ "$@" </dev/null >&3 2>&4
|
||||
if test -n "$TEST_NO_REDIRECT"
|
||||
then
|
||||
test_eval_inner_ "$@"
|
||||
else
|
||||
test_eval_inner_ "$@" </dev/null >&3 2>&4
|
||||
fi
|
||||
{
|
||||
test_eval_ret_=$?
|
||||
if want_trace
|
||||
|
||||
Reference in New Issue
Block a user