Proposal to remove CATKIN_TEST_RESULTS_DIR env var

99 views
Skip to first unread message

Dirk Thomas

unread,
Apr 6, 2015, 4:55:54 PM4/6/15
to ros-sig-b...@googlegroups.com
When catkin was introduced to replace rosbuild some rosbuild features were mapped to catkin to provide similar mechanisms.
One of those is the environment variable `CATKIN_TEST_RESULTS_DIR` which was inspired by `ROS_TEST_RESULTS_DIR` [1].

For rosbuild, where the builds happen in-source, it made sense to generate the test results in an external location.
For catkin with out-of-source builds the location always points to `${CMAKE_BINARY_DIR}/test_results` of the package being processed (if not overridden by the user).

With the recent move to building catkin packages in parallel (with catkin_tools) the concept of using an environment variable to determine the location has reached its limits [2].
Especially when multiple packages across workspaces the environment variable would need to be different for each of them.
As a consequence the test results are generated in "unexpected" locations which are not obvious to the user and not changeable.

To address the problem the location of the test results must be determined at configure time instead of relying on an environment variable at runtime [3].
By default the location is still the package specific folder `${CMAKE_BINARY_DIR}/test_results`.
And the user can still override the location by passing the CMake variable `-DCATKIN_TEST_RESULTS_DIR=any/path`.
But with the proposed patch there is no environment variable anymore.

Since the value of the environment variable has proven to be wrong in a lot of cases [2] the patch not only removes the runtime usage but also removes the environment variable itself.
With ROS_TEST_RESULTS_DIR not being set anymore for rosbuild packages the test results go to their default location in `~/.ros/test_results` (or more precisely `$ROS_HOME/test_results`).
This can still be overridden by the user by setting the environment variable ROS_TEST_RESULTS_DIR

The proposed change clearly changes behavior but we think this is necessary to address the reported issue with the test result location.
The patch is proposed to be rolled out into Indigo (as well as Jade) in order to solve the problem.

If you are relying on `CATKIN_TEST_RESULTS_DIR` being defined please consider commenting to make us aware of it.
We appreciate any feedback on this topic since we want to make sure that it doesn't break existing use cases.

Thank you,
- Dirk

Reply all
Reply to author
Forward
0 new messages