On Mon, Dec 12, 2011 at 10:12:56PM +0100, Johannes Sixt wrote: > Introduce a configuration option NO_UNIX_SOCKETS to exclude code that > depends on Unix sockets and use it in MSVC and MinGW builds. Makes sense, thanks. > Notice that unix-socket.h was missing from LIB_H before; fix that, too. Oops, thanks. > All or most of the tests introduced by the series fail on Windows. > What is the preferred way to exclude them? Mark the all with a > prerequisite? Or exit early at the beginning of the test file? The cache daemon is the only thing that uses sockets. I would suggest just exiting early from its script (patch below). The rest of the tests should pass under Windows. If they don't, then they should be fixed (I'm happy to work on that, with the limitation that I don't actually have a Windows box, and if at all possible I'd like to keep it that way). In theory we should also disable the documentation for credential-cache. But that means surgery not only to Documentation/Makefile, but figuring out how to pass the flags down to the actual asciidoc process (since gitcredentials(7) mentions it in the text). Certainly possible, but I don't know if it's worth the effort or not. --- diff --git a/Makefile b/Makefile index e3ee884..6e7e190 100644 --- a/Makefile +++ b/Makefile @@ -2220,6 +2220,7 @@ ifdef GIT_TEST_CMP_USE_COPIED_CONTEXT @echo GIT_TEST_CMP_USE_COPIED_CONTEXT=YesPlease >>$@ endif @echo GETTEXT_POISON=\''$(subst ','\'',$(subst ','\'',$(GETTEXT_POISON)))'\' >>$@ + @echo NO_UNIX_SOCKETS=\''$(subst ','\'',$(subst ','\'',$(NO_UNIX_SOCKETS)))'\' >>$@ ### Detect Tck/Tk interpreter path changes ifndef NO_TCLTK diff --git a/t/t0301-credential-cache.sh b/t/t0301-credential-cache.sh index 3a65f99..82c8411 100755 --- a/t/t0301-credential-cache.sh +++ b/t/t0301-credential-cache.sh @@ -4,6 +4,11 @@ test_description='credential-cache tests' . ./test-lib.sh . "$TEST_DIRECTORY"/lib-credential.sh +test -z "$NO_UNIX_SOCKETS" || { + skip_all='skipping credential-cache tests, unix sockets not available' + test_done +} + # don't leave a stale daemon running trap 'code=$?; git credential-cache exit; (exit $code); die' EXIT -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html