Commit 786e36b6 authored by jcarpent's avatar jcarpent

[Travis] Use coverage with python 2.7

parent fa854980
language: cpp
language: generic
python:
- "2.7"
sudo: required
......@@ -30,6 +30,7 @@ allow_failures:
before_install: ./travis_custom/custom_before_install
install:
- pip install --user coveralls
- pip install --user numpy
script:
- export CMAKE_ADDITIONAL_OPTIONS="-DCMAKE_BUILD_TYPE=${BUILDTYPE}"
- sudo free -m -t
......@@ -39,7 +40,7 @@ after_success:
- ./.travis/run after_success
#- export PYTHONPATH=$install_dir/lib/python2.7/site-packages
#- 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
- coverage run ./python/tests.py
- coverage2 run ./python/tests.py
- coveralls --merge=coverage.json
#!/usr/bin/env python
import unittest
import unittest, sys
from bindings import TestSE3 # noqa
from explog import TestExpLog # noqa
......@@ -9,4 +9,6 @@ from rpy import TestRPY # noqa
from utils import TestUtils # noqa
if __name__ == '__main__':
print "Python version"
print sys.version_info
unittest.main()
......@@ -15,7 +15,7 @@ sudo free -m -t
# 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"
# 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
#export APT_DEPENDENCIES=$APT_DEPENDENCIES" robotpkg-hpp-fcl robotpkg-assimp robotpkg-octomap"
......
......@@ -6,7 +6,7 @@ set -x
set -v
# 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 LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/openrobots/lib"
# 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