-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git tests in visual studio: 14 tests failed out of 966 #3966
Comments
Thank you for the report! To dig deeper, you can pass the options To avoid running the entire test suite again, edit https://github.com/git-for-windows/git/blob/v2.37.1.windows.1/contrib/buildsystems/CMakeLists.txt#L1121. |
You are welcome. |
This comes from https://github.com/git-for-windows/git/blob/v2.37.1.windows.1/t/t0060-path-utils.sh#L563-L581, and the reason this fails is that it cannot find a required case "$GIT_EXEC_PATH"/*.dll in
*'/*.dll) ;; # no `.dll` files to be copied
*)
cp "$GIT_EXEC_PATH"/*.dll pretend/mingw64/bin/ &&
cp "$GIT_EXEC_PATH"/*.dll pretend/mingw64/libexec/git-core/
;;
esac I am a bit puzzled, though, that the CI runs succeed because the Oh wait, it's probably this line that solves this puzzle: https://github.com/git-for-windows/git/blob/v2.37.1.windows.1/ci/lib.sh#L209 Could you edit the |
Not sure whether I've got it right, because if I run test with
|
@taras-janea I meant via CTest. You will need to edit the If you want to run the test scripts via the command line, you will need to run them in Git Bash. |
Yes, I ran it via Git Bash. |
Hrm. I now brushed off my Visual Studio instance, built Git for Windows from the current diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt
index 199410c4ac24..8fdfe942cbbf 100644
--- a/contrib/buildsystems/CMakeLists.txt
+++ b/contrib/buildsystems/CMakeLists.txt
@@ -1118,12 +1118,13 @@ if(NOT ${CMAKE_BINARY_DIR}/CMakeCache.txt STREQUAL ${CACHE_PATH})
file(COPY ${CMAKE_SOURCE_DIR}/contrib/completion/git-completion.bash DESTINATION ${CMAKE_BINARY_DIR}/contrib/completion/)
endif()
-file(GLOB test_scipts "${CMAKE_SOURCE_DIR}/t/t[0-9]*.sh")
+# file(GLOB test_scipts "${CMAKE_SOURCE_DIR}/t/t[0-9]*.sh")
+file(GLOB test_scipts "${CMAKE_SOURCE_DIR}/t/t0060*.sh")
#test
foreach(tsh ${test_scipts})
add_test(NAME ${tsh}
- COMMAND ${SH_EXE} ${tsh}
+ COMMAND ${SH_EXE} ${tsh} --no-bin-wrappers -ivx
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/t)
endforeach()
diff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh
index c88c205b96be..e889e7bc1b6f 100755
--- a/t/t0060-path-utils.sh
+++ b/t/t0060-path-utils.sh
@@ -565,6 +565,13 @@ test_expect_success MINGW 'MSYSTEM/PATH is adjusted if necessary' '
pretend/mingw64/libexec/git-core pretend/usr/bin &&
cp "$GIT_EXEC_PATH"/git.exe pretend/mingw64/bin/ &&
cp "$GIT_EXEC_PATH"/git.exe pretend/mingw64/libexec/git-core/ &&
+ case "$GIT_EXEC_PATH"/*.dll in
+ "*.dll") ;; # no `.dll` files to be copied
+ *)
+ cp "$GIT_EXEC_PATH"/*.dll pretend/mingw64/bin/ &&
+ cp "$GIT_EXEC_PATH"/*.dll pretend/mingw64/libexec/git-core/
+ ;;
+ esac &&
echo "env | grep MSYSTEM=" | write_script "$HOME"/bin/git-test-home &&
echo "echo mingw64" | write_script pretend/mingw64/bin/git-test-bin &&
echo "echo usr" | write_script pretend/usr/bin/git-test-bin2 &&
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index 29f38dabf0aa..3c88a121905a 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -548,7 +548,10 @@ write_script () {
echo "#!${2-"$SHELL_PATH"}" &&
cat
} >"$1" &&
- chmod +x "$1"
+ if test_have_prereq !MINGW
+ then
+ chmod +x "$1"
+ fi
}
# Usage: test_hook [options] <hook-name> <<-\EOF
diff --git a/t/test-lib.sh b/t/test-lib.sh
index fc93073ac938..1f95919d717b 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -50,7 +50,7 @@ then
# elsewhere
TEST_OUTPUT_DIRECTORY=$TEST_DIRECTORY
fi
-GIT_BUILD_DIR="${TEST_DIRECTORY%/t}"
+GIT_BUILD_DIR="$TEST_DIRECTORY/../contrib/buildsystems/out/build/x64-Debug"
if test "$TEST_DIRECTORY" = "$GIT_BUILD_DIR"
then
echo "PANIC: Running in a $TEST_DIRECTORY that doesn't end in '/t'?" >&2 |
I now also tried t1092 and while it admittedly took a long time, it did not time out but passed instead:
|
@taras-janea could you please verify that #3977 fixes the issues you reported? |
I confirm that t0060-path-utils.sh is passing now, I'll check the rest that were failing as well.
|
t1092 is still failing due to timeout (tried couple of times):
|
Is there a way to increase the timeout? I am afraid that the test script really takes that long, and there is little Git for Windows can do about it, it's an upstream Git problem. |
I've found two ways to set the timeout for the ctest:
The second one, for each test separately:
Now, interesting thing that test started passing after Windows reboot (that was triggered during sleep for updates I guess):
I'll test the rest of the failing tests. |
All tests have been passed except one that's failing with timeout, because it actually takes almost one hour to execute: Therefore, there are two ways: either to speed-up the test or increase the timeout for the test like by adding: |
The lots easier option is to increase the time-out (which I will do). Speeding up the test will most likely center on turning |
As suggested in git-for-windows#3966 (comment), t7112 can run for well over one hour, which seems to be the default maximum run time at least when running CTest-based tests in Visual Studio. Let's increase the time-out as a stop gap to unblock developers wishing to run Git's test suite in Visual Studio. Note: The actual run time is highly dependent on the circumstances. For example, in Git's CI runs, the Windows-based tests typically take a bit over 5 minutes to run. CI runs have the added benefit that Windows Defender (the common anti-malware scanner on Windows) is turned off, something many developers are not at liberty to do on their work stations. When Defender is turned on, even on this developer's high-end Ryzen system, t7112 takes over 15 minutes to run. Signed-off-by: Johannes Schindelin <[email protected]>
As suggested in git-for-windows#3966 (comment), t7112 can run for well over one hour, which seems to be the default maximum run time at least when running CTest-based tests in Visual Studio. Let's increase the time-out as a stop gap to unblock developers wishing to run Git's test suite in Visual Studio. Note: The actual run time is highly dependent on the circumstances. For example, in Git's CI runs, the Windows-based tests typically take a bit over 5 minutes to run. CI runs have the added benefit that Windows Defender (the common anti-malware scanner on Windows) is turned off, something many developers are not at liberty to do on their work stations. When Defender is turned on, even on this developer's high-end Ryzen system, t7112 takes over 15 minutes to run. Signed-off-by: Johannes Schindelin <[email protected]>
As suggested in git-for-windows#3966 (comment), t7112 can run for well over one hour, which seems to be the default maximum run time at least when running CTest-based tests in Visual Studio. Let's increase the time-out as a stop gap to unblock developers wishing to run Git's test suite in Visual Studio. Note: The actual run time is highly dependent on the circumstances. For example, in Git's CI runs, the Windows-based tests typically take a bit over 5 minutes to run. CI runs have the added benefit that Windows Defender (the common anti-malware scanner on Windows) is turned off, something many developers are not at liberty to do on their work stations. When Defender is turned on, even on this developer's high-end Ryzen system, t7112 takes over 15 minutes to run. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
As suggested in git-for-windows#3966 (comment), t7112 can run for well over one hour, which seems to be the default maximum run time at least when running CTest-based tests in Visual Studio. Let's increase the time-out as a stop gap to unblock developers wishing to run Git's test suite in Visual Studio. Note: The actual run time is highly dependent on the circumstances. For example, in Git's CI runs, the Windows-based tests typically take a bit over 5 minutes to run. CI runs have the added benefit that Windows Defender (the common anti-malware scanner on Windows) is turned off, something many developers are not at liberty to do on their work stations. When Defender is turned on, even on this developer's high-end Ryzen system, t7112 takes over 15 minutes to run. Signed-off-by: Johannes Schindelin <[email protected]>
As suggested in git-for-windows#3966 (comment), t7112 can run for well over one hour, which seems to be the default maximum run time at least when running CTest-based tests in Visual Studio. Let's increase the time-out as a stop gap to unblock developers wishing to run Git's test suite in Visual Studio. Note: The actual run time is highly dependent on the circumstances. For example, in Git's CI runs, the Windows-based tests typically take a bit over 5 minutes to run. CI runs have the added benefit that Windows Defender (the common anti-malware scanner on Windows) is turned off, something many developers are not at liberty to do on their work stations. When Defender is turned on, even on this developer's high-end Ryzen system, t7112 takes over 15 minutes to run. Signed-off-by: Johannes Schindelin <[email protected]>
As suggested in git-for-windows#3966 (comment), t7112 can run for well over one hour, which seems to be the default maximum run time at least when running CTest-based tests in Visual Studio. Let's increase the time-out as a stop gap to unblock developers wishing to run Git's test suite in Visual Studio. Note: The actual run time is highly dependent on the circumstances. For example, in Git's CI runs, the Windows-based tests typically take a bit over 5 minutes to run. CI runs have the added benefit that Windows Defender (the common anti-malware scanner on Windows) is turned off, something many developers are not at liberty to do on their work stations. When Defender is turned on, even on this developer's high-end Ryzen system, t7112 takes over 15 minutes to run. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
As suggested in git-for-windows#3966 (comment), t7112 can run for well over one hour, which seems to be the default maximum run time at least when running CTest-based tests in Visual Studio. Let's increase the time-out as a stop gap to unblock developers wishing to run Git's test suite in Visual Studio. Note: The actual run time is highly dependent on the circumstances. For example, in Git's CI runs, the Windows-based tests typically take a bit over 5 minutes to run. CI runs have the added benefit that Windows Defender (the common anti-malware scanner on Windows) is turned off, something many developers are not at liberty to do on their work stations. When Defender is turned on, even on this developer's high-end Ryzen system, t7112 takes over 15 minutes to run. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
As suggested in git-for-windows#3966 (comment), t7112 can run for well over one hour, which seems to be the default maximum run time at least when running CTest-based tests in Visual Studio. Let's increase the time-out as a stop gap to unblock developers wishing to run Git's test suite in Visual Studio. Note: The actual run time is highly dependent on the circumstances. For example, in Git's CI runs, the Windows-based tests typically take a bit over 5 minutes to run. CI runs have the added benefit that Windows Defender (the common anti-malware scanner on Windows) is turned off, something many developers are not at liberty to do on their work stations. When Defender is turned on, even on this developer's high-end Ryzen system, t7112 takes over 15 minutes to run. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
As suggested in git-for-windows#3966 (comment), t7112 can run for well over one hour, which seems to be the default maximum run time at least when running CTest-based tests in Visual Studio. Let's increase the time-out as a stop gap to unblock developers wishing to run Git's test suite in Visual Studio. Note: The actual run time is highly dependent on the circumstances. For example, in Git's CI runs, the Windows-based tests typically take a bit over 5 minutes to run. CI runs have the added benefit that Windows Defender (the common anti-malware scanner on Windows) is turned off, something many developers are not at liberty to do on their work stations. When Defender is turned on, even on this developer's high-end Ryzen system, t7112 takes over 15 minutes to run. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
As suggested in git-for-windows#3966 (comment), t7112 can run for well over one hour, which seems to be the default maximum run time at least when running CTest-based tests in Visual Studio. Let's increase the time-out as a stop gap to unblock developers wishing to run Git's test suite in Visual Studio. Note: The actual run time is highly dependent on the circumstances. For example, in Git's CI runs, the Windows-based tests typically take a bit over 5 minutes to run. CI runs have the added benefit that Windows Defender (the common anti-malware scanner on Windows) is turned off, something many developers are not at liberty to do on their work stations. When Defender is turned on, even on this developer's high-end Ryzen system, t7112 takes over 15 minutes to run. Signed-off-by: Johannes Schindelin <[email protected]>
As suggested in git-for-windows#3966 (comment), t7112 can run for well over one hour, which seems to be the default maximum run time at least when running CTest-based tests in Visual Studio. Let's increase the time-out as a stop gap to unblock developers wishing to run Git's test suite in Visual Studio. Note: The actual run time is highly dependent on the circumstances. For example, in Git's CI runs, the Windows-based tests typically take a bit over 5 minutes to run. CI runs have the added benefit that Windows Defender (the common anti-malware scanner on Windows) is turned off, something many developers are not at liberty to do on their work stations. When Defender is turned on, even on this developer's high-end Ryzen system, t7112 takes over 15 minutes to run. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
When building Git via Visual Studio and then running the tests via CTest (which is made very easy by Visual Studio), there are test failures. This PR intends to address those. This closes #3966
When building Git via Visual Studio and then running the tests via CTest (which is made very easy by Visual Studio), there are test failures. This PR intends to address those. This closes #3966
When building Git via Visual Studio and then running the tests via CTest (which is made very easy by Visual Studio), there are test failures. This PR intends to address those. This closes #3966
When building Git via Visual Studio and then running the tests via CTest (which is made very easy by Visual Studio), there are test failures. This PR intends to address those. This closes #3966
When building Git via Visual Studio and then running the tests via CTest (which is made very easy by Visual Studio), there are test failures. This PR intends to address those. This closes #3966
When building Git via Visual Studio and then running the tests via CTest (which is made very easy by Visual Studio), there are test failures. This PR intends to address those. This closes #3966
When building Git via Visual Studio and then running the tests via CTest (which is made very easy by Visual Studio), there are test failures. This PR intends to address those. This closes #3966
When building Git via Visual Studio and then running the tests via CTest (which is made very easy by Visual Studio), there are test failures. This PR intends to address those. This closes #3966
When building Git via Visual Studio and then running the tests via CTest (which is made very easy by Visual Studio), there are test failures. This PR intends to address those. This closes #3966
When building Git via Visual Studio and then running the tests via CTest (which is made very easy by Visual Studio), there are test failures. This PR intends to address those. This closes #3966
When building Git via Visual Studio and then running the tests via CTest (which is made very easy by Visual Studio), there are test failures. This PR intends to address those. This closes #3966
When building Git via Visual Studio and then running the tests via CTest (which is made very easy by Visual Studio), there are test failures. This PR intends to address those. This closes #3966
When building Git via Visual Studio and then running the tests via CTest (which is made very easy by Visual Studio), there are test failures. This PR intends to address those. This closes #3966
When building Git via Visual Studio and then running the tests via CTest (which is made very easy by Visual Studio), there are test failures. This PR intends to address those. This closes #3966
When building Git via Visual Studio and then running the tests via CTest (which is made very easy by Visual Studio), there are test failures. This PR intends to address those. This closes #3966
Setup
64-bit
$ git --version --build-options
git version 2.37.1.windows.1
cpu: x86_64
built from commit: 323a697
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
defaults?
to the issue you're seeing?
Visual studio information:
Details
Minimal, Complete, and Verifiable example
this will help us understand the issue.
URL to that repository to help us with testing?
not relevant
The text was updated successfully, but these errors were encountered: