You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use a mixin for the test-result verb that sets --test-result-base argument. When running colcon test-result in my workspace, the mixin value for the argument is ignored and colcon exits early.
I have tried with and without this argument in the test verb, as well as having this arg present in test but not in test-result. They both produce the error. Not 100% sure what the difference is but it doesn't seem to affect this issue. I see this PR and linked issue but it doesn't shed much light to me as to why this arg is different from test-results
If I set the value via my defaults.yaml everything works.
My Root Causing
Now I've done a bit of root causing and I believe the issue is because after parsing the defaults.yaml colcon will attempt to parse the current args before loading the mixin arg values.
This error is then being thrown because in this package, --test-result-base is registered with a custom type which throws an exception if a path doesn't exist
This should have been resolved by colcon/colcon-mixin#37 which was released a while back. Can you confirm whether you're still experiencing the misbehavior?
Steps to Reproduce
I'm trying to use a mixin for the
test-result
verb that sets--test-result-base
argument. When runningcolcon test-result
in my workspace, the mixin value for the argument is ignored and colcon exits early.linux.mixin
I have tried with and without this argument in the
test
verb, as well as having this arg present intest
but not intest-result
. They both produce the error. Not 100% sure what the difference is but it doesn't seem to affect this issue. I see this PR and linked issue but it doesn't shed much light to me as to why this arg is different from test-resultsdefaults.yaml
My mixin is loaded correctly via
colcon mixin
And finally running
colcon test-result
If I set the value via my
defaults.yaml
everything works.My Root Causing
Now I've done a bit of root causing and I believe the issue is because after parsing the
defaults.yaml
colcon will attempt to parse the current args before loading the mixin arg values.This error is then being thrown because in this package,
--test-result-base
is registered with a custom type which throws an exception if a path doesn't existcolcon-test-result/colcon_test_result/verb/test_result.py
Line 30 in 5bbb7bf
I did a search on github to see if any other colcon path arguments had this same issue and it seems like this one is unique
https://github.com/search?q=org%3Acolcon+type%3D_argparse_existing_dir%2C&type=code
It seems like the fix is to remove this type parameter when registering the type, but I'm not sure if
test-result
depends on that behavior somehow.The text was updated successfully, but these errors were encountered: