Merge branch 'sg/test-with-stdin'
Teach the "debug" helper used in the test framework that allows a command to run under "gdb" to make the session interactive. * sg/test-with-stdin: tests: make the 'test_pause' helper work in non-verbose mode tests: create an interactive gdb session with the 'debug' helper
This commit is contained in:
@ -136,17 +136,12 @@ test_tick () {
|
|||||||
export GIT_COMMITTER_DATE GIT_AUTHOR_DATE
|
export GIT_COMMITTER_DATE GIT_AUTHOR_DATE
|
||||||
}
|
}
|
||||||
|
|
||||||
# Stop execution and start a shell. This is useful for debugging tests and
|
# Stop execution and start a shell. This is useful for debugging tests.
|
||||||
# only makes sense together with "-v".
|
|
||||||
#
|
#
|
||||||
# Be sure to remove all invocations of this command before submitting.
|
# Be sure to remove all invocations of this command before submitting.
|
||||||
|
|
||||||
test_pause () {
|
test_pause () {
|
||||||
if test "$verbose" = t; then
|
"$SHELL_PATH" <&6 >&5 2>&7
|
||||||
"$SHELL_PATH" <&6 >&3 2>&4
|
|
||||||
else
|
|
||||||
error >&5 "test_pause requires --verbose"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Wrap git in gdb. Adding this to a command can make it easier to
|
# Wrap git in gdb. Adding this to a command can make it easier to
|
||||||
@ -154,7 +149,7 @@ test_pause () {
|
|||||||
#
|
#
|
||||||
# Example: "debug git checkout master".
|
# Example: "debug git checkout master".
|
||||||
debug () {
|
debug () {
|
||||||
GIT_TEST_GDB=1 "$@"
|
GIT_TEST_GDB=1 "$@" <&6 >&5 2>&7
|
||||||
}
|
}
|
||||||
|
|
||||||
# Call test_commit with the arguments
|
# Call test_commit with the arguments
|
||||||
|
@ -342,6 +342,7 @@ fi
|
|||||||
|
|
||||||
exec 5>&1
|
exec 5>&1
|
||||||
exec 6<&0
|
exec 6<&0
|
||||||
|
exec 7>&2
|
||||||
if test "$verbose_log" = "t"
|
if test "$verbose_log" = "t"
|
||||||
then
|
then
|
||||||
exec 3>>"$GIT_TEST_TEE_OUTPUT_FILE" 4>&3
|
exec 3>>"$GIT_TEST_TEE_OUTPUT_FILE" 4>&3
|
||||||
|
Reference in New Issue
Block a user