-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make rostest build dependency in CMakeLists.txt optional #3010
Comments
Just a comment stated earlier: this requires REP 140 to be active, implemented and rolled out. Otherwise you can not get rid of the build dependency in the package.xml file. The time frame for this is still not yet clear based on the slow progress in the last year. |
To clarify the task in this issue, this is limited to the changes in the CMakeLists.txt file. |
make rostest in CMakeLists optional (ros/rosdistro#3010)
make rostest in CMakeLists optional (ros/rosdistro#3010)
make rostest in CMakeLists optional (ros/rosdistro#3010)
make rostest in CMakeLists optional (ros/rosdistro#3010)
As rostest is still a build dependency for now, this change is only a first step that remains ineffective for most use cases, but mainly prepares for the roll-out of REP 140. However, the installation routines for OpenEmbedded [1] rely only on the CMakeLists, and not on the information in the package.xml. So, it can exploit this refined setup before REP 140 is in place, and explore the possible problematic cases for REP 140's roll-out. |
make rostest in CMakeLists optional (ros/rosdistro#3010)
We just applied the change to geometry and found and issue with the proposed approach. When While that does not affect Python testing it will lead to missing symbols when trying to link test executables without the collect libraries of found catkin packages. We likely have to change the behavior of catkin to support this use case (only set the variables when being invoked with |
I've been wondering about this problem. In packages I maintain, it generally works OK because there is seldom anything left to build at the end of the CMakeLists.txt where tests are defined. When there are test programs to compile under CATKIN_ENABLE_TESTING, what is the recommended approach? Should we do something like this?
|
@dirk-thomas did you mean "might not be backported"? |
@jack-oquin Finding rostest through catkin is neither necessary nor recommended. Currently the order to first build all test target (while the catkin variables are intact) and then find rostest before registering the tests is the only way which works. But since the order should not be completely different then outside of the testing block the referenced change in catkin aims to allow finding rostest early without affecting the catkin variables. @wjwwood At the time of writing I thought the patch might not be backported. But after some further discussion it might be viable to backport it. |
OK. What is necessary and recommended? |
It is necessary to It is not necessary to The recommended way is what is posted in the first comment of this ticket. If the package has C++ unit tests which requires additional packages as dependencies the user may either: find these dependencies individually and use their variables (just showing the libraries in the example):
or use catkin but take care of saving the variable content before:
|
So, the recommended version of my example would be:
The only change being `find_package()``? |
LGTM. For the more difficult case where your test executable needs to compile/link against additional packages which need to be find_package()-ed in the test block we will need a different more complex template. I am not sure which of my previous options is less weird / more intuitive though. |
make rostest in CMakeLists optional (ros/rosdistro#3010)
make rostest in CMakeLists optional (ros/rosdistro#3010)
make rostest in CMakeLists optional (ros/rosdistro#3010)
Changes since 1.9.30: ^^^^^^^^^^^^^^^^^^^^^^^^ Changelog for package tf ^^^^^^^^^^^^^^^^^^^^^^^^ 1.11.3 (2014-05-07) ------------------- * convert to boost signals2 following `ros/ros_comm#267 <https://github.com/ros/ros_comm/issues/267>`_ Fixes `#23 <https://github.com/ros/geometry/issues/23>`_. Requires `ros/geometry2#61 <https://github.com/ros/geometry_experimental/issues/61>`_ as well. * add rospy publisher queue_size argument `ros/ros_comm#169 <https://github.com/ros/ros_comm/issues/169>`_ * add queue_size to tf publisher `ros/ros_comm#169 <https://github.com/ros/ros_comm/issues/169>`_ * make rostest in CMakeLists optional (`ros/rosdistro#3010 <https://github.com/ros/rosdistro/issues/3010>`_) * Contributors: Lukas Bulwahn, Tully Foote 1.11.2 (2014-02-25) ------------------- * fixing test linking * Contributors: Tully Foote 1.11.1 (2014-02-23) ------------------- 1.11.0 (2014-02-14) ------------------- * TF uses ros::MessageEvent to get connection information * Contributors: Kevin Watts, Tully Foote 1.10.8 (2014-02-01) ------------------- * Port groovy-devel patch to hydro-devel * Added rosconsole as catkin dependency for catkin_package * Add rosconsole as runtime dependency * Contributors: Michael Ferguson, Mirza Shah 1.10.7 (2013-12-27) ------------------- * fix bug in tf::Matrix3x3::getEulerYPR() Fixes a bug in tf::Matrix3x3::getEulerYPR() implementation's handling of gimbal lock cases (when the new x axis aligns with the old +/-z axis). * add test that demonstrated bug in tf::Matrix3x3 tf::Matrix3x3::getEulerYPR() has a bug which returns an incorrect rpy for certain corner case inputs. This test demonstrates that bug. * Fix const correctness of tf::Vector3 rotate() method The method does not modify the class thus should be const. This has already been fixed in Bullet itself. * add automatic tf buffer cleaning on bag loop for python This logic was already implemented for c++ but not for the python module. * Contributors: Acorn Pooley, Timo Rohling, Tully Foote, v4hn 1.10.6 (2013-08-28) ------------------- * switching to wrapper scripts which will provide a deprecation warning for `#3 <https://github.com/ros/geometry/issues/3>`_ * add missing roswtf dependency to really export the plugin (fix `#27 <https://github.com/ros/geometry/issues/27>`_) * Update listener.py Fix the tf listener service exception in rospy. See: http://answers.ros.org/question/10777/service-exception-using-tf-listener-in-rospy/ * Fix MessageFilter race condition If MessageFilter does not explicitly stop its callback timer when it's being destroyed, there is a race condition when that timer is processed in a callback queue run by a different thread. Specifically, maxRateTimerCallback() may be called after messages_mutex_ has been destroyed, causing a unrecoverable error. 1.10.5 (2013-07-19) ------------------- * tf: export dependency on tf2_ros Fixes `#21 <https://github.com/ros/geometry/issues/21>`_ * added run dependency on graphviz closes `#19 <https://github.com/ros/geometry/issues/19>`_ 1.10.4 (2013-07-11) ------------------- * fixing erase syntax * resolving ros/geometry#18 using implementation added in tf2::BufferCore, adding dependency on next version of tf2 for this 1.10.3 (2013-07-09) ------------------- * fixing unittest for new resolve syntax 1.10.2 (2013-07-09) ------------------- * strip leading slashes in resolve, and also any time a method is passed from tf to tf2 assert the leading slash is stripped as well. tf::resolve with two arguments will end up with foo/bar instead of /foo/bar. Fixes ros/geometry2#12 * added two whitespaces to make message_filter compile with c++11 more on this here: http://stackoverflow.com/questions/10329942/error-unable-to-find-string-literal-operator-slashes * using CATKIN_ENABLE_TESTING to optionally configure tests in tf 1.10.1 (2013-07-05) ------------------- * updating dependency requirement to tf2_ros 0.4.3 * removing unused functions removing unused private methods removing ``max_extrapolation_distance_`` removing unused data storage _frameIDs frameIDS_reverse ``frame_authority_`` removing cache_time from tf, passing through method to tf2 buffer_core removing unused variables ``frames_`` and ``frame_mutex_`` and ``interpolating_`` removing unused mutex and transformchanged signaling commenting on deprecation of MAX_EXTRAPOLATION_DISTANCE 1.10.0 (2013-07-05) ------------------- * adding versioned dependency on recent geometry_experimental changes * fixing test dependencies * fixing callbacks for message filters * remove extra invalid comment * dedicated thread logic all implemented * removing commented out code * mostly completed conversion of tf::TransformListener to use tf2 under the hood * lookuptwist working * tf::Transformer converted to use tf2::Buffer under the hood. passing tf_unittest.cpp * making tf exceptions typedefs of tf2 exceptions for compatability * first stage of converting Transformer to Buffer * switching to use tf2's TransformBroadcaster * adding dependency on tf2_ros to start moving over contents * fixing unit tests
Changes since 1.10.5: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Changelog for package camera_info_manager ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1.11.3 (2014-05-19) ------------------- * Add public member function to manually set camera info (`#19 <https://github.com/ros-perception/image_common/issues/19>`_) * make rostest in CMakeLists optional (`ros/rosdistro#3010 <https://github.com/ros/rosdistro/issues/3010>`_) * Contributors: Jack O'Quin, Jonathan Bohren, Lukas Bulwahn
make rostest in CMakeLists optional (ros/rosdistro#3010)
I will close this since we there are no action items left based on the discussion. It is possible to workaround it within the CMake file of a package as illustrated by the example. Please feel free to comment with more information if you think this still needs some work. |
This commit has the same intentions as commit f3f1c4d on the indigo branch. Signed-off-by: Lukas Bulwahn <[email protected]>
make rostest in CMakeLists optional (ros/rosdistro#3010)
make rostest in CMakeLists optional (ros/rosdistro#3010)
make rostest in CMakeLists optional (ros/rosdistro#3010)
make rostest in CMakeLists optional (ros/rosdistro#3010)
* make rostest in CMakeLists optional (ros/rosdistro#3010) * rostest is now a test_depend instead of a build_depend
(Originally filled by @bulwahn at ros/catkin#588)
We want to make the rostest build dependency in the CMakeLists.txt of all ROS packages optional.
This shall been done by the refactoring the CMakeLists.txt from:
to:
For commits addressing this task, their commit message shall refer to this issue by
make rostest in CMakeLists optional (ros/rosdistro#3010)
.This has been discussed on the ros-sig-buildsystem [1], and prepares for the roll-out of the REP 140 [2].
[1] https://groups.google.com/forum/#!topic/ros-sig-buildsystem/Ub7ktrLPSe0
[2] https://github.com/jack-oquin/rep/blob/master/rep-0140.rst
The text was updated successfully, but these errors were encountered: