Cargo test ::: specifying features

  1. Running “cargo test” works fine.

  2. I have a number of tests of the form

#[cfg(feature = "gpu")]
pub fn ... {
  1. How do I run the above tests (that require feature gpu)? I have found … which seems to suggest that it is not possible to pass features?[

run cargo test --feature gpu. It’s not possible to have the gpu feature enabled automatically.


Minor typo: it’s --features :slight_smile:
Everything works now. Thanks!