Debian Codegraph @

debian/patches/skip-tests-requiring-source-tree.patch

raw
1 Description: skip integration tests that require source tree write access during autopkgtests
2 Some integration tests use the get_built_root() function which walks
3 up the directory tree from the test executable looking for
4 Cargo.toml. During autopkgtests, the executable runs from a temporary
5 directory but uses files from the cargo, so the tests
6 never find the project's Cargo.toml file and fail with a panic. These
7 tests also require write permissions to the lib directory under the
8 cargo registry.
9 Author: Nadzeya Hutsko <[email protected]>
10 Forwarded: not-needed
11 Last-Update: 2025-09-13
12 ---
13 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
14 --- a/tests/testbox_tests.rs
15 +++ b/tests/testbox_tests.rs
16 @@ -236,6 +236,7 @@ pub unsafe extern "C" fn main() -> ! {
17 }
18
19 #[test]
20 +#[ignore = "require access to the source tree structure and write permissions"]
21 fn unused_override() {
22 for git_feature in git_features_for_bootstrap() {
23 let mut p = Project::new();
24 @@ -261,6 +262,7 @@ fn main() {
25 }
26
27 #[test]
28 +#[ignore = "require access to the source tree structure and write permissions"]
29 fn minimal_testbox() {
30 let mut p = Project::new();
31
32 @@ -421,6 +423,7 @@ fn main() {
33 }
34
35 #[test]
36 +#[ignore = "require access to the source tree structure and write permissions"]
37 fn simple_workspace() {
38 let mut p = Project::new();
39 let built_root = get_built_root();
40 @@ -466,6 +469,7 @@ fn main() {
41 feature = "chrono",
42 feature = "semver"
43 ))]
44 +#[ignore = "require access to the source tree structure and write permissions"]
45 fn full_testbox() {
46 for git_feature in git_features() {
47 let mut p = Project::new();
48 @@ -587,6 +591,7 @@ fn main() {{
49 feature = "chrono",
50 feature = "semver"
51 ))]
52 +#[ignore = "require access to the source tree structure and write permissions"]
53 fn overridden_testbox() {
54 for git_feature in git_features() {
55 let mut p = Project::new();
56 @@ -958,6 +963,7 @@ fn main() {
57
58 #[test]
59 #[cfg(feature = "chrono")]
60 +#[ignore = "require access to the source tree structure and write permissions"]
61 fn source_date_epoch() {
62 let mut p = Project::new();
63 let built_root = get_built_root();
64 @@ -1008,6 +1014,7 @@ fn main() {
65
66 #[test]
67 #[cfg(any(feature = "git2", feature = "gix"))]
68 +#[ignore = "require access to the source tree structure and write permissions"]
69 fn git_no_git() {
70 for git_feature in git_features_for_bootstrap() {
71 // `root` isn't even a git-repo
72 @@ -1032,6 +1039,7 @@ fn main() {
73
74 #[test]
75 #[cfg(feature = "git2")]
76 +#[ignore = "require access to the source tree structure and write permissions"]
77 fn clean_then_dirty_git() {
78 for git_feature in git_features_for_bootstrap() {
79 let mut p = Project::new();
80 @@ -1106,6 +1114,7 @@ fn main() {
81
82 #[test]
83 #[cfg(feature = "git2")]
84 +#[ignore = "require access to the source tree structure and write permissions"]
85 fn empty_git() {
86 for git_feature in git_features_for_bootstrap() {
87 // Issue #7, git can be there and still fail
88 @@ -1129,6 +1138,7 @@ fn main() {
89
90 #[cfg(target_os = "windows")]
91 #[test]
92 +#[ignore = "require access to the source tree structure and write permissions"]
93 fn absolute_paths() {
94 // Issue #35. Usually binaries we refer to are simply executables names but sometimes they are
95 // absolute paths, containing backslashes, and everything gets sad on this devilish platform.