diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-11-24 12:00:35 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-11-24 12:55:15 +0100 |
commit | 7e78681f0f740bd68ed5255b506a1efa08a231b1 (patch) | |
tree | 83cfe47ed79faa6e06765fb7dbf6a37b4555a706 /tests | |
parent | 434187533bd1357ea8f834b10016499aa423082a (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: Id22e157d1bee453babdfa7ed04c506390b0f17bb
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | tests/ctrl_test_runner.py | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | tests/vty_test_runner.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 474f82167..7b4656b24 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -47,8 +47,8 @@ if ENABLE_EXT_TESTS python-tests: $(BUILT_SOURCES) osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v - $(PYTHON) $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v - $(PYTHON) $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v + $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v + $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v rm -f $(top_builddir)/sms.db $(top_builddir)/gsn_restart $(top_builddir)/gtphub_restart_count else python-tests: $(BUILT_SOURCES) diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py index 2e59e13d2..ccc6758a4 100644..100755 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # (C) 2013 by Jacob Erlbeck <jerlbeck@sysmocom.de> # (C) 2014 by Holger Hans Peter Freyther diff --git a/tests/vty_test_runner.py b/tests/vty_test_runner.py index 3ecfd3987..8aa3ddabe 100644..100755 --- a/tests/vty_test_runner.py +++ b/tests/vty_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # (C) 2013 by Katerina Barone-Adesi <kat.obsc@gmail.com> # (C) 2013 by Holger Hans Peter Freyther |