summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2014-01-30 16:42:32 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-01-31 17:07:17 (GMT)
commit52c02f658ec07dc32fb43524c9b32b1ea0954f27 (patch)
treecd79c35b4cc54eab3b043a41b3b1f84c3b606308
parente54c1f2d2533c5406abeb8e3e0cf78c68ca9c21e (diff)
downloadgit-52c02f658ec07dc32fb43524c9b32b1ea0954f27.zip
git-52c02f658ec07dc32fb43524c9b32b1ea0954f27.tar.gz
git-52c02f658ec07dc32fb43524c9b32b1ea0954f27.tar.bz2
pager test: make fake pager consume all its input
Otherwise there is a race: if 'git log' finishes writing before the pager terminates and closes the pipe, all is well, and if the pager finishes quickly enough then 'git log' terminates with SIGPIPE. died of signal 13 at /build/buildd/git-1.9~rc1/t/test-terminal.perl line 33. not ok 6 - LESS and LV envvars are set for pagination Noticed on Ubuntu PPA builders, where the race was lost about half the time. Compare v1.7.0.2~6^2 (tests: Fix race condition in t7006-pager, 2010-02-22). Reported-by: Anders Kaseorg <andersk@MIT.EDU> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t7006-pager.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh
index 7fe3367..b9365b4 100755
--- a/t/t7006-pager.sh
+++ b/t/t7006-pager.sh
@@ -40,7 +40,7 @@ test_expect_failure TTY 'pager runs from subdir' '
test_expect_success TTY 'LESS and LV envvars are set for pagination' '
(
sane_unset LESS LV &&
- PAGER="env >pager-env.out" &&
+ PAGER="env >pager-env.out; wc" &&
export PAGER &&
test_terminal git log