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

[add_launch_test] Correct default python executable for windows debug #239

Conversation

ivanpauno
Copy link
Member

Just what the title says.

@hidmic I think that your original request was doing this in each of the places where add_launch_test is used, but I really think this should be the default behavior. What do you think?

And maybe, we should apply a similar change to ament_add_pytest_test ...

@ivanpauno ivanpauno added the in review Waiting for review (Kanban column) label May 16, 2019
@ivanpauno ivanpauno requested a review from hidmic May 16, 2019 15:19
@ivanpauno ivanpauno self-assigned this May 16, 2019
@hidmic
Copy link
Contributor

hidmic commented May 16, 2019

Hmm, silently ignoring a user provided argument doesn't sound like a good idea. But I see your point, in which case we might as well remove the argument and remove use cases throughout the codebase.

I do wonder why this isn't the case for ament_add_pytest_test(...), as there may be a justification we're not seeing behind that design choice. Maybe @dirk-thomas can shed some light.

@ivanpauno
Copy link
Member Author

Hmm, silently ignoring a user provided argument doesn't sound like a good idea. But I see your point, in which case we might as well remove the argument and remove use cases throughout the codebase.

I do wonder why this isn't the case for ament_add_pytest_test(...), as there may be a justification we're not seeing behind that design choice. Maybe @dirk-thomas can shed some light.

I'm not ignoring the user argument ... it's inside an 'if(NOT _add_launch_test_PYTHON_EXECUTABLE)'.
I'm only changing the default behavior when that argument is not passed.

@hidmic
Copy link
Contributor

hidmic commented May 16, 2019

Oops, I misread the patch :) Anyways, the question as to why this isn't implemented in ament_add_pytest_test(...) stands.

@ivanpauno
Copy link
Member Author

Oops, I misread the patch :) Anyways, the question as to why this isn't implemented in ament_add_pytest_test(...) stands.

Just to provide more context about ament_add_pytest_test, here is an existing workaround for windows-debug builds:
https://github.com/ros2/system_tests/blob/8484bbaae8f620196d97bae6c043af039ec98ba0/test_cli/CMakeLists.txt#L7-L41
And this is how it handles the PYTHON_EXECUTABLE argument:
https://github.com/ament/ament_cmake/blob/54eb418e4c262d4b657cc8eaecc1f88a8907bc8e/ament_cmake_pytest/cmake/ament_add_pytest_test.cmake#L66-L68

ivanpauno and others added 2 commits May 18, 2019 13:21
Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@jacobperron jacobperron force-pushed the ivanpauno/add-launch-testing-python-executable-windows-debug branch from 5102f42 to 5ec8e9b Compare May 19, 2019 20:22
@jacobperron
Copy link
Member

I've fixed conflicts with master. I've also fixed another bug 5ec8e9b.

This should resolve ros2/build_farmer#200

@jacobperron
Copy link
Member

CI with build type Debug:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Copy link
Contributor

@hidmic hidmic left a comment

Choose a reason for hiding this comment

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

LGTM

@jacobperron jacobperron merged commit 09d0952 into master May 20, 2019
@delete-merged-branch delete-merged-branch bot deleted the ivanpauno/add-launch-testing-python-executable-windows-debug branch May 20, 2019 15:59
@jacobperron
Copy link
Member

I do wonder why this isn't the case for ament_add_pytest_test(...), as there may be a justification we're not seeing behind that design choice.

I believe something similar should be done in ament_add_pytest_test() as well. I believe that is the cause of the similar test failures for rqt_* packages. E.g. https://ci.ros2.org/job/ci_windows/6980/testReport/junit/rqt_py_common.test.test_rqt_common_unit/TestMessageTreeModel/test_path_names/

I'm looking into it.

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.

None yet

4 participants