aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/ctrl_test_runner.py
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-05-03 11:36:13 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-05-03 12:15:38 +0200
commit22a569f2ae7defc4eae62f0b1b6d790e412d9dc7 (patch)
tree4bec7d108f31c16f9db9fac57b7aa58ac01b4a99 /openbsc/tests/ctrl_test_runner.py
parent133de7d87440e9a459abef0594a5d08006ff2ed6 (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. 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. cherry-picked from: osmo-bsc.git 7e78681f0f740bd68ed5255b506a1efa08a231b1. Change-Id: Icc147c8457116ad551d166313f3a79e1c2107a22
Diffstat (limited to 'openbsc/tests/ctrl_test_runner.py')
-rwxr-xr-x[-rw-r--r--]openbsc/tests/ctrl_test_runner.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/openbsc/tests/ctrl_test_runner.py b/openbsc/tests/ctrl_test_runner.py
index d76ed659e..ad0a16b2e 100644..100755
--- a/openbsc/tests/ctrl_test_runner.py
+++ b/openbsc/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
@@ -262,12 +262,12 @@ class TestCtrlBSC(TestCtrlBase):
self.assertEquals(r['mtype'], 'SET_REPLY')
self.assertEquals(r['var'], 'bts.0.trx.0.max-power-reduction')
self.assertEquals(r['value'], '22')
-
+
r = self.do_get('bts.0.trx.0.max-power-reduction')
self.assertEquals(r['mtype'], 'GET_REPLY')
self.assertEquals(r['var'], 'bts.0.trx.0.max-power-reduction')
self.assertEquals(r['value'], '22')
-
+
r = self.do_set('bts.0.trx.0.max-power-reduction', '1')
self.assertEquals(r['mtype'], 'ERROR')
self.assertEquals(r['error'], 'Value must be even')