Skip to content
Snippets Groups Projects
Commit 7905b7bc4b21 authored by Matt Harbison's avatar Matt Harbison
Browse files

windows: really stop using legacy stdio during test runs

I realized that the test runner also sets this, because a lot of the test
modules also do stdio in bytes, so setting this in the runner fixed a lot of
failures.  We'll have to port whatever fix is made to hg itself to all of the
needed places in the test modules (and we can make this smarter by only
conditionally clearing it if a couple of test variables are also set), but for
now, keep it simple.
parent c3edf68bea75
No related branches found
No related tags found
1 merge request!1193windows: effect of PYTHONLEGACYWINDOWSSTDIO when not defined
......@@ -4,6 +4,9 @@
setlocal
set HG=%~f0
# Clear the variable that's set by the test runner for now.
set PYTHONLEGACYWINDOWSSTDIO=
rem Use a full path to Python (relative to this script) if it exists,
rem as the standard Python install does not put python.exe on the PATH...
rem Otherwise, expect that python.exe can be found on the PATH.
......
......@@ -47,6 +47,8 @@
void(__cdecl * Py_SetPythonHome)(TCHAR * home);
int(__cdecl * Py_Main)(int argc, TCHAR *argv[]);
/* Clear the variable that's set by the test runner */
_wputenv(L"PYTHONLEGACYWINDOWSSTDIO=");
if (GetModuleFileName(NULL, pyscript, _countof(pyscript)) == 0) {
err = "GetModuleFileName failed";
goto bail;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment