| 1 |
Description: Skip tests that need unpackaged test-helper git |
| 2 |
Author: Simon Quigley <[email protected]> |
| 3 |
Origin: vendor |
| 4 |
Forwarded: not-needed |
| 5 |
Last-Update: 2026-08-19 |
| 6 |
--- |
| 7 |
--- a/src/gen/tests/track_size.rs |
| 8 |
+++ b/src/gen/tests/track_size.rs |
| 9 |
@@ -89,8 +89,8 @@ fn track_size() { |
| 10 |
write_size::<crate::value::Value<()>>(&mut out); |
| 11 |
write_size::<crate::value::Definition>(&mut out); |
| 12 |
write_size::<crate::walk::Walk<'_>>(&mut out); |
| 13 |
- test_helper::git::assert_diff( |
| 14 |
+ /* test_helper::git::assert_diff( |
| 15 |
Path::new(env!("CARGO_MANIFEST_DIR")).join("src/gen/tests/track_size.txt"), |
| 16 |
out, |
| 17 |
- ); |
| 18 |
+ ); */ |
| 19 |
} |
| 20 |
--- a/tests/helper/mod.rs |
| 21 |
+++ b/tests/helper/mod.rs |
| 22 |
@@ -11,6 +11,7 @@ pub(crate) fn fixtures_dir() -> &'static |
| 23 |
Path::new(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/fixtures")) |
| 24 |
} |
| 25 |
|
| 26 |
+#[cfg(any())] // unpackaged test-helper git |
| 27 |
#[track_caller] |
| 28 |
pub(crate) fn test_project(model: &str) -> (tempfile::TempDir, PathBuf) { |
| 29 |
let tmpdir = tempfile::tempdir().unwrap(); |
| 30 |
--- a/tests/test.rs |
| 31 |
+++ b/tests/test.rs |
| 32 |
@@ -18,6 +18,7 @@ fn test_options() -> ResolveOptions { |
| 33 |
.rustc(PathAndArgs::new("rustc")) |
| 34 |
} |
| 35 |
|
| 36 |
+#[cfg(any())] // unpackaged test-helper git |
| 37 |
fn assert_reference_example(de: fn(&Path, ResolveOptions) -> Result<Config, Error>) { |
| 38 |
let (_tmp, root) = test_project("reference"); |
| 39 |
let dir = &root; |
| 40 |
@@ -277,6 +278,7 @@ fn easy_load(dir: &Path, options: Resolv |
| 41 |
} |
| 42 |
#[test] |
| 43 |
#[cfg_attr(miri, ignore)] // Miri doesn't support std::process::Command: https://github.com/rust-lang/miri/issues/3374 |
| 44 |
+#[cfg(any())] // unpackaged test-helper git |
| 45 |
fn easy() { |
| 46 |
use easy_load as de; |
| 47 |
|
| 48 |
@@ -295,6 +297,7 @@ fn no_manifest_dir() { |
| 49 |
|
| 50 |
#[test] |
| 51 |
#[cfg_attr(miri, ignore)] // Miri doesn't support std::process::Command: https://github.com/rust-lang/miri/issues/3374 |
| 52 |
+#[cfg(any())] // unpackaged test-helper git |
| 53 |
fn empty_target_flags_fall_back_to_build() { |
| 54 |
let (_tmp, root) = test_project("empty"); |
| 55 |
fs::write( |
| 56 |
@@ -336,6 +339,7 @@ fn flags_from_encoded() { |
| 57 |
|
| 58 |
#[test] |
| 59 |
#[cfg_attr(miri, ignore)] // Miri doesn't support std::process::Command: https://github.com/rust-lang/miri/issues/3374 |
| 60 |
+#[cfg(any())] // unpackaged test-helper git |
| 61 |
fn empty_encoded_flags_override_other_sources() { |
| 62 |
let (_tmp, root) = test_project("empty"); |
| 63 |
fs::write( |
| 64 |
@@ -364,6 +368,7 @@ fn de_load(dir: &Path, _cx: ResolveOptio |
| 65 |
} |
| 66 |
#[test] |
| 67 |
#[cfg_attr(miri, ignore)] // Miri doesn't support std::process::Command: https://github.com/rust-lang/miri/issues/3374 |
| 68 |
+#[cfg(any())] // unpackaged test-helper git |
| 69 |
fn de() { |
| 70 |
use de_load as de; |
| 71 |
|
| 72 |
@@ -380,6 +385,7 @@ fn de() { |
| 73 |
#[rustversion::attr(not(nightly), ignore)] |
| 74 |
#[test] |
| 75 |
#[cfg_attr(miri, ignore)] // Miri doesn't support std::process::Command: https://github.com/rust-lang/miri/issues/3374 |
| 76 |
+#[cfg(any())] // unpackaged test-helper git |
| 77 |
fn custom_target() { |
| 78 |
use easy_load as de; |
| 79 |
struct IsBuiltin(bool); |
| 80 |
@@ -443,6 +449,7 @@ fn custom_target() { |
| 81 |
|
| 82 |
#[test] |
| 83 |
#[cfg_attr(miri, ignore)] // Miri doesn't support std::process::Command: https://github.com/rust-lang/miri/issues/3374 |
| 84 |
+#[cfg(any())] // unpackaged test-helper git |
| 85 |
fn target_cfg_boolean_literals() { |
| 86 |
let (_tmp, root) = test_project("empty"); |
| 87 |
fs::write( |
| 88 |
@@ -473,6 +480,7 @@ fn target_cfg_boolean_literals() { |
| 89 |
|
| 90 |
#[test] |
| 91 |
#[cfg_attr(miri, ignore)] // Miri doesn't support std::process::Command: https://github.com/rust-lang/miri/issues/3374 |
| 92 |
+#[cfg(any())] // unpackaged test-helper git |
| 93 |
fn empty_target_cfg_expression_does_not_match() { |
| 94 |
let (_tmp, root) = test_project("empty"); |
| 95 |
fs::write( |
| 96 |
@@ -529,6 +537,7 @@ fn cargo_config_json() { |
| 97 |
|
| 98 |
#[test] |
| 99 |
#[cfg_attr(miri, ignore)] // Miri doesn't support std::process::Command: https://github.com/rust-lang/miri/issues/3374 |
| 100 |
+#[cfg(any())] // unpackaged test-helper git |
| 101 |
fn test_cargo_behavior() { |
| 102 |
let (_tmp, root) = test_project("empty"); |
| 103 |
let dir = &root; |
| 104 |
--- a/src/resolve.rs |
| 105 |
+++ b/src/resolve.rs |
| 106 |
@@ -889,6 +889,7 @@ mod tests { |
| 107 |
|
| 108 |
#[test] |
| 109 |
#[cfg_attr(miri, ignore)] // Miri is too slow |
| 110 |
+ #[ignore = "requires tools/gen/cfg"] |
| 111 |
fn parse_cfg_list_all() { |
| 112 |
let mut list = String::new(); |
| 113 |
for e in fs::read_dir(Path::new(env!("CARGO_MANIFEST_DIR")).join("tools/gen/cfg")).unwrap() |