path: root/tests
diff options
authorPau Espin Pedrol <pespin@sysmocom.de>2017-11-28 20:08:17 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2017-11-28 20:08:19 +0100
commit2f89547fc95c01621ff8d0b1ea9c0b4097df3120 (patch)
tree788bb0db7c7fde37b94b773fc5dc647419766d9e /tests
parentdc730a31730ed580633e4218edfdc186d1865f2c (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 'tests')
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 10bb916..3cd8bff 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -56,8 +56,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
python-tests: $(BUILT_SOURCES)
diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py
index 7c64f48..e9d73ff 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 9b8c560..eeb151c 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