diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-11-28 20:08:17 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-11-28 20:08:19 +0100 |
commit | 2f89547fc95c01621ff8d0b1ea9c0b4097df3120 (patch) | |
tree | 788bb0db7c7fde37b94b773fc5dc647419766d9e /configure.ac | |
parent | dc730a31730ed580633e4218edfdc186d1865f2c (diff) |
tests: Fix selection of python version
According to documentation (and personal experience), AM_PATH_PYTHON
selects the highest version of python, no matter if major version is
different, which means if both python2 and 3 are available, 3 will be
chosen an PYTHON will point to "/.../python" which is python3. Apparently,
the macro cannot be easily used to pick highest python2 version.
As {vty,ctrl}_test_runner.py require python2 and are incompatible with
python3, let's instead rely on the system having a "python2" binary
available, which is the case in most distros.
Change-Id: If8e57924ed2c8da7ab7692f58a4bb5c5a970484f
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 9a6f96366..a1dbce549 100644 --- a/configure.ac +++ b/configure.ac @@ -170,7 +170,10 @@ AC_ARG_ENABLE([external_tests], [Include the VTY/CTRL tests in make check [default=no]]), [enable_ext_tests="$enableval"],[enable_ext_tests="no"]) if test "x$enable_ext_tests" = "xyes" ; then - AM_PATH_PYTHON + AC_CHECK_PROG(PYTHON2_AVAIL,python2,yes) + if test "x$PYTHON2_AVAIL" != "xyes" ; then + AC_MSG_ERROR([Please install python2 to run the VTY/CTRL tests.]) + fi AC_CHECK_PROG(OSMOTESTEXT_CHECK,osmotestvty.py,yes) if test "x$OSMOTESTEXT_CHECK" != "xyes" ; then AC_MSG_ERROR([Please install git://osmocom.org/python/osmo-python-tests to run the VTY/CTRL tests.]) |