diff mbox series

[ovs-dev] python-windows: Fix unicode python tests on Windows

Message ID 20180327175831.7092-1-aserdean@ovn.org
State Rejected
Headers show
Series [ovs-dev] python-windows: Fix unicode python tests on Windows | expand

Commit Message

Alin-Gabriel Serdean March 27, 2018, 5:58 p.m. UTC
This patch enables default Windows encodings for the python3 buffers which
are already used un python2

Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
Co-authored-by: Alin Balutoiu <abalutoiu@cloudbasesolutions.com>
Signed-off-by: Alin Balutoiu <abalutoiu@cloudbasesolutions.com>
---
 tests/atlocal.in | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/tests/atlocal.in b/tests/atlocal.in
index 55f9333ee..0df504be7 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -106,6 +106,15 @@  FreeBSD|NetBSD)
     ;;
 esac
 
+if test x"$PYTHON3" != x && test "$IS_WIN32" = yes; then
+    # enables legacy windows unicode printing needed for Python3 compatibility
+    # with the Python2 tests
+    PYTHONLEGACYWINDOWSFSENCODING=true
+    export PYTHONLEGACYWINDOWSFSENCODING
+    PYTHONLEGACYWINDOWSSTDIO=true
+    export PYTHONLEGACYWINDOWSSTDIO
+fi
+
 # Check whether to run IPv6 tests.
 if $PYTHON -c '
 import socket