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

Capture all Cobra results #14

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

Ronoman
Copy link

@Ronoman Ronoman commented Nov 23, 2022

When Cobra is run, it generates an _Autosar_.txt file in the spaceros_ws/src/<pkg>/ directory, for the package its currently testing. In ament_cobra/main.py, we invoke Cobra multiple times. However, each time Cobra is run, it overwrites this _Autosar_.txt file. These commits accomplish a few things:

  1. Bump Cobra version to the most recent
  2. Resolve the above issue by aggregating Cobra output on each Cobra invocation in ament_cobra/main.py

There are a few things that still need to be included in this PR:

  1. Bump Cobra to newer version once a few issues are resolved
  2. Update version tag in CMakeLists.txt

However, the present changes are (I hope) the most significant ones, and I think they're ready for review.

@mjeronimo


input_filename = ruleset_to_filename[args.ruleset]

# Remove old input_filename, if it exists.
Copy link
Author

Choose a reason for hiding this comment

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

I don't like this, but it's needed in Cobra's current implementation. Cobra dumps a _Autosar_.txt file in spaceros_ws/src/<pkg>/ directory. Is it worth asking Cobra maintainers to update this to optionally take an extra command-line parameter, so this file can instead be put in a better location (say, somewhere in spaceros_ws/build/<pkg>/test_results/)?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, I think that's a good idea. They've been pretty responsive so far. We could also just add the option to Cobra and submit a PR to their repo.

Signed-off-by: Eli Benevedes <[email protected]>

input_filename = ruleset_to_filename[args.ruleset]

# Remove old input_filename, if it exists.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, I think that's a good idea. They've been pretty responsive so far. We could also just add the option to Cobra and submit a PR to their repo.

@mjeronimo mjeronimo changed the title Draft: Capture all Cobra results Capture all Cobra results May 16, 2023
@mjeronimo mjeronimo added help wanted Extra attention is needed and removed help wanted Extra attention is needed labels May 16, 2023
@ivanperez-keera
Copy link
Collaborator

This PR was approved but never merged. I see that there was an intention to change something in Cobra. Did it ever happen? If so, can this be merged or are further changes needed?

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.

3 participants