Commit 786e36b6 authored by jcarpent's avatar jcarpent

[Travis] Use coverage with python 2.7

parent fa854980
language: cpp language: generic
python: python:
- "2.7" - "2.7"
sudo: required sudo: required
...@@ -30,6 +30,7 @@ allow_failures: ...@@ -30,6 +30,7 @@ allow_failures:
before_install: ./travis_custom/custom_before_install before_install: ./travis_custom/custom_before_install
install: install:
- pip install --user coveralls - pip install --user coveralls
- pip install --user numpy
script: script:
- export CMAKE_ADDITIONAL_OPTIONS="-DCMAKE_BUILD_TYPE=${BUILDTYPE}" - export CMAKE_ADDITIONAL_OPTIONS="-DCMAKE_BUILD_TYPE=${BUILDTYPE}"
- sudo free -m -t - sudo free -m -t
...@@ -39,7 +40,7 @@ after_success: ...@@ -39,7 +40,7 @@ after_success:
- ./.travis/run after_success - ./.travis/run after_success
#- export PYTHONPATH=$install_dir/lib/python2.7/site-packages #- export PYTHONPATH=$install_dir/lib/python2.7/site-packages
#- coveralls-lcov -v -n $build_dir/coverage.info > coverage.json #- coveralls-lcov -v -n $build_dir/coverage.info > coverage.json
- export PYTHONPATH=/tmp/_ci/install/lib/python2.7/site-packages - export PYTHONPATH=$PYHTONPATH:/tmp/_ci/install/lib/python2.7/site-packages:/usr/lib/python2.7/dist-packages
- coveralls-lcov -v -n /tmp/_ci/build/coverage.info > coverage.json - coveralls-lcov -v -n /tmp/_ci/build/coverage.info > coverage.json
- coverage run ./python/tests.py - coverage2 run ./python/tests.py
- coveralls --merge=coverage.json - coveralls --merge=coverage.json
#!/usr/bin/env python #!/usr/bin/env python
import unittest import unittest, sys
from bindings import TestSE3 # noqa from bindings import TestSE3 # noqa
from explog import TestExpLog # noqa from explog import TestExpLog # noqa
...@@ -9,4 +9,6 @@ from rpy import TestRPY # noqa ...@@ -9,4 +9,6 @@ from rpy import TestRPY # noqa
from utils import TestUtils # noqa from utils import TestUtils # noqa
if __name__ == '__main__': if __name__ == '__main__':
print "Python version"
print sys.version_info
unittest.main() unittest.main()
...@@ -15,7 +15,7 @@ sudo free -m -t ...@@ -15,7 +15,7 @@ sudo free -m -t
# Setup environment variables. # Setup environment variables.
export APT_DEPENDENCIES="doxygen libboost-system-dev libboost-test-dev libboost-filesystem-dev libboost-program-options-dev libeigen3-dev libtinyxml-dev robotpkg-urdfdom libconsole-bridge-dev" export APT_DEPENDENCIES="doxygen libboost-system-dev libboost-test-dev libboost-filesystem-dev libboost-program-options-dev libeigen3-dev libtinyxml-dev robotpkg-urdfdom libconsole-bridge-dev"
# Add Python dependency # Add Python dependency
export APT_DEPENDENCIES=$APT_DEPENDENCIES" libpython2.7 libboost-python-dev python-numpy robotpkg-eigenpy" export APT_DEPENDENCIES=$APT_DEPENDENCIES" libboost-python-dev robotpkg-eigenpy python2.7-dev python-numpy"
# Add Geometry dependencies # Add Geometry dependencies
#export APT_DEPENDENCIES=$APT_DEPENDENCIES" robotpkg-hpp-fcl robotpkg-assimp robotpkg-octomap" #export APT_DEPENDENCIES=$APT_DEPENDENCIES" robotpkg-hpp-fcl robotpkg-assimp robotpkg-octomap"
......
...@@ -6,7 +6,7 @@ set -x ...@@ -6,7 +6,7 @@ set -x
set -v set -v
# Setup environment variables. # Setup environment variables.
export CMAKE_ADDITIONAL_OPTIONS=" ${CMAKE_ADDITIONAL_OPTIONS} -DBUILD_BENCHMARK=\"ON\" -DBUILD_UNIT_TESTS=\"ON\"" export CMAKE_ADDITIONAL_OPTIONS=" ${CMAKE_ADDITIONAL_OPTIONS} -DBUILD_BENCHMARK=\"ON\" -DBUILD_UNIT_TESTS=\"ON\" "
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/opt/openrobots/lib/pkgconfig" export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/opt/openrobots/lib/pkgconfig"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/openrobots/lib" export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/openrobots/lib"
# Setup environment variables. # Setup environment variables.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment