Skip to content

Commit

Permalink
Add missing README.md for my_controlller and fix bash script
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommy IdeaPad3 committed Dec 2, 2023
1 parent a50a9c8 commit f5616bf
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
14 changes: 14 additions & 0 deletions src/my_controller/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# my_controller

Here's a simple ROS2 package that demonstrates how integration test
(aka level 2 unit test) can be done using GoogleTest.

Note: The integration test used in this example is purposely kept
simple. It makes system() calls with the following assumption:

- Linux OS
- pkill command

For a more portable ROS2 integration test framework, consider using catch_ros2:

https://github.com/ngmor/catch_ros2
Empty file modified src/my_controller/scripts/generate_coverage_report.bash
100644 → 100755
Empty file.
7 changes: 5 additions & 2 deletions src/my_controller/scripts/run_me_for_fun.bash
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,16 @@ function signal_handler {
echo "You have pressed control-c $N/3 times"
if [[ $N == "3" ]]; then
echo "Bye"
exit 0;
# Clean all processes in this procees grouop (including itself)
kill -9 -$$
fi
N=$(( N + 1 ))
}
trap signal_handler SIGINT

# 4.) Child process
# 4.) Child processees
sleep 1000&
sleep 1000&
sleep 1000&

# 5.) Wait for all children to exit
Expand Down

0 comments on commit f5616bf

Please sign in to comment.