diff --git a/.travis.yml b/.travis.yml index bc145be..d626c6e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,11 +2,9 @@ os: - linux - osx language: cpp -compiler: - - gcc - - clang install: - make install_deps - source setup.bash script: - - make && make test + - mkdir build && cd build && cmake .. -DPYTHON_EXECUTABLE=$(which python2) && make && make tests && make run_tests + - catkin_test_results . diff --git a/Makefile b/Makefile index ced63b1..e172072 100644 --- a/Makefile +++ b/Makefile @@ -8,14 +8,17 @@ ifeq ($(UNAME),Darwin) brew tap ros/deps brew update brew outdated boost || brew upgrade boost || brew install boost - sudo pip install rosinstall_generator wstool rosdep empy catkin_pkg - sudo rosdep init + brew outdated python || brew upgrade python || brew install python + sudo -H python2 -m pip install -U pip setuptools + sudo -H python2 -m pip install --force-reinstall --no-deps -U pip + sudo -H python2 -m pip install rosinstall_generator wstool rosdep empy catkin_pkg + sudo -H rosdep init rosdep update mkdir catkin_ws cd catkin_ws && rosinstall_generator catkin --rosdistro hydro --tar > catkin.rosinstall cd catkin_ws && wstool init src catkin.rosinstall cd catkin_ws && rosdep install --from-paths src --ignore-src -y - cd catkin_ws && ./src/catkin/bin/catkin_make install + cd catkin_ws && python2 ./src/catkin/bin/catkin_make -DPYTHON_EXECUTABLE=`which python2` install echo "source catkin_ws/install/setup.bash" > setup.bash else sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list' diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 38718e6..e52a4d3 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -5,6 +5,8 @@ if(UNIX) target_link_libraries(${PROJECT_NAME}-test util) endif() - catkin_add_gtest(${PROJECT_NAME}-test-timer unit/unix_timer_tests.cc) - target_link_libraries(${PROJECT_NAME}-test-timer ${PROJECT_NAME}) + if(NOT APPLE) # these tests are unreliable on macOS + catkin_add_gtest(${PROJECT_NAME}-test-timer unit/unix_timer_tests.cc) + target_link_libraries(${PROJECT_NAME}-test-timer ${PROJECT_NAME}) + endif() endif()