Switch to isolated testing via rmw_test_fixture#1251
Merged
Conversation
Signed-off-by: Yadunund <yadunund@gmail.com>
15 tasks
Member
|
I think there are a couple of other places where we'll need to isolate. This is how I got the remaining tests to pass locally: diff --git a/rcl/test/cmake/rcl_add_custom_gtest.cmake b/rcl/test/cmake/rcl_add_custom_gtest.cmake
index da24cd49a7ad..fb34060fd3e7 100644
--- a/rcl/test/cmake/rcl_add_custom_gtest.cmake
+++ b/rcl/test/cmake/rcl_add_custom_gtest.cmake
@@ -71,8 +71,8 @@ macro(rcl_add_custom_gtest target)
endif()
# Pass args along to ament_add_gtest().
- ament_add_gtest(${target} ${_ARG_SRCS} ${_ARG_ENV} ${_ARG_APPEND_ENV} ${_ARG_APPEND_LIBRARY_DIRS}
- ${_ARG_SKIP_TEST} ${_ARG_TIMEOUT})
+ ament_add_ros_isolated_gtest(${target} ${_ARG_SRCS} ${_ARG_ENV} ${_ARG_APPEND_ENV}
+ ${_ARG_APPEND_LIBRARY_DIRS} ${_ARG_SKIP_TEST} ${_ARG_TIMEOUT})
# Check if the target was actually created.
if(TARGET ${target})
if(_ARG_TRACE)
diff --git a/rcl/test/cmake/rcl_add_custom_launch_test.cmake b/rcl/test/cmake/rcl_add_custom_launch_test.cmake
index 8be69800eaf9..9985a3121ec2 100644
--- a/rcl/test/cmake/rcl_add_custom_launch_test.cmake
+++ b/rcl/test/cmake/rcl_add_custom_launch_test.cmake
@@ -34,9 +34,11 @@ macro(rcl_add_custom_launch_test test_name executable1 executable2)
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/test/${test_name}${target_suffix}_$<CONFIG>.py"
INPUT "${CMAKE_CURRENT_BINARY_DIR}/${test_name}${target_suffix}.py.configure"
)
+ set(RUNNER "RUNNER" "${ament_cmake_ros_DIR}/run_test_isolated.py")
add_launch_test(
"${CMAKE_CURRENT_BINARY_DIR}/test/${test_name}${target_suffix}_$<CONFIG>.py"
TARGET ${test_name}${target_suffix}
+ RUNNER "${RUNNER}"
${ARGN}
)
if(TEST ${test_name}${target_suffix})The launch test one is a little tricky. All of the existing stuff for isolating launch tests is downstream from this package, but fortunately the launch tests in |
Signed-off-by: Yadunund <yadunund@gmail.com>
Member
Author
|
@cottsay thanks a lot for flagging the changes needed to get the other tests to pass. I've pushed your suggestions. |
Member
Member
|
The devel job for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR effectively reverts #1218 and instead relies on
rmw_test_fixtureto start a zenoh router when running tests withrmw_zenoh.Fixes # (issue)
Partially addresses ros2/ros2#1664
Is this user-facing behavior change?
No
Did you use Generative AI?
No
Additional Information