#12304 closed defect (fixed)
tracopt.versioncontrol.git.tests failures on Windows
| Reported by: | Christian Boos | Owned by: | Christian Boos |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.0.10 |
| Component: | general | Version: | 1.0dev |
| Severity: | minor | Keywords: | git windows appveyor |
| Cc: | Branch: | ||
| Release Notes: |
Fixed test failure from |
||
| API Changes: | |||
| Internal Changes: | |||
Description
On AppVeyor, I got a bunch of Git related failures, all looking like these two:
======================================================================
ERROR: test_git_version (tracopt.versioncontrol.git.tests.PyGIT.GitTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\projects\trac\tracopt\versioncontrol\git\tests\PyGIT.py", line 46, in test_git_version
v = Storage.git_version()
File "C:\projects\trac\tracopt\versioncontrol\git\PyGIT.py", line 339, in git_version
% (git_bin, repr(e)))
GitError: Could not retrieve GIT version (tried to execute/parse 'git --version' but got WindowsError(6, 'The handle is invalid'))
======================================================================
ERROR: test_control_files_detection (tracopt.versioncontrol.git.tests.PyGIT.NormalTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\projects\trac\tracopt\versioncontrol\git\tests\PyGIT.py", line 163, in setUp
self._git('init')
File "C:\projects\trac\tracopt\versioncontrol\git\tests\git_fs.py", line 61, in _git
proc = self._spawn_git(*args, **kwargs)
File "C:\projects\trac\tracopt\versioncontrol\git\tests\git_fs.py", line 58, in _spawn_git
return Popen(args, close_fds=close_fds, **kwargs)
File "C:\Miniconda\lib\subprocess.py", line 702, in __init__
errread, errwrite), to_close = self._get_handles(stdin, stdout, stderr)
File "C:\Miniconda\lib\subprocess.py", line 823, in _get_handles
p2cread = _subprocess.GetStdHandle(_subprocess.STD_INPUT_HANDLE)
WindowsError: [Error 6] The handle is invalid
Thanks to #10552, I could see that they're probably due to the fact that in this test environment, the process doesn't have access to a proper console as its standard input.
So far I have not found a way to reproduce the issue on my system. If I close stdin (( exec 0<&- ; make test=tracopt/versioncontrol/git/tests/PyGIT.py )) the tests pass.
Based on the suggestions found in #10552, I'll commit a tentative fix to see if it works on that system.
Attachments (0)
Change History (6)
follow-up: 2 comment:1 by , 10 years ago
comment:2 by , 10 years ago
Replying to jomae:
#12292 is the same issue?
Looks very similar yes, this time with stderr.
The line return self.__pipe('cat-file', '--batch', stdin=PIPE, stdout=PIPE) indeed leaves stderr unspecified, i.e. it will be the "real" stderr, which might be invalid for some reason.
The tentative fix [14418] worked but was not complete, as it missed two tests involving __pipe.
comment:3 by , 10 years ago
With [14419] all git related issues are gone, on AppVeyor build 1.0-stable.31.
comment:4 by , 10 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
comment:5 by , 10 years ago
| Keywords: | appveyor added |
|---|
comment:6 by , 10 years ago
| Release Notes: | modified (diff) |
|---|



#12292 is the same issue?