fix(tvix): make rstest pick up new test case files
Context: https://github.com/la10736/rstest/issues/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 <flokli@flokli.de> Tested-by: BuildkiteCI Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
This commit is contained in:
parent
72b9a126b8
commit
34d93f1d96
3 changed files with 17 additions and 1 deletions
|
@ -5,5 +5,10 @@ fn main() {
|
||||||
"cargo:rustc-env=TVIX_CURRENT_SYSTEM={}",
|
"cargo:rustc-env=TVIX_CURRENT_SYSTEM={}",
|
||||||
&env::var("TARGET").unwrap()
|
&env::var("TARGET").unwrap()
|
||||||
);
|
);
|
||||||
println!("cargo:rerun-if-changed-env=TARGET")
|
println!("cargo:rerun-if-changed-env=TARGET");
|
||||||
|
|
||||||
|
// Pick up new test case files
|
||||||
|
// https://github.com/la10736/rstest/issues/256
|
||||||
|
println!("cargo:rerun-if-changed=src/tests/nix_tests");
|
||||||
|
println!("cargo:rerun-if-changed=src/tests/tvix_tests")
|
||||||
}
|
}
|
||||||
|
|
6
tvix/glue/build.rs
Normal file
6
tvix/glue/build.rs
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
fn main() {
|
||||||
|
// Pick up new test case files
|
||||||
|
// https://github.com/la10736/rstest/issues/256
|
||||||
|
println!("cargo:rerun-if-changed=src/tests/nix_tests");
|
||||||
|
println!("cargo:rerun-if-changed=src/tests/tvix_tests")
|
||||||
|
}
|
5
tvix/nix-compat/build.rs
Normal file
5
tvix/nix-compat/build.rs
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
fn main() {
|
||||||
|
// Pick up new test case files
|
||||||
|
// https://github.com/la10736/rstest/issues/256
|
||||||
|
println!("cargo:rerun-if-changed=src/derivation/tests/derivation_tests")
|
||||||
|
}
|
Loading…
Reference in a new issue