add test file for px4controller
This commit is contained in:
@@ -66,8 +66,7 @@ class FailsafeUnitTest(unittest.TestCase):
|
||||
request.message = "test"
|
||||
|
||||
try:
|
||||
end_time = time.time() + 10.0
|
||||
while time.time() < end_time:
|
||||
while True:
|
||||
rclpy.spin_once(self.node, timeout_sec=0.1)
|
||||
if (not self.service_called):
|
||||
future = failsafe_client.call_async(request)
|
||||
|
||||
@@ -60,6 +60,10 @@ install(
|
||||
DESTINATION share/${PROJECT_NAME}
|
||||
)
|
||||
|
||||
install(FILES
|
||||
test/test_failsafe_enabled.py
|
||||
DESTINATION lib/${PROJECT_NAME})
|
||||
|
||||
if(BUILD_TESTING)
|
||||
find_package(ament_lint_auto REQUIRED)
|
||||
|
||||
@@ -70,6 +74,8 @@ if(BUILD_TESTING)
|
||||
# uncomment the line when this package is not in a git repo
|
||||
# set(ament_cmake_cpplint_FOUND TRUE)
|
||||
ament_lint_auto_find_test_dependencies()
|
||||
find_package(launch_testing_ament_cmake REQUIRED)
|
||||
add_launch_test(test/test_failsafe_enabled.py)
|
||||
endif()
|
||||
|
||||
ament_package()
|
||||
|
||||
0
src/px4_connection/test/test_failsafe_enabled.py
Normal file
0
src/px4_connection/test/test_failsafe_enabled.py
Normal file
Reference in New Issue
Block a user