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 NOCAPTURE option to ament_add_pytest_test #393

Merged
merged 1 commit into from
Jul 19, 2022

Conversation

jacobperron
Copy link
Contributor

This lets the user pass the '-s' option to pytest so we can see all test process output in the console.

Can be useful for debugging.

@jacobperron jacobperron added the enhancement New feature or request label Jul 18, 2022
This lets the user pass the '-s' option to pytest so we can see all test process output in the console.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@jacobperron jacobperron force-pushed the jacob/ament_add_pytest_nocapture branch from a7a1f45 to f37d194 Compare July 18, 2022 19:41
Copy link
Contributor

@wjwwood wjwwood left a comment

Choose a reason for hiding this comment

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

This seems fine to me, but for the purposes of debugging, it seems like it would be more useful to enable/disable this when invoking the test runner somehow, rather than changing a CMake variable, thus requiring you to rerun cmake.

I'm not sure on what the correct mechanism should be, but maybe a flag given to ctest via colcon's --ctest-args option, or maybe an environment variable?

But, that's more of a "yes and" suggestion, so this lgtm

@jacobperron
Copy link
Contributor Author

Yes, I agree. It would be nice to be able to pass pytest args from colcon, but I'm also not sure on the mechanism. I guess ament could expose a set of well known cmake arguments, e.g. -DAMENT_CMAKE_PYTEST="-s -We". Or they could be very specific, like -DAMENT_CMAKE_PYTEST_NO_CAPTURE=ON.

@jacobperron
Copy link
Contributor Author

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

@jacobperron jacobperron merged commit 65a3ad5 into rolling Jul 19, 2022
@delete-merged-branch delete-merged-branch bot deleted the jacob/ament_add_pytest_nocapture branch July 19, 2022 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants