Description: Skip tests that need unpackaged test-helper git Author: Simon Quigley Origin: vendor Forwarded: not-needed Last-Update: 2026-08-19 --- --- a/src/gen/tests/track_size.rs +++ b/src/gen/tests/track_size.rs @@ -89,8 +89,8 @@ fn track_size() { write_size::>(&mut out); write_size::(&mut out); write_size::>(&mut out); - test_helper::git::assert_diff( + /* test_helper::git::assert_diff( Path::new(env!("CARGO_MANIFEST_DIR")).join("src/gen/tests/track_size.txt"), out, - ); + ); */ } --- a/tests/helper/mod.rs +++ b/tests/helper/mod.rs @@ -11,6 +11,7 @@ pub(crate) fn fixtures_dir() -> &'static Path::new(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/fixtures")) } +#[cfg(any())] // unpackaged test-helper git #[track_caller] pub(crate) fn test_project(model: &str) -> (tempfile::TempDir, PathBuf) { let tmpdir = tempfile::tempdir().unwrap(); --- a/tests/test.rs +++ b/tests/test.rs @@ -18,6 +18,7 @@ fn test_options() -> ResolveOptions { .rustc(PathAndArgs::new("rustc")) } +#[cfg(any())] // unpackaged test-helper git fn assert_reference_example(de: fn(&Path, ResolveOptions) -> Result) { let (_tmp, root) = test_project("reference"); let dir = &root; @@ -277,6 +278,7 @@ fn easy_load(dir: &Path, options: Resolv } #[test] #[cfg_attr(miri, ignore)] // Miri doesn't support std::process::Command: https://github.com/rust-lang/miri/issues/3374 +#[cfg(any())] // unpackaged test-helper git fn easy() { use easy_load as de; @@ -295,6 +297,7 @@ fn no_manifest_dir() { #[test] #[cfg_attr(miri, ignore)] // Miri doesn't support std::process::Command: https://github.com/rust-lang/miri/issues/3374 +#[cfg(any())] // unpackaged test-helper git fn empty_target_flags_fall_back_to_build() { let (_tmp, root) = test_project("empty"); fs::write( @@ -336,6 +339,7 @@ fn flags_from_encoded() { #[test] #[cfg_attr(miri, ignore)] // Miri doesn't support std::process::Command: https://github.com/rust-lang/miri/issues/3374 +#[cfg(any())] // unpackaged test-helper git fn empty_encoded_flags_override_other_sources() { let (_tmp, root) = test_project("empty"); fs::write( @@ -364,6 +368,7 @@ fn de_load(dir: &Path, _cx: ResolveOptio } #[test] #[cfg_attr(miri, ignore)] // Miri doesn't support std::process::Command: https://github.com/rust-lang/miri/issues/3374 +#[cfg(any())] // unpackaged test-helper git fn de() { use de_load as de; @@ -380,6 +385,7 @@ fn de() { #[rustversion::attr(not(nightly), ignore)] #[test] #[cfg_attr(miri, ignore)] // Miri doesn't support std::process::Command: https://github.com/rust-lang/miri/issues/3374 +#[cfg(any())] // unpackaged test-helper git fn custom_target() { use easy_load as de; struct IsBuiltin(bool); @@ -443,6 +449,7 @@ fn custom_target() { #[test] #[cfg_attr(miri, ignore)] // Miri doesn't support std::process::Command: https://github.com/rust-lang/miri/issues/3374 +#[cfg(any())] // unpackaged test-helper git fn target_cfg_boolean_literals() { let (_tmp, root) = test_project("empty"); fs::write( @@ -473,6 +480,7 @@ fn target_cfg_boolean_literals() { #[test] #[cfg_attr(miri, ignore)] // Miri doesn't support std::process::Command: https://github.com/rust-lang/miri/issues/3374 +#[cfg(any())] // unpackaged test-helper git fn empty_target_cfg_expression_does_not_match() { let (_tmp, root) = test_project("empty"); fs::write( @@ -529,6 +537,7 @@ fn cargo_config_json() { #[test] #[cfg_attr(miri, ignore)] // Miri doesn't support std::process::Command: https://github.com/rust-lang/miri/issues/3374 +#[cfg(any())] // unpackaged test-helper git fn test_cargo_behavior() { let (_tmp, root) = test_project("empty"); let dir = &root; --- a/src/resolve.rs +++ b/src/resolve.rs @@ -889,6 +889,7 @@ mod tests { #[test] #[cfg_attr(miri, ignore)] // Miri is too slow + #[ignore = "requires tools/gen/cfg"] fn parse_cfg_list_all() { let mut list = String::new(); for e in fs::read_dir(Path::new(env!("CARGO_MANIFEST_DIR")).join("tools/gen/cfg")).unwrap()