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

Refactor smoke test to make WebSocket test harness reusable #675

Merged
merged 2 commits into from
Nov 5, 2021

Conversation

jtbandes
Copy link
Member

@jtbandes jtbandes commented Nov 5, 2021

Public API Changes
None

Description
Factor out the ROS and Twisted setup code from the smoke test, so we can reuse it for other tests in the future.

from twisted.python import log

log.startLogging(sys.stderr)
sys.path.append(os.path.dirname(__file__)) # enable importing from common.py in this directory
Copy link
Member Author

Choose a reason for hiding this comment

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

There might be a better way to make this import work but I wasn't aware of one. For comparison, the rosbag2 tests use APPEND_ENV PYTHONPATH=${CMAKE_CURRENT_SOURCE_DIR} in their CMake rules, but we're using add_launch_test() in this package which doesn't seem to support the same flags. cc @emersonknapp

https://github.com/ros2/rosbag2/blob/ccc0a9ccd7991348f5b91b29f7f267336f17016f/rosbag2_py/CMakeLists.txt#L163-L168

@jtbandes jtbandes merged commit 43871b4 into ros2 Nov 5, 2021
@jtbandes jtbandes deleted the jacob/smoke-refactor branch November 5, 2021 20:06
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.

None yet

1 participant