From 25a5abbe3c189fe97bf017a86633e5ba7778a178 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 3 Nov 2016 09:40:12 -0700 Subject: [PATCH] msvc: fix `make test` without having to play PATH games When building with Microsoft Visual C, we use NuGet to acquire the dependencies (such as OpenSSL, cURL, etc). We even unpack those dependencies. This patch teaches the test suite to add the directory with the unpacked .dll files to the PATH before running the tests. Signed-off-by: Johannes Schindelin --- Makefile | 3 +++ t/test-lib.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 57ab7726dd..950d550898 100644 --- a/Makefile +++ b/Makefile @@ -2602,6 +2602,9 @@ ifdef GIT_INTEROP_MAKE_OPTS endif ifdef TEST_GIT_INDEX_VERSION @echo TEST_GIT_INDEX_VERSION=\''$(subst ','\'',$(subst ','\'',$(TEST_GIT_INDEX_VERSION)))'\' >>$@+ +endif +ifdef MSVC_DEPS + @echo MSVC_DEPS=\''$(subst ','\'',$(subst ','\'',$(MSVC_DEPS)))'\' >>$@+ endif @if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi diff --git a/t/test-lib.sh b/t/test-lib.sh index 9b46325c31..1a09d8e903 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -57,6 +57,9 @@ fi . "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS export PERL_PATH SHELL_PATH +test -z "$MSVC_DEPS" || +PATH="$GIT_BUILD_DIR/$MSVC_DEPS/bin:$PATH" + ################################################################ # It appears that people try to run tests without building... test -n "$GIT_TEST_INSTALLED" || "$GIT_BUILD_DIR/git$X" >/dev/null ||