This patch exports PYTHONCOERCECLOCALE=0 when you have Python3 tests enabled. This is needed since testsuite forces LC_ALL=C and Python 3, with PEP 538, prints the following warning on stderr:
"Python runtime initialized with LC_CTYPE=C (a locale with default ASCII encoding), which may cause Unicode compatibility problems. Using C.UTF-8, C.utf8, or UTF-8 (if available) as alternative Unicode-compatible locales is recommended." AT_CHECK reports it as an error since stderr is not empty as it should be. This patch is needed, at least, on Fedora 26 and Rawhide (backported PEP 538 on Python 3.6). This will also be needed on any distribution with Python 3.7 (PEP 538). Signed-off-by: Timothy Redaelli <[email protected]> --- tests/atlocal.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/atlocal.in b/tests/atlocal.in index 67ebf0dd9..6a339f8fc 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -11,6 +11,11 @@ fi if test x"$PYTHON3" = x; then PYTHON3='@PYTHON3@' + + # PYTHONCOERCECLOCALE=0 disables the Unicode compatibility warning on + # stderr that breaks almost any Python3 test (PEP 0538) + PYTHONCOERCECLOCALE=0 + export PYTHONCOERCECLOCALE fi PYTHONPATH=$abs_top_srcdir/python:$abs_top_builddir/tests:$PYTHONPATH -- 2.13.0 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
