Commit Graph

5 Commits

Author SHA1 Message Date
Max 901f5eb259 Fix install in the presence of old modules
If older incompatible version of osmopython is already available, it
might be chosen fori mport instead of current version. Fix this by
explicitly prepending the proper version to path.

Change-Id: Icbe2af1e3815406213be29e0c0360432dc9fd6fb
Related: OS#2821
2018-01-15 14:24:15 +01:00
Max c41b751dec Print version before tests
This helps with debugging of import-related issues - we know the version
under test before the test has a chance to hang.

Change-Id: If13cba60a19e9c15885355f85def4d134fa37993
Related: OS#2821
2018-01-15 14:10:27 +01:00
Max cd5a6e419e Fix absolute import issue in py3
As of 577f2a95e4f01c58a0a4f4ccb3b70d9c048b626e in osmo-ci, the
contrib/jenkins.sh isused forinstallation. This causes the issue with
python3 because test coded use absolute import by default.

Fix this by adding relative path and import from ../osmopy to make
sure test code uses the current module and not the one which might be
already installed in the system.

Change-Id: I8ac3c0d45fb2e1d18646048703ac405be1c7e539
2018-01-14 18:33:26 +01:00
Max 566f2a7590 Update ctrl command parsing for python3
* make parse() return command id in addition to variable name and value
* introduce parse_kv() wrapper which ignores that id and use it instead
  of old parse()
* make parse() compatible with python3 where we got bytes, not string
  from the socket so we have to decode it properly before using split()
* expand test_py3.py with simply asyn server which verifies that
  osmo_ctrl.py works properly

Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1
2017-12-28 19:34:48 +01:00
Max c35bb473e4 Expand CI tests
* make sure jenkins.sh fails on any errors similar to other jenkins jobs
* always explicitly use python2 instead of generic python
* add basic module import tests for python 2 and 3
* add comments

Change-Id: I0f4639537d227c513859d4552533ce1e41df9deb
2017-12-18 10:11:39 +01:00