id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,branch,changelog,apichanges,internalchanges 12304,tracopt.versioncontrol.git.tests failures on Windows,Christian Boos,Christian Boos,"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.",defect,closed,normal,1.0.10,general,1.0dev,minor,fixed,git windows appveyor,,,Fixed test failure from `tracopt.versioncontrol.git` on Windows.,,