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
This commit is contained in:
Max 2017-12-15 11:56:05 +01:00
parent 7f7c4b4410
commit c35bb473e4
3 changed files with 24 additions and 1 deletions

View File

@ -1,4 +1,13 @@
#!/bin/sh
python2 ./setup.py install || python ./setup.py install
set -ex
# FIXME: remove once python 2 support is deprecated
python2 ./setup.py install
python2 tests/test_py2.py
rm -rf ./build
python3 ./setup.py install
python3 tests/test_py3.py
# TODO: add more tests

7
tests/test_py2.py Normal file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env python2
# just import a smoke test for osmopy
import osmopy
print '[Python2] Smoke test PASSED.'

7
tests/test_py3.py Normal file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env python3
# just import a smoke test for osmopy
import osmopy
print('[Python3] Smoke test PASSED.')