Skip to content

avoid custom working directory - #147

Merged
dirk-thomas merged 1 commit into
masterfrom
remove_working_directory_from_test
Nov 15, 2017
Merged

dirk-thomas merged 1 commit into
masterfrom
remove_working_directory_from_test

Conversation

@dirk-thomas

@dirk-thomas dirk-thomas commented Nov 14, 2017 •

Copy link
Copy Markdown
Member

@dirk-thomas dirk-thomas added the in review Waiting for review (Kanban column) label Nov 14, 2017
@dirk-thomas dirk-thomas self-assigned this Nov 14, 2017
@mikaelarguedas

Copy link
Copy Markdown
Member

I think I missed something here. Isnt the grouping exactly the same as in http://ci.ros2.org/job/ci_linux/3515/testReport/ ?
On the bright side I can now access the test results for all these tests so that's the most important improvement 👍

@dirk-thomas

Copy link
Copy Markdown
Member Author

I think I missed something here. Isnt the grouping exactly the same as in http://ci.ros2.org/job/ci_linux/3515/testReport/ ?

The old test report lists the tests with rclpy.src.ros2.rclpy.rclpy.test* while the new one lists them as rclpy.test*.

@mikaelarguedas

Copy link
Copy Markdown
Member

The old test report lists the tests with rclpy.src.ros2.rclpy.rclpy.test* while the new one lists them as rclpy.test*.

Oh yeah my bad, I was expecting all of them to be under a single rclpy folder and I just compared the number of folders and not the names

@mikaelarguedas mikaelarguedas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Changes look good to me, I think it's worth waiting a Windows CI to complete before merging.
Few question/nitpicks below

Comment thread rclpy/CMakeLists.txt
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}"
APPEND_ENV AMENT_PREFIX_PATH=${ament_index_build_path}
PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

weird indent ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

PYTHONPATH is a value to the multi-value argument APPEND_ENV. Therefore I used the extra one level indentation. If anyone would like to change this please feel free to do so.

Comment thread rclpy/CMakeLists.txt
LIBRARY_OUTPUT_DIRECTORY${_build_type} "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}"
RUNTIME_OUTPUT_DIRECTORY${_build_type} "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}"
LIBRARY_OUTPUT_DIRECTORY${_build_type} "${CMAKE_CURRENT_BINARY_DIR}/test_${PROJECT_NAME}"
RUNTIME_OUTPUT_DIRECTORY${_build_type} "${CMAKE_CURRENT_BINARY_DIR}/test_${PROJECT_NAME}"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It looks a bit weird to me that if I build without build_testing all my rclpy libraries go to this test_rclpy folder. Then they'll be install at the right place at the end of the day so I guess it's fine

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The directory can have any name except rclpy. I used the test_ prefix since it is being used during testing. But any other name (which isn't likely to collide with other packages) would be fine.

Comment thread rclpy/rclpy/__init__.py

def create_node(node_name, *, namespace=None):
# imported locally to avoid loading extensions on module import
from rclpy.node import Node

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is delaying the import a necessary change with the new approach, or an additional feature?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It is necessary since the node module already imports the singleton module. But we need to delay the instantiation of the singletons until we had a chance to override the _import functions.

@mikaelarguedas

Copy link
Copy Markdown
Member

This seems to have a warning on windows. But Jenkins displays this job weirdly and when you click on the warning it brings you to a page saying 0 warnings o_O

@dirk-thomas

Copy link
Copy Markdown
Member Author

A retriggered Windows build looks fine: Build Status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in review Waiting for review (Kanban column)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants