Hi Max,
in osmo-python-tests master, I did
python2 setup.py install
rm -rf build/ dist/ osmopython.egg-info
python3 setup.py install
which results in osmotestvty.py installed as py3, causing an encoding problem
which I mentioned; py3 is a lot more than print() with braces, see the error
log below.
So in principle I still don't understand why the py2 scripts need to be made
py3 compatible, and why I need to add 'from future' imports to py3 scripts now.
There has to be a better way.
About the need to rm the installation artifacts, there is no mention of it in
the README. And even when I remove those, I still get py2 scripts installed as
py3.
So anyone is bound to get this error:
"
osmotestvty.py -p /n/s/osmo-dev/make/osmo-msc/../../src/osmo-msc -w
/n/s/osmo-dev/make/osmo-msc -v
confpath /n/s/osmo-dev/make/osmo-msc/../../src/osmo-msc, workdir
/n/s/osmo-dev/make/osmo-msc
Running tests for specific VTY commands
test_history (__main__.TestVTY) ... Launch: ./src/osmo-msc/osmo-msc -c
/n/s/osmo-dev/make/osmo-msc/../../src/osmo-msc/doc/examples/osmo-msc/osmo-msc.cfg from
/n/s/osmo-dev/make/osmo-msc
Opening /dev/null
Launching: PWD=/n/s/osmo-dev/make/osmo-msc './src/osmo-msc/osmo-msc' '-c'
'/n/s/osmo-dev/make/osmo-msc/../../src/osmo-msc/doc/examples/osmo-msc/osmo-msc.cfg'
Terminating took 2.679s
ERROR
test_terminal_length (__main__.TestVTY) ... Launch: ./src/osmo-msc/osmo-msc -c
/n/s/osmo-dev/make/osmo-msc/../../src/osmo-msc/doc/examples/osmo-msc/osmo-msc.cfg from
/n/s/osmo-dev/make/osmo-msc
Launching: PWD=/n/s/osmo-dev/make/osmo-msc './src/osmo-msc/osmo-msc' '-c'
'/n/s/osmo-dev/make/osmo-msc/../../src/osmo-msc/doc/examples/osmo-msc/osmo-msc.cfg'
Terminating took 2.679s
ERROR
test_unknown_command (__main__.TestVTY) ... Launch: ./src/osmo-msc/osmo-msc -c
/n/s/osmo-dev/make/osmo-msc/../../src/osmo-msc/doc/examples/osmo-msc/osmo-msc.cfg from
/n/s/osmo-dev/make/osmo-msc
Launching: PWD=/n/s/osmo-dev/make/osmo-msc './src/osmo-msc/osmo-msc' '-c'
'/n/s/osmo-dev/make/osmo-msc/../../src/osmo-msc/doc/examples/osmo-msc/osmo-msc.cfg'
Terminating took 2.679s
ERROR
======================================================================
ERROR: test_history (__main__.TestVTY)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/local/lib/python3.6/dist-packages/osmopython-0.0.6-py3.6.egg/EGG-INFO/scripts/osmotestvty.py",
line 56, in test_history
File
"/usr/local/lib/python3.6/dist-packages/osmopython-0.0.6-py3.6.egg/osmopy/obscvty.py",
line 223, in command
return self._common_command(request, close)
File
"/usr/local/lib/python3.6/dist-packages/osmopython-0.0.6-py3.6.egg/osmopy/obscvty.py",
line 179, in _common_command
self.socket.send("%s\r" % request)
TypeError: a bytes-like object is required, not 'str'
"
With your recent set of changes, you have not only hung all the build slaves'
osmo-python-tests updates for 3 weeks, but also dismantled the installation. I
wonder how it was possible for this to get past your testing.
I will try to get the scripts working for me now.
~N