mirror of
https://github.com/git/git.git
synced 2026-01-19 15:09:01 +00:00
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 <johannes.schindelin@gmx.de>
This commit is contained in:
committed by
Jameson Miller
parent
b7849b9f12
commit
01dabaa9af
4
Makefile
4
Makefile
@@ -2567,6 +2567,7 @@ GIT-BUILD-OPTIONS: FORCE
|
||||
@echo NO_UNIX_SOCKETS=\''$(subst ','\'',$(subst ','\'',$(NO_UNIX_SOCKETS)))'\' >>$@+
|
||||
@echo PAGER_ENV=\''$(subst ','\'',$(subst ','\'',$(PAGER_ENV)))'\' >>$@+
|
||||
@echo DC_SHA1=\''$(subst ','\'',$(subst ','\'',$(DC_SHA1)))'\' >>$@+
|
||||
@echo X=\'$(X)\' >>$@+
|
||||
ifdef TEST_OUTPUT_DIRECTORY
|
||||
@echo TEST_OUTPUT_DIRECTORY=\''$(subst ','\'',$(subst ','\'',$(TEST_OUTPUT_DIRECTORY)))'\' >>$@+
|
||||
endif
|
||||
@@ -2601,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
|
||||
|
||||
|
||||
@@ -898,7 +898,7 @@ test_create_repo () {
|
||||
mkdir -p "$repo"
|
||||
(
|
||||
cd "$repo" || error "Cannot setup test environment"
|
||||
"$GIT_EXEC_PATH/git-init" "--template=$GIT_BUILD_DIR/templates/blt/" >&3 2>&4 ||
|
||||
"$GIT_EXEC_PATH/git$X" init "--template=$GIT_BUILD_DIR/templates/blt/" >&3 2>&4 ||
|
||||
error "cannot run git init -- have you built things yet?"
|
||||
mv .git/hooks .git/hooks-disabled
|
||||
) || exit
|
||||
|
||||
@@ -49,18 +49,26 @@ export ASAN_OPTIONS
|
||||
: ${LSAN_OPTIONS=abort_on_error=1}
|
||||
export LSAN_OPTIONS
|
||||
|
||||
if test ! -f "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS
|
||||
then
|
||||
echo >&2 'error: GIT-BUILD-OPTIONS missing (has Git been built?).'
|
||||
exit 1
|
||||
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...
|
||||
"$GIT_BUILD_DIR/git" >/dev/null
|
||||
"$GIT_BUILD_DIR/git$X" >/dev/null
|
||||
if test $? != 1
|
||||
then
|
||||
echo >&2 'error: you do not seem to have built git yet.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
. "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS
|
||||
export PERL_PATH SHELL_PATH
|
||||
|
||||
# if --tee was passed, write the output not only to the terminal, but
|
||||
# additionally to the file test-results/$BASENAME.out, too.
|
||||
case "$GIT_TEST_TEE_STARTED, $* " in
|
||||
|
||||
Reference in New Issue
Block a user