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

Adds tests to software watchdogs #11

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

norro
Copy link
Contributor

@norro norro commented Apr 13, 2021

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>
* Enables basic testing, linting
* Fixes code style and linting

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>
@norro norro marked this pull request as draft April 13, 2021 12:19
@norro norro force-pushed the testing branch 2 times, most recently from 1be1bc2 to 21647ce Compare April 13, 2021 14:13
@norro norro marked this pull request as ready for review April 14, 2021 09:23
@norro
Copy link
Contributor Author

norro commented Apr 14, 2021

Sorry for the large PR. Once I activated testing, I had to do a lot of linting first. The only semantic change is 85a6200, adding a launch test that

  1. Launches the watchdog
  2. Launches the talker and heartbeat
  3. Once heartbeat and watchdog are in sync, shuts down talker and heartbeat
  4. Monitors the watchdog for the expected output, i.e. lease expiry and its transition to 'inactive'

@gbiggs, @robbel I'll appreciate your feedback/review.

@norro norro force-pushed the testing branch 2 times, most recently from 93de1ce to 8c4dbf1 Compare April 14, 2021 14:06
* Talker, heartbeat, and watchdog are launched
* When heartbeat and watchdog are in sync, heartbeat and talker are shut
down
* Proper reaction by watchdog (going nactive) is monitored

ros-safety/safety_working_group#28
ros-safety/safety_working_group#30

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>
sw_watchdog/include/sw_watchdog/visibility_control.h Outdated Show resolved Hide resolved
sw_watchdog/launch/windowed_watchdog_lifecycle.launch.py Outdated Show resolved Hide resolved
sw_watchdog/package.xml Show resolved Hide resolved
# )
# endif()
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think ament_lint can lint message files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are probably right. I took the cmake configuration from lifecycle_msgs, though, as I thought being a quality level 1 package this probably knows what it's doing. :D

@@ -16,8 +16,6 @@

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
<test_depend>ros_testing</test_depend>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What specifically is being tested?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed ros_testing from the dependencies because there were no node tests in sw_watchdog_msgs. I think it won't test much for this package except standard things like manifest and copyright.

norro added 2 commits May 31, 2021 14:54
Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>
Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants