-
Notifications
You must be signed in to change notification settings - Fork 49
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
New test files are only recognized after cargo clean
#256
Comments
Unfortunately is not possible to automatize it without writing a But, I'll investigate how to write it and document how to add this support to the project: the idea here is to navigate the code find the |
Do you have an example for an |
No, it's just an idea sketch ... I'll try to write it next weeks (I've not too much time to work on it). I've putted it here just as my notes. |
Ok, I've studied it a little bit and I found that there's a simple solution that should work in the 99% of the cases with just a little effort. Suppose that you have a project where your test files live in println!("cargo::rerun-if-changed=my/resource/folder") You can add a line like this for every folder you need to watch. Follow a concrete example where your tests files live in pub fn main() {
println!("cargo::rerun-if-changed=resource/tests")
println!("cargo::rerun-if-changed=integration_tests/examples")
} Maybe in the future I'll write a create to une in |
Context: la10736/rstest#256 Cargo will now cause a rebuild whenever a new test case file is added. Previsouly running `cargo test` after adding a new test case resulted in that case not being picked up and ignored. Change-Id: Ibfc420b5bfe3f3ee41d3ebd3fb9d248819fa6ed9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11751 Reviewed-by: flokli <[email protected]> Tested-by: BuildkiteCI Autosubmit: Ilan Joselevich <[email protected]>
I have a test with the
files
macro:When add/remove a test file,
cargo test
only shows the updated tests after acargo clean
.Is this by design, a bug, or a user error?
The text was updated successfully, but these errors were encountered: