diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-03-24 13:07:38 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-24 13:07:38 -0700 |
commit | fa13fd174f463663ffbc1feef857089fddb4b157 (patch) | |
tree | 5913c134c218cf3935e1bcf85b8d2010cb89b307 /t | |
parent | 8b47c5de96fb50aad5b861b0a1f89a949a479f0f (diff) | |
parent | 59210dd56c25a06a3ec562a07571a96b438e7362 (diff) | |
download | git-fa13fd174f463663ffbc1feef857089fddb4b157.tar.gz git-fa13fd174f463663ffbc1feef857089fddb4b157.tar.xz |
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
Diffstat (limited to 't')
-rw-r--r-- | t/test-lib-functions.sh | 11 | ||||
-rw-r--r-- | t/test-lib.sh | 1 |
2 files changed, 4 insertions, 8 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index bd357704c..5ee124332 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -136,17 +136,12 @@ test_tick () { export GIT_COMMITTER_DATE GIT_AUTHOR_DATE } -# Stop execution and start a shell. This is useful for debugging tests and -# only makes sense together with "-v". +# Stop execution and start a shell. This is useful for debugging tests. # # Be sure to remove all invocations of this command before submitting. test_pause () { - if test "$verbose" = t; then - "$SHELL_PATH" <&6 >&3 2>&4 - else - error >&5 "test_pause requires --verbose" - fi + "$SHELL_PATH" <&6 >&5 2>&7 } # 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". debug () { - GIT_TEST_GDB=1 "$@" + GIT_TEST_GDB=1 "$@" <&6 >&5 2>&7 } # Call test_commit with the arguments diff --git a/t/test-lib.sh b/t/test-lib.sh index 86d77c16d..23c29bce6 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -342,6 +342,7 @@ fi exec 5>&1 exec 6<&0 +exec 7>&2 if test "$verbose_log" = "t" then exec 3>>"$GIT_TEST_TEE_OUTPUT_FILE" 4>&3 |