Closed
Description
Currently Cargo + test harness allow to easily identify a test inside the crate by specifying a ::
separated path. However this does not uniquely identify a test, because it may live in different crates.
Today, cargo provides --lib
, --bin name
, --example name
etc flags to select a test binary. I think this is a bit suboptimal:
- there are different flags to do essentially the same
- this is not machine friendly: we'd needed a bit of boilerplate in IntelliJ Rust to sort the flags out (and the initial version contained a bug, because I didn't noticed that you must not provide a package name with
--lib
) - this is not UI friendly, it's difficult to provide a test name which can be just copy pasted into the shell
- it is not clear how this should be extended to workspaces, where you'd need to identify a package as well.
So perhaps we need to invent some kind of fully-qualified test name? Something along the lines of ::package_name::target_withing_a_package::harness_specific_name
?