-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
Tests fail due to missing CARGO_PKG_NAME when running without cargo #14
Comments
Thanks, I would accept a PR to support non-Cargo test runs as long as it is not too disruptive to the existing implementation. Really I think the coverage runner should define these env vars. |
Can't we just name such crates as "<unnamed crate>" and be done with it? I mean let crate_name = env::var("CARGO_PKG_NAME").unwrap_or("<nameless crate>".into()); |
Another use case is when debugging an integration test. This could be addressed with a documentation note to set the environment variable? To... anything? |
When running test binaries directly, trybuild tests fail because
CARGO_PKG_NAME
is missing. This is e.g. the case when collecting coverage data (example travis build: https://travis-ci.org/PyO3/pyo3/jobs/541071250).Line that requires
CARGO_PKG_NAME
:trybuild/src/run.rs
Line 67 in 2b79660
Full backtrace
The text was updated successfully, but these errors were encountered: