From d4cc2a0422cdbe8701d4ec0016d3cf0e34f47cc3 Mon Sep 17 00:00:00 2001 From: Shane Loretz Date: Mon, 9 Mar 2020 20:57:00 -0400 Subject: [PATCH] Bump CMake version to avoid CMP0048 warning (#89) * Bump CMake version to avoid CMP0048 warning Signed-off-by: Shane Loretz * travisci: remove deprecated option for pip * travisci: modernize things * change how coverage is invoked with rostest Co-authored-by: William Woodall --- .travis.yml | 11 +++++------ CMakeLists.txt | 2 +- test/run_coverage | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 498c2e2..42a4d44 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,21 +1,20 @@ +dist: bionic language: python python: - "2.7" # command to install dependencies install: - - pip install nose coverage pep8 PyYAML catkin_pkg rospkg empy python-coveralls --use-mirrors - - sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list' + - pip install nose coverage pep8 PyYAML catkin_pkg rospkg empy python-coveralls + - sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu bionic main" > /etc/apt/sources.list.d/ros-latest.list' - wget http://packages.ros.org/ros.key -O - | sudo apt-key add - - sudo apt-get update - sudo apt-get install python-rosdep - sudo `which rosdep` init - rosdep update - - rosdep install --from-paths ./ --rosdistro hydro -y -# Install image_proc to get a nodelet instaleld as a workaround to https://github.com/ros/pluginlib/pull/22 - - sudo apt-get install ros-hydro-image-proc + - rosdep install --from-paths ./ --rosdistro melodic -y # command to run tests script: - - source /opt/ros/hydro/setup.bash + - source /opt/ros/melodic/setup.bash - make coverage - catkin_test_results /tmp/capabilities_build/build/test_results notifications: diff --git a/CMakeLists.txt b/CMakeLists.txt index b98478c..4c37b5b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.3) +cmake_minimum_required(VERSION 3.0.2) project(capabilities) find_package(catkin REQUIRED COMPONENTS message_generation std_msgs std_srvs) diff --git a/test/run_coverage b/test/run_coverage index a1e2811..d47e912 100755 --- a/test/run_coverage +++ b/test/run_coverage @@ -3,9 +3,9 @@ import sys try: - from coverage import main + from coverage.cmdline import main except ImportError as exc: - print("Error: failed to run coverage: {0}".format(exc)) + sys.exit("Error: failed to run coverage: {0}".format(exc)) if __name__ == '__main__': sys.exit(main())