2 HAVE_OPENSSL='@HAVE_OPENSSL@'
3 HAVE_PYTHON='@HAVE_PYTHON@'
4 HAVE_PYTHON3='@HAVE_PYTHON3@'
8 if test x"$PYTHON" = x; then
12 if test x"$PYTHON3" = x; then
16 PYTHONPATH=$abs_top_srcdir/python:$abs_top_builddir/tests:$PYTHONPATH
19 PYTHONIOENCODING=utf_8
20 export PYTHONIOENCODING
22 # PYTHONDONTWRITEBYTECODE=yes keeps Python from creating .pyc and .pyo
23 # files. Creating .py[co] works OK for any given version of Open
24 # vSwitch, but it causes trouble if you switch from a version with
25 # foo/__init__.py into an (older) version with plain foo.py, since
26 # foo/__init__.pyc will cause Python to ignore foo.py.
27 PYTHONDONTWRITEBYTECODE=yes
28 export PYTHONDONTWRITEBYTECODE
30 # Test whether the current working directory name is all ASCII
31 # characters. Some Python code doesn't tolerate non-ASCII characters
32 # in filenames very well, so if the current working directory is
33 # non-ASCII then we skip the tests that run those programs.
35 # This would be just papering over a real problem, except that the
36 # tests that we skip are launched from initscripts and thus normally
37 # run in system directories with ASCII names. (This problem only came
38 # up at all because the Debian autobuilders do build in a top-level
39 # directory named /«BUILDDIR».)
40 case `pwd | tr -d ' -~'` in
41 '') non_ascii_cwd=false ;;
45 # Enable malloc debugging features.
48 MALLOC_PERTURB_=165; export MALLOC_PERTURB_
50 # Before glibc 2.11, the feature enabled by MALLOC_CHECK_ was not
51 # thread-safe. See https://bugzilla.redhat.com/show_bug.cgi?id=585674 and
52 # in particular the patch attached there, which was applied to glibc CVS as
53 # "Restore locking in free_check." between 1.11 and 1.11.1.
54 vswitchd=$abs_top_builddir/vswitchd/ovs-vswitchd
55 glibc=`ldd $vswitchd | sed -n 's/^ libc\.[^ ]* => \([^ ]*\) .*/\1/p'`
56 glibc_version=`$glibc | sed -n '1s/.*version \([0-9]\{1,\}\.[0-9]\{1,\}\).*/\1/p'`
57 case $glibc_version in
58 2.[0-9] | 2.1[01]) mcheck=disabled ;;
61 if test $mcheck = enabled; then
62 MALLOC_CHECK_=2; export MALLOC_CHECK_
64 echo >&2 "glibc $glibc_version detected, disabling memory checking"
73 MALLOC_CONF=abort:true,junk:true,redzone:true
79 # The name of loopback interface
85 LOOPBACK_INTERFACE=lo0
105 # Check whether to run IPv6 tests.
106 if perl -e 'use Socket; socket(FH, PF_INET6, SOCK_STREAM, 0) || exit 1;'; then
112 # XXX: Disable Python related tests on Windows because Open vSwitch code
113 # written in Python has not been ported to the Windows platform. We will
114 # need to remove the next block after porting is complete.
115 if test "$IS_WIN32" = "yes"; then
120 if test "$HAVE_PYTHON" = "yes" \
121 && test "x`$PYTHON $abs_top_srcdir/tests/test-l7.py --help | grep 'ftp'`" != x; then
127 # Determine correct netcat option to quit on stdin EOF
128 if nc --version 2>&1 | grep -q nmap.org; then
129 NC_EOF_OPT="--send-only"