-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
target.cfg()
section in config doesn't seem to detect test
option
#11382
Labels
C-bug
Category: bug
Comments
Thanks for the report! I believe this is a duplicate of #8170, so closing in favor of that. Cargo should probably be issuing a warning for keys that it doesn't support. It has this ability for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
I have a use case where I want to have two different runners depending on run/test mode. I tried to create following configuration file:
This however doesn't work and cargo always executes
runner.sh
. Documentation says that I can use a cfg() expression and it shows here that I can usetest
value to detect if runner was executed bycargo test
.As far I understand this is either a cargo bug, or misleading documentation. If it is the former, I would like to report it. And if it is the latter I would ask for updating documentation and possibly telling me if I can achieve my objective in a different way (other than analyzing executable path name).
Steps
runner.sh
andtest-runner.sh
in the root of new project..cargo/toml
with contents as above.cargo run
andcargo test
and observe how the latter doesn't work.Possible Solution(s)
No response
Notes
This happens on all
stable
,beta
andnightly
release channels.Version
The text was updated successfully, but these errors were encountered: