aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2016-02-24 02:48:36 -0500
committerJunio C Hamano <gitster@pobox.com>2016-02-25 13:51:47 -0800
commit43f3afc6bc6b79715ea46aaf341683cbba6ee965 (patch)
tree38ed78537c001e7d16b322fa80640043a428175b /t
parentf3ed0b372d990eade2e4727f17d9ee40003badb1 (diff)
downloadgit-43f3afc6bc6b79715ea46aaf341683cbba6ee965.tar.gz
git-43f3afc6bc6b79715ea46aaf341683cbba6ee965.tar.xz
t5504: handle expected output from SIGPIPE death
Commit 8bf4bec (add "ok=sigpipe" to test_must_fail and use it to fix flaky tests, 2015-11-27) taught t5504 to handle "git push" racily exiting with SIGPIPE rather than failing. However, one of the tests checks the output of the command, as well. In the SIGPIPE case, we will not have produced any output. If we want the test to be truly non-flaky, we have to accept either output. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t5504-fetch-receive-strict.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/t/t5504-fetch-receive-strict.sh b/t/t5504-fetch-receive-strict.sh
index 89224edcc..a3e12d295 100755
--- a/t/t5504-fetch-receive-strict.sh
+++ b/t/t5504-fetch-receive-strict.sh
@@ -101,7 +101,10 @@ test_expect_success 'push with receive.fsckobjects' '
git config transfer.fsckobjects false
) &&
test_must_fail ok=sigpipe git push --porcelain dst master:refs/heads/test >act &&
- test_cmp exp act
+ {
+ test_cmp exp act ||
+ ! test -s act
+ }
'
test_expect_success 'push with transfer.fsckobjects' '