Skip to content

Commit dab05a0

Browse files
committed
Merge branch 'fix-CTest-failures'
This topic branch fixes a couple of problems when running Git for Windows' tests via CTest (e.g. inside Visual Studio). Signed-off-by: Johannes Schindelin <[email protected]>
2 parents 79972f5 + 4d24a43 commit dab05a0

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

add-patch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,7 @@ static int patch_update_file(struct add_p_state *s,
15471547
strbuf_remove(&s->answer, 0, 1);
15481548
strbuf_trim(&s->answer);
15491549
i = hunk_index - DISPLAY_HUNKS_LINES / 2;
1550-
if (i < file_diff->mode_change)
1550+
if (i < (int)file_diff->mode_change)
15511551
i = file_diff->mode_change;
15521552
while (s->answer.len == 0) {
15531553
i = display_hunks(s, file_diff, i);

contrib/buildsystems/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,8 @@ if(NOT ${CMAKE_BINARY_DIR}/CMakeCache.txt STREQUAL ${CACHE_PATH})
11131113
#misc copies
11141114
file(COPY ${CMAKE_SOURCE_DIR}/t/chainlint.sed DESTINATION ${CMAKE_BINARY_DIR}/t/)
11151115
file(COPY ${CMAKE_SOURCE_DIR}/po/is.po DESTINATION ${CMAKE_BINARY_DIR}/po/)
1116-
file(COPY ${CMAKE_SOURCE_DIR}/mergetools/tkdiff DESTINATION ${CMAKE_BINARY_DIR}/mergetools/)
1116+
file(GLOB mergetools "${CMAKE_SOURCE_DIR}/mergetools/*")
1117+
file(COPY ${mergetools} DESTINATION ${CMAKE_BINARY_DIR}/mergetools/)
11171118
file(COPY ${CMAKE_SOURCE_DIR}/contrib/completion/git-prompt.sh DESTINATION ${CMAKE_BINARY_DIR}/contrib/completion/)
11181119
file(COPY ${CMAKE_SOURCE_DIR}/contrib/completion/git-completion.bash DESTINATION ${CMAKE_BINARY_DIR}/contrib/completion/)
11191120
endif()
@@ -1123,7 +1124,7 @@ file(GLOB test_scipts "${CMAKE_SOURCE_DIR}/t/t[0-9]*.sh")
11231124
#test
11241125
foreach(tsh ${test_scipts})
11251126
add_test(NAME ${tsh}
1126-
COMMAND ${SH_EXE} ${tsh}
1127+
COMMAND ${SH_EXE} ${tsh} --no-bin-wrappers --no-chain-lint -vx
11271128
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/t)
11281129
endforeach()
11291130

t/test-lib-functions.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,10 @@ test_commit_bulk () {
492492
# of a file in the working directory and add it to the index.
493493

494494
test_chmod () {
495-
chmod "$@" &&
495+
if test_have_prereq !MINGW
496+
then
497+
chmod "$@"
498+
fi &&
496499
git update-index --add "--chmod=$@"
497500
}
498501

@@ -548,7 +551,10 @@ write_script () {
548551
echo "#!${2-"$SHELL_PATH"}" &&
549552
cat
550553
} >"$1" &&
551-
chmod +x "$1"
554+
if test_have_prereq !MINGW
555+
then
556+
chmod +x "$1"
557+
fi
552558
}
553559

554560
# Usage: test_hook [options] <hook-name> <<-\EOF

0 commit comments

Comments
 (0)