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

Ensure using correct rmw implementation in tests #66

Merged
merged 3 commits into from
May 25, 2016
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: 2 additions & 1 deletion intra_process_demo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ if(BUILD_TESTING)

ament_add_nose_test(test_demo_${exe_list_underscore}${target_suffix}
"${CMAKE_CURRENT_BINARY_DIR}/test_${exe_list_underscore}${target_suffix}_$<CONFIGURATION>.py"
TIMEOUT 30)
TIMEOUT 30
ENV RCL_ASSERT_RMW_ID_MATCHES=${rmw_implementation})
set_tests_properties(test_demo_${exe_list_underscore}${target_suffix}
PROPERTIES DEPENDS "test_demo_${exe_list_underscore}${target_suffix} test_demo_${exe_list_underscore}${target_suffix}")
endforeach()
Expand Down
6 changes: 4 additions & 2 deletions pendulum_control/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,15 @@ if(BUILD_TESTING)

ament_add_nose_test(test_demo_pendulum__${middleware_impl}
"${CMAKE_CURRENT_BINARY_DIR}/test_pendulum__${middleware_impl}.py"
TIMEOUT 20)
TIMEOUT 20
ENV RCL_ASSERT_RMW_ID_MATCHES=${middleware_impl})
set_tests_properties(test_demo_pendulum__${middleware_impl}
PROPERTIES DEPENDS "test_demo_pendulum__${middleware_impl} test_demo_pendulum__${middleware_impl}")

ament_add_nose_test(test_demo_pendulum_teleop__${middleware_impl}
"${CMAKE_CURRENT_BINARY_DIR}/test_pendulum_teleop__${middleware_impl}.py"
TIMEOUT 20)
TIMEOUT 20
ENV RCL_ASSERT_RMW_ID_MATCHES=${middleware_impl})
set_tests_properties(test_demo_pendulum_teleop__${middleware_impl}
PROPERTIES DEPENDS "test_demo_pendulum_teleop__${middleware_impl} test_demo_pendulum_teleop__${middleware_impl}")
endif()
Expand Down
7 changes: 5 additions & 2 deletions pendulum_control/test/test_pendulum_demo.py.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import os

from launch import LaunchDescriptor
from launch.exit_handler import ignore_exit_handler
from launch.launcher import DefaultLauncher
from launch.output_handler import ConsoleOutput

from launch_testing import create_handler


Expand All @@ -24,7 +27,7 @@ def test_executable():
cmd=[pendulum_logger_executable],
name=pendulum_logger_name,
exit_handler=ignore_exit_handler,
output_handlers=[pendulum_logger_handler],
output_handlers=[pendulum_logger_handler, ConsoleOutput()],
)

pendulum_demo_executable = '@RCLCPP_DEMO_PENDULUM_DEMO_EXECUTABLE@'
Expand All @@ -37,7 +40,7 @@ def test_executable():
cmd=[pendulum_demo_executable, '-i', '1000'],
name=pendulum_demo_name,
exit_handler=ignore_exit_handler,
output_handlers=[pendulum_demo_handler],
output_handlers=[pendulum_demo_handler, ConsoleOutput()],
)

launcher = DefaultLauncher()
Expand Down
6 changes: 4 additions & 2 deletions pendulum_control/test/test_pendulum_teleop.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import sys
from launch import LaunchDescriptor
from launch.exit_handler import ignore_exit_handler
from launch.launcher import DefaultLauncher
from launch.output_handler import ConsoleOutput

from launch_testing import create_handler


Expand All @@ -26,7 +28,7 @@ def test_executable():
cmd=[pendulum_demo_executable, '-i', '0'],
name=pendulum_demo_name,
exit_handler=ignore_exit_handler,
output_handlers=[pendulum_demo_handler],
output_handlers=[pendulum_demo_handler, ConsoleOutput()],
)

pendulum_teleop_executable = '@RCLCPP_DEMO_PENDULUM_TELEOP_EXECUTABLE@'
Expand All @@ -42,7 +44,7 @@ def test_executable():
cmd=[sys.executable, execute_with_delay_command, '500', pendulum_teleop_executable, '100'],
name=pendulum_teleop_name,
exit_handler=ignore_exit_handler,
output_handlers=[pendulum_teleop_handler],
output_handlers=[pendulum_teleop_handler, ConsoleOutput()],
)

launcher = DefaultLauncher()
Expand Down