start-jsk / rtmros_common

OpenRTM - ROS interoperability packages
http://wiki.ros.org/rtmros_common
12 stars 52 forks source link

No tests will block the configuration step #1126

Open kazuki0824 opened 2 years ago

kazuki0824 commented 2 years ago

Problems

If CATKIN_ENABLE_TESTING is set to OFF, configuration fails in noetic.

catlkin b openrtm_tools --summarize --cmake-args -DCATKIN_ENABLE_TESTING=OFF

Starting  >>> openrtm_tools                                                                                                                                                                                                                                                      
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Errors     << openrtm_tools:cmake /root/hlab-nxo-setup/overlay_ws/logs/openrtm_tools/build.cmake.002.log                                                                                                                                                                         
CMake Error at /opt/ros/noetic/share/catkin/cmake/test/tests.cmake:18 (message):
  () is not available when tests are not enabled.  The CMake code should only
  use it inside a conditional block which checks that testing is enabled:

  if(CATKIN_ENABLE_TESTING)

    (...)

  endif()

Call Stack (most recent call first):
  CMakeLists.txt:143 (add_rostest)

cd /root/hlab-nxo-setup/overlay_ws/build/openrtm_tools; catkin build --get-env openrtm_tools | catkin env -si  /usr/bin/cmake /root/hlab-nxo-setup/overlay_ws/src/rtmros_common/openrtm_tools --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/root/hlab-nxo-setup/overlay_ws/devel/.private/openrtm_tools -DCMAKE_INSTALL_PREFIX=/root/hlab-nxo-setup/overlay_ws/install -DCATKIN_ENABLE_TESTING=OFF; cd -

.................................................................................................................................................................................................................................................................................
Failed     << openrtm_tools:cmake                [ Exited with code 1 ]                                                                                                                                                                                                          
Failed    <<< openrtm_tools                      [ 1.0 seconds ]                                                                                                                                                                                                                 

This patch has

This PR adds checking the condiition where testing is really enabled or not.

pazeshun commented 2 years ago

@kazuki0824 https://github.com/start-jsk/rtmros_common/pull/1126/commits/835a7116a008abcf11f53dd02881c9afdda93d17 seems not good workaround, because the problem is caused by a bug of collada_urdf and will be fixed by https://github.com/ros/collada_urdf/pull/44 or https://github.com/ros/collada_urdf/pull/46. Please install https://github.com/werner291/collada_urdf/tree/patch-1 or https://github.com/k-okada/collada_urdf/tree/kinetic-devel in your workspace. If you use rosinstall, you can copy&paste https://github.com/jsk-ros-pkg/jsk_robot/commit/6100e7671dbd188c8a6cdd1f5652f4dbc6124fa0.

kazuki0824 commented 2 years ago

@pazeshun Thanks. the mentioned commit is reverted in https://github.com/start-jsk/rtmros_common/pull/1126/commits/29681bfd87a7999af5ca96fc1ed55c728a40a154