Skip to content
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

add test to check /smach_viewer/image #62

Merged
merged 3 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ jobs:
mkdir -p ~/ws/src
cd ~/ws/src
ln -sf $GITHUB_WORKSPACE .
[ ${{ matrix.ROS_DISTRO }} != "one" ] || (sudo apt install -y -qq git; sudo apt remove -y -qq ros-${{ matrix.ROS_DISTRO }}-roseus-smach; git clone https://github.com/jsk-ros-pkg/jsk_roseus.git; )
rosdep install -qq -r -y --from-path . --ignore-src || echo "OK"
shell: bash

Expand All @@ -130,6 +131,7 @@ jobs:
source ~/ws/devel/setup.bash
set -x
cd ~/ws/
[ ${{ matrix.ROS_DISTRO }} != "one" ] || touch src/jsk_roseus/CATKIN_IGNORE
catkin test --no-status -sv ${{ matrix.CATKIN_OPTIONS }} --cmake-args -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.CMAKE_OPTIONS }}
shell: bash

Expand Down
5 changes: 5 additions & 0 deletions smach_viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,13 @@ catkin_install_python(
if(CATKIN_ENABLE_TESTING)
find_package(rostest REQUIRED)
add_rostest(test/test_smach_py.test)
add_rostest(test/test_smach_image.test)
find_package(roseus QUIET)
if(roseus_FOUND)
add_rostest(test/test_smach_eus.test)
endif()
find_package(roseus_smach QUIET)
if(roseus_smach_FOUND)
add_rostest(test/test_roseus_smach_state_machine_ros_sample.test)
endif()
endif()
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<launch>
<node pkg="smach_viewer"
name="smach_viewer" type="smach_viewer.py"
output="screen" required="true" />
<node pkg="roseus_smach"
name="test_smach_eus_exec_smach_simple" type="state-machine-ros-sample.l" args="'(exec-smach-simple)'" />
<test test-name="smach_viewer_eus_test"
pkg="smach_viewer" type="test_rosout_error.py" name="smach_viewer_eus_test" />
</launch>
15 changes: 15 additions & 0 deletions smach_viewer/test/test_smach_image.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<launch>
<node pkg="smach_viewer"
name="smach_viewer" type="smach_viewer.py"
output="screen" />
<node pkg="smach_viewer"
name="test_smach_py" type="test_smach.py" />
<test test-name="smach_viewer_test" pkg="rostest" type="publishtest" name="smach_viewer_test" >
<rosparam>
topics:
- name: /smach_viewer/image
timeout: 10
negative: False
</rosparam>
</test>
</launch>