Conversation
Signed-off-by: Shane Loretz <sloretz@google.com>
Signed-off-by: Shane Loretz <sloretz@google.com>
Signed-off-by: Shane Loretz <sloretz@google.com>
Signed-off-by: Shane Loretz <sloretz@google.com>
Signed-off-by: Shane Loretz <sloretz@google.com>
| <!-- <depend>mininet</depend> TODO this rosdep key --> | ||
| <depend>rclcpp</depend> | ||
| <depend>test_msgs</depend> | ||
| <depend>pytest</depend> |
There was a problem hiding this comment.
| <depend>pytest</depend> | |
| <depend>ament_cmake_pytest</depend> |
There was a problem hiding this comment.
Improved package.xml in 4df83da
ament_cmake_pytest is a test_depend, but pytest is still a run depend for the tests that run as root
test_discovery/CMakeLists.txt
Outdated
| find_package(ament_lint_auto REQUIRED) | ||
| ament_lint_auto_find_test_dependencies() | ||
|
|
||
| ament_add_pytest_test(test_discovery tests/test_discovery.py TIMEOUT 800) |
There was a problem hiding this comment.
| find_package(ament_lint_auto REQUIRED) | |
| ament_lint_auto_find_test_dependencies() | |
| ament_add_pytest_test(test_discovery tests/test_discovery.py TIMEOUT 800) | |
| find_package(ament_lint_auto REQUIRED) | |
| ament_lint_auto_find_test_dependencies() | |
| find_package(ament_cmake_pytest REQUIRED) | |
| ament_add_pytest_test(test_discovery tests/test_discovery.py TIMEOUT 800) |
There was a problem hiding this comment.
Finding ament_cmake_pytest should be part of ament_lint_auto_find_test_dependencies now that it's in the package.xml in 4df83da
| cmd = [] | ||
| cmd.append('sudo') | ||
| cmd.append(sys.executable) | ||
| cmd.append('-m') | ||
| cmd.append('pytest') | ||
| cmd.append('-c') | ||
| cmd.append(str(get_tests_dir() / 'conftest.py')) | ||
| if args.select: | ||
| cmd.append('-k') | ||
| cmd.append(args.select) | ||
| cmd.append(f'--rmws={":".join(rmw_implementations)}') | ||
| cmd.append(f'--ros-workspaces={":".join(get_workspaces())}') | ||
| cmd.append(str(get_tests_dir() / 'test_discovery.py')) |
There was a problem hiding this comment.
Nit
| cmd = [] | |
| cmd.append('sudo') | |
| cmd.append(sys.executable) | |
| cmd.append('-m') | |
| cmd.append('pytest') | |
| cmd.append('-c') | |
| cmd.append(str(get_tests_dir() / 'conftest.py')) | |
| if args.select: | |
| cmd.append('-k') | |
| cmd.append(args.select) | |
| cmd.append(f'--rmws={":".join(rmw_implementations)}') | |
| cmd.append(f'--ros-workspaces={":".join(get_workspaces())}') | |
| cmd.append(str(get_tests_dir() / 'test_discovery.py')) | |
| cmd = [ | |
| 'sudo', | |
| sys.executable, | |
| '-m', | |
| 'pytest', | |
| '-c', | |
| str(get_tests_dir() / 'conftest.py') | |
| ] | |
| if args.select: | |
| cmd.extend(['-k', args.select]) | |
| cmd.extend([ | |
| f'--rmws={":".join(rmw_implementations)}', | |
| f'--ros-workspaces={":".join(get_workspaces())}', | |
| str(get_tests_dir() / 'test_discovery.py' | |
| ]) |
| auto end_time = clock->now() + rclcpp::Duration::from_seconds(kMaxDiscoveryTime); | ||
| while (rclcpp::ok() && publisher->get_subscription_count() == 0) { | ||
| if (clock->now() >= end_time) { | ||
| return 0; |
There was a problem hiding this comment.
Maybe add a warning on timeout?
|
This pull request has been mentioned on ROS Discourse. There might be relevant details there: https://discourse.ros.org/t/ros-2-tsc-meeting-minutes-2023-02-16/29927/1 |
Signed-off-by: Shane Loretz <sloretz@google.com>
Signed-off-by: Shane Loretz <sloretz@google.com>
Signed-off-by: Shane Loretz <sloretz@google.com>
Signed-off-by: Shane Loretz <sloretz@google.com>
Signed-off-by: Shane Loretz <sloretz@google.com>
Signed-off-by: Shane Loretz <sloretz@google.com>
Signed-off-by: Shane Loretz <sloretz@google.com>
Signed-off-by: Shane Loretz <sloretz@google.com>
Signed-off-by: Shane Loretz <sloretz@google.com>
Signed-off-by: Shane Loretz <sloretz@google.com>
Signed-off-by: Shane Loretz <sloretz@google.com>
Signed-off-by: Shane Loretz <sloretz@google.com>
Signed-off-by: Shane Loretz <sloretz@google.com>
Signed-off-by: Shane Loretz <sloretz@google.com>
|
This pull request has been mentioned on ROS Discourse. There might be relevant details there: https://discourse.ros.org/t/proposal-restrict-dds-to-localhost-by-default/36018/4 |
Part of ros2/ros2#1359
This adds a new package
test_discoverywhich tests the new discovery behavior. There are two kinds of tests: ones that run withcolcon test, and ones that require being run manually because they require root access.The tests in
colcon testuse the host's networking, so I assume they could run on any platform, but they only test the "same host" case. The ones requiring root use mininet to test both the same host and different host cases.I'm sure this is missing rosdep key definitions.
Running non-root tests:
Running root tests
State as of 2023/02/14
non-root tests:
Root tests: