From patchwork Tue Mar 27 17:58:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alin-Gabriel Serdean X-Patchwork-Id: 891761 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 409f026nZbz9rx7 for ; Wed, 28 Mar 2018 04:58:58 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 04D3512CB; Tue, 27 Mar 2018 17:58:57 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 0A02C12CB for ; Tue, 27 Mar 2018 17:58:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 56769624 for ; Tue, 27 Mar 2018 17:58:55 +0000 (UTC) X-Originating-IP: 85.186.139.13 Received: from localhost.localdomain (unknown [85.186.139.13]) (Authenticated sender: aserdean@ovn.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 0792E6000A; Tue, 27 Mar 2018 19:58:52 +0200 (CEST) From: Alin Gabriel Serdean To: ovs-dev@openvswitch.org Date: Tue, 27 Mar 2018 20:58:31 +0300 Message-Id: <20180327175831.7092-1-aserdean@ovn.org> X-Mailer: git-send-email 2.16.1.windows.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Alin Gabriel Serdean Subject: [ovs-dev] [PATCH] python-windows: Fix unicode python tests on Windows X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org This patch enables default Windows encodings for the python3 buffers which are already used un python2 Signed-off-by: Alin Gabriel Serdean Co-authored-by: Alin Balutoiu Signed-off-by: Alin Balutoiu --- tests/atlocal.in | 9 +++++++++ 1 file changed, 9 insertions(+) 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