Skip to content
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
3 changes: 0 additions & 3 deletions system_modes/test/launchtest/manager_and_monitor.launch.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,3 @@ class TestModeManagement(unittest.TestCase):
output_filter=output_filter,
timeout=15,
stream='stdout')

import time
time.sleep(1)
3 changes: 0 additions & 3 deletions system_modes/test/launchtest/modes_observer.launch.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,3 @@ class TestModeManagement(unittest.TestCase):
output_filter=output_filter,
timeout=15,
stream='stdout')

import time
time.sleep(1)
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,3 @@ class TestModeManagement(unittest.TestCase):
output_filter=output_filter,
timeout=15
)

import time
time.sleep(1)

@launch_testing.post_shutdown_test()
class TestModeManagementShutdown(unittest.TestCase):

def test_last_process_exit_code(self, proc_info, test_nodes):
launch_testing.asserts.assertExitCodes(proc_info, process=test_nodes)
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,3 @@ class TestModeManagement(unittest.TestCase):
output_filter=output_filter,
timeout=15
)

import time
time.sleep(1)

@launch_testing.post_shutdown_test()
class TestModeManagementShutdown(unittest.TestCase):

def test_last_process_exit_code(self, proc_info, test_nodes):
launch_testing.asserts.assertExitCodes(proc_info, process=test_nodes)
9 changes: 0 additions & 9 deletions system_modes/test/launchtest/two_lifecycle_nodes.launch.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,3 @@ class TestModeManagement(unittest.TestCase):
output_filter=output_filter,
timeout=15
)

import time
time.sleep(1)

@launch_testing.post_shutdown_test()
class TestModeManagementShutdown(unittest.TestCase):

def test_last_process_exit_code(self, proc_info, test_nodes):
launch_testing.asserts.assertExitCodes(proc_info, process=test_nodes)
9 changes: 0 additions & 9 deletions system_modes/test/launchtest/two_mixed_nodes.launch.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,3 @@ class TestModeManagement(unittest.TestCase):
output_filter=output_filter,
timeout=15
)

import time
time.sleep(1)

@launch_testing.post_shutdown_test()
class TestModeManagementShutdown(unittest.TestCase):

def test_last_process_exit_code(self, proc_info, test_nodes):
launch_testing.asserts.assertExitCodes(proc_info, process=test_nodes)
16 changes: 0 additions & 16 deletions test_launch_system_modes/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,11 @@
cmake_minimum_required(VERSION 3.5)
project(test_launch_system_modes)

# Default to C99
if(NOT CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 99)
endif()

# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# find dependencies
find_package(ament_cmake REQUIRED)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
find_package(ament_cmake_gtest REQUIRED)
find_package(ament_cmake_gmock REQUIRED)
# the following line skips the linter which checks for copyrights
# remove the line when a copyright and license is present in all source files
set(ament_cmake_copyright_FOUND TRUE)
Expand Down
5 changes: 0 additions & 5 deletions test_launch_system_modes/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,8 @@
<depend>system_modes_msgs</depend>
<depend>system_modes_examples</depend>

<test_depend>ament_cmake_gtest</test_depend>
<test_depend>ament_cmake_gmock</test_depend>
<test_depend>ament_cmake_pep257</test_depend>
<test_depend>ament_cmake_flake8</test_depend>
<test_depend>ament_cmake_cpplint</test_depend>
<test_depend>ament_cmake_cppcheck</test_depend>
<test_depend>ament_cmake_uncrustify</test_depend>
<test_depend>ament_index_python</test_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>launch_testing_ament_cmake</test_depend>
Expand Down
30 changes: 16 additions & 14 deletions test_launch_system_modes/test/node_test.launch.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,22 @@ def generate_test_description():
])

drive_base = launch_system_modes.actions.Node(
package='system_modes_examples',
executable='drive_base',
name='drive_base',
namespace='',
output='screen')
package='system_modes_examples',
executable='drive_base',
name='drive_base',
namespace='',
output='screen')

# Startup
drive_base_configure = launch.actions.EmitEvent(
event=launch_ros.events.lifecycle.ChangeState(
lifecycle_node_matcher=launch.events.matchers.matches_action(drive_base),
transition_id=lifecycle_msgs.msg.Transition.TRANSITION_CONFIGURE))
drive_base_configure = launch.actions.TimerAction(
period=2.,
actions=[
launch.actions.EmitEvent(
event=launch_ros.events.lifecycle.ChangeState(
lifecycle_node_matcher=launch.events.matchers.matches_action(drive_base),
transition_id=lifecycle_msgs.msg.Transition.TRANSITION_CONFIGURE))
]
)

drive_base_activate = launch.actions.EmitEvent(
event=launch_ros.events.lifecycle.ChangeState(
Expand Down Expand Up @@ -88,13 +93,13 @@ def generate_test_description():
entities=[drive_base_change_mode_to_FAST]))

launch_description = LaunchDescription()
launch_description.add_action(mode_manager)
launch_description.add_action(drive_base)
launch_description.add_action(on_inactive_handler)
launch_description.add_action(on_active_handler)
launch_description.add_action(on_DEFAULT_mode)
launch_description.add_action(mode_manager)
launch_description.add_action(launch_testing.util.KeepAliveProc())
launch_description.add_action(launch_testing.actions.ReadyToTest())
launch_description.add_action(drive_base)
launch_description.add_action(drive_base_configure)

return launch_description, locals()
Expand All @@ -116,9 +121,6 @@ class TestModeManagement(unittest.TestCase):
timeout=15
)

import time
time.sleep(1)

@launch_testing.post_shutdown_test()
class TestModeManagementShutdown(unittest.TestCase):

Expand Down
19 changes: 10 additions & 9 deletions test_launch_system_modes/test/system_test.launch.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,14 @@ def generate_test_description():
output='screen')

# Startup
actuation_configure = launch.actions.EmitEvent(
event=launch_system_modes.events.ChangeState(
system_part_matcher=launch.events.matchers.matches_action(actuation),
transition_id=lifecycle_msgs.msg.Transition.TRANSITION_CONFIGURE))
actuation_configure = launch.actions.TimerAction(
period=2.,
actions=[launch.actions.EmitEvent(
event=launch_system_modes.events.ChangeState(
system_part_matcher=launch.events.matchers.matches_action(actuation),
transition_id=lifecycle_msgs.msg.Transition.TRANSITION_CONFIGURE))
]
)

actuation_activate = launch.actions.EmitEvent(
event=launch_system_modes.events.ChangeState(
Expand Down Expand Up @@ -99,15 +103,15 @@ def generate_test_description():
entities=[actuation_change_mode_to_FAST]))

launch_description = LaunchDescription()
launch_description.add_action(launch_testing.util.KeepAliveProc())
launch_description.add_action(launch_testing.actions.ReadyToTest())
launch_description.add_action(mode_manager)
launch_description.add_action(actuation)
launch_description.add_action(drive_base)
launch_description.add_action(manipulator)
launch_description.add_action(on_inactive_handler)
launch_description.add_action(on_active_handler)
launch_description.add_action(on_DEFAULT_mode)
launch_description.add_action(launch_testing.util.KeepAliveProc())
launch_description.add_action(launch_testing.actions.ReadyToTest())
launch_description.add_action(actuation_configure)

return launch_description, locals()
Expand All @@ -129,9 +133,6 @@ class TestModeManagement(unittest.TestCase):
timeout=15
)

import time
time.sleep(1)

@launch_testing.post_shutdown_test()
class TestModeManagementShutdown(unittest.TestCase):

Expand Down