Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2018-02-24 02:39:45 +0300
committerJunio C Hamano <gitster@pobox.com>2018-02-28 23:57:51 +0300
commitfa06eb6fa906f0b6e44046fe7b077d71ebb4d6e4 (patch)
tree4361a0e67efe23ce898a5be5128ad608b6352946 /t/t5500-fetch-pack.sh
parent40dc533f5776aa0fe194176032f7eb38ee5f44b7 (diff)
t5500-fetch-pack: don't check the stderr of a subshell
Three "missing reference" tests in 't5500-fetch-pack.sh' fail when the test script is run with '-x' tracing (and using a shell other than a Bash version supporting BASH_XTRACEFD). The reason for those failures is that the tests check a subshell's stderr, which includes the trace of executing commands in that subshell as well, throwing off the comparison with the expected output. Save the stderr of 'git fetch-pack' only instead of the whole subshell, so it remains free from tracing output. After this change t5500 passes with '-x', even when running with /bin/sh. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5500-fetch-pack.sh')
-rwxr-xr-xt/t5500-fetch-pack.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index ec9ba9bf6e..0680dec808 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -482,24 +482,24 @@ test_expect_success 'set up tests of missing reference' '
test_expect_success 'test lonely missing ref' '
(
cd client &&
- test_must_fail git fetch-pack --no-progress .. refs/heads/xyzzy
- ) >/dev/null 2>error-m &&
+ test_must_fail git fetch-pack --no-progress .. refs/heads/xyzzy 2>../error-m
+ ) &&
test_i18ncmp expect-error error-m
'
test_expect_success 'test missing ref after existing' '
(
cd client &&
- test_must_fail git fetch-pack --no-progress .. refs/heads/A refs/heads/xyzzy
- ) >/dev/null 2>error-em &&
+ test_must_fail git fetch-pack --no-progress .. refs/heads/A refs/heads/xyzzy 2>../error-em
+ ) &&
test_i18ncmp expect-error error-em
'
test_expect_success 'test missing ref before existing' '
(
cd client &&
- test_must_fail git fetch-pack --no-progress .. refs/heads/xyzzy refs/heads/A
- ) >/dev/null 2>error-me &&
+ test_must_fail git fetch-pack --no-progress .. refs/heads/xyzzy refs/heads/A 2>../error-me
+ ) &&
test_i18ncmp expect-error error-me
'