We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e92b92 commit 9d3781cCopy full SHA for 9d3781c
1 file changed
ci/script.sh
@@ -62,6 +62,18 @@ run_python_core_tests() {
62
63
run_python_ros2_tests() {
64
export PYTHONPATH=.
65
+ if [ -n "${ROS_DISTRO:-}" ] && [ -f "/opt/ros/${ROS_DISTRO}/setup.bash" ]; then
66
+ # setup-ros installs the ROS underlay but does not source it for our shell
67
+ source "/opt/ros/${ROS_DISTRO}/setup.bash"
68
+ elif [ -f "/opt/ros/jazzy/setup.bash" ]; then
69
+ source "/opt/ros/jazzy/setup.bash"
70
+ else
71
+ echo "ROS2 environment setup script not found"
72
+ exit 1
73
+ fi
74
+
75
+ command -v ros2 >/dev/null
76
+ command -v colcon >/dev/null
77
python -W ignore test/test_ros2.py -v
78
}
79
0 commit comments