You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say I have a whole bunch of .rs files in my tests folder, like:
floats/lib.rs
time.rs
thread.rs
...
Now I want to run just the float tests. Naturally I'll do something like cargo test -- float. Sadly that does not work since this runs the tests that have float as a substring in the name of the test (mod1::mod2::test_fn), but the name of the crate is not included.
This is particularly confusing in the rustc repo itself, where ./x test library/{core,std} -- float will run the float tests in libcore but not the one in libstd: libcore has a single large test crate with a module called floats, while std has a bunch of separate test crates, one of which is called floats.
I think libtest should be changed to put the crate name in the string used for filtering, thus avoiding this confusing and surprising behavior.