@@ -4,10 +4,11 @@ test_description='credential-cache tests'
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-credential.sh
-test -z "$NO_UNIX_SOCKETS" || {
+if ! test_have_prereq UNIX_SOCKETS
+then
skip_all='skipping credential-cache tests, unix sockets not available'
test_done
-}
+fi
# don't leave a stale daemon running
test_atexit 'git credential-cache exit'
@@ -1533,6 +1533,7 @@ test -z "$NO_PYTHON" && test_set_prereq PYTHON
test -n "$USE_LIBPCRE2" && test_set_prereq PCRE
test -n "$USE_LIBPCRE2" && test_set_prereq LIBPCRE2
test -z "$NO_GETTEXT" && test_set_prereq GETTEXT
+test -z "$NO_UNIX_SOCKETS" && test_set_prereq UNIX_SOCKETS
if test -z "$GIT_TEST_CHECK_CACHE_TREE"
then
Instead of checking $NO_UNIX_SOCKETS directly in t/t0301-credential-cache.sh, follow the more common pattern of creating a test prerequisite in test-lib.sh. See 6320358e31d (Makefile: unix sockets may not available on some platforms, 2011-12-12) for the original implementation of NO_UNIX_SOCKETS. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- t/t0301-credential-cache.sh | 5 +++-- t/test-lib.sh | 1 + 2 files changed, 4 insertions(+), 2 deletions(-)