t7063: hide stderr from setup inside prereq
When t7063 starts, it runs "update-index --untracked-cache" to see if we support the untracked cache. Its output goes straight to stderr, even if the test is not run with "-v". Let's wrap it in a prereq that will hide the output by default, but show it with "-v". Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
May 27, 2015 at 05:34 UTC
fa73a582b5e7e01184171dc310c7ee0bd9bb2721
1 file changed
+6
-2
t/t7063-status-untracked-cache.sh
+6
-2
@@ -8,10 +8,14 @@ avoid_racy() {
8
sleep 1
9
}
10
11
-git update-index --untracked-cache
11
# It's fine if git update-index returns an error code other than one,
12
# it'll be caught in the first test.
14
-if test $? -eq 1; then
13
+test_lazy_prereq UNTRACKED_CACHE '
14
+ { git update-index --untracked-cache; ret=$?; } &&
15
+ test $ret -ne 1
16
+'
17
+
18
+if ! test_have_prereq UNTRACKED_CACHE; then
19
skip_all='This system does not support untracked cache'
20
test_done
21
fi