-
Notifications
You must be signed in to change notification settings - Fork 3
/
travis_checks.bash
executable file
·36 lines (32 loc) · 1.18 KB
/
travis_checks.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
set -e
# first we ensure we change to the directory where this script is.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR
# This script run basic checks on this project.
# It is used by travis and can also be used by a developer for checking his current working tree.
#
# These variables need to be setup before calling this script:
# ROS_DISTRO [indigo | jade | kinetic]
# ROS_FLOW [devel | install]
# For travis docker, this is already done by the entrypoint in docker image.
# However when using 'docker exec' we still need to source it ourselves.
# Also it is mandatory when this script is run directly by the developer.
source /opt/ros/$ROS_DISTRO/setup.bash
mkdir -p build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=./install
if [ "$ROS_FLOW" == "devel" ]; then
make -j1
source devel/setup.bash
make -j1 tests
make -j1 run_tests
catkin_test_results .
elif [ "$ROS_FLOW" == "install" ]; then
make -j1 install
source install/setup.bash
# since the tests are part of the package and installed with it
# we can now run them
py.test install/lib/python2.7/dist-packages/pyros_msgs
# TODO : have a command line program to run self tests
fi