nix-community / crate2nix

rebuild only changed crates in CI with crate2nix and nix
https://nix-community.github.io/crate2nix/
Apache License 2.0
338 stars 82 forks source link

Run tests in debug mode #301

Open edef1c opened 9 months ago

edef1c commented 9 months ago

Previously, crate2nix tests were run equivalently to cargo test --release, which is a somewhat unusual default configuration.

It might be worth having a flag to tweak this behaviour, similar to Cargo. A more ambitious version yet would permit running both debug and release versions of the tests. I'm not sure what the best interface for either of those is.

kolloch commented 9 months ago

Hi @edef1c!

I also think it should be configurable. Usually, I execute tests locally with cargo in debug mode but then in CI in release mode. Depends quite on the test. Obviously, model tests or the like profit from release mode more than others.

I haven't worked on crate2nix for a while and will first invest in flakifying it and making it work on Mac OS again (which I am using currently). But I'd be interested in hearing how such an interface could look like!