mirror of
https://git.proxmox.com/git/debcargo-conf
synced 2025-04-28 13:09:51 +00:00
gix-path - fix tests.
(cherry picked from commit 323e259e9aa6550d66551dc4e53996a0e2d714b1)
This commit is contained in:
parent
460b40ac50
commit
81b74e3ac6
@ -1,3 +1,14 @@
|
||||
rust-gix-path (0.10.11-2) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium
|
||||
|
||||
* Team upload.
|
||||
* Package gix-path 0.10.11 from crates.io using debcargo 2.6.1
|
||||
* Disable tests that require on the gix-test crate which is not in Debian.
|
||||
* Remove windows-specific dev-dependencies.
|
||||
* Relax dev-dependency on serial-test.
|
||||
* Disable test that only works if run within a git repository.
|
||||
|
||||
-- Peter Michael Green <plugwash@debian.org> Wed, 18 Sep 2024 08:49:50 +0000
|
||||
|
||||
rust-gix-path (0.10.11-1) unstable; urgency=medium
|
||||
|
||||
* Team upload.
|
||||
|
@ -0,0 +1,18 @@
|
||||
Index: gix-path/src/env/git/tests.rs
|
||||
===================================================================
|
||||
--- gix-path.orig/src/env/git/tests.rs
|
||||
+++ gix-path/src/env/git/tests.rs
|
||||
@@ -430,11 +430,11 @@ mod exe_info {
|
||||
);
|
||||
}
|
||||
|
||||
- #[test]
|
||||
+ /*#[test]
|
||||
#[serial]
|
||||
fn with_unmodified_environment() {
|
||||
check_exe_info();
|
||||
- }
|
||||
+ }*/
|
||||
|
||||
/*#[test]
|
||||
#[serial]
|
21
src/gix-path/debian/patches/drop-windows.patch
Normal file
21
src/gix-path/debian/patches/drop-windows.patch
Normal file
@ -0,0 +1,21 @@
|
||||
Index: gix-path/Cargo.toml
|
||||
===================================================================
|
||||
--- gix-path.orig/Cargo.toml
|
||||
+++ gix-path/Cargo.toml
|
||||
@@ -55,16 +55,6 @@ default-features = false
|
||||
[target.'cfg(not(target_family = "wasm"))'.dependencies.home]
|
||||
version = "0.5.5"
|
||||
|
||||
-[target."cfg(windows)".dev-dependencies.known-folders]
|
||||
-version = "1.1.0"
|
||||
-
|
||||
-[target."cfg(windows)".dev-dependencies.windows]
|
||||
-version = "0.58.0"
|
||||
-features = ["Win32_System_Threading"]
|
||||
-
|
||||
-[target."cfg(windows)".dev-dependencies.winreg]
|
||||
-version = "0.52.0"
|
||||
-
|
||||
[lints.clippy]
|
||||
bool_to_int_with_if = "allow"
|
||||
borrow_as_ptr = "allow"
|
13
src/gix-path/debian/patches/relax-dep.patch
Normal file
13
src/gix-path/debian/patches/relax-dep.patch
Normal file
@ -0,0 +1,13 @@
|
||||
Index: gix-path/Cargo.toml
|
||||
===================================================================
|
||||
--- gix-path.orig/Cargo.toml
|
||||
+++ gix-path/Cargo.toml
|
||||
@@ -49,7 +49,7 @@ version = "1.17.1"
|
||||
version = "1.0.26"
|
||||
|
||||
[dev-dependencies.serial_test]
|
||||
-version = "3.1.0"
|
||||
+version = ">= 2.0.0, < 4"
|
||||
default-features = false
|
||||
|
||||
[target.'cfg(not(target_family = "wasm"))'.dependencies.home]
|
143
src/gix-path/debian/patches/remove-gix-testtools.patch
Normal file
143
src/gix-path/debian/patches/remove-gix-testtools.patch
Normal file
@ -0,0 +1,143 @@
|
||||
Index: gix-path/src/env/git/tests.rs
|
||||
===================================================================
|
||||
--- gix-path.orig/src/env/git/tests.rs
|
||||
+++ gix-path/src/env/git/tests.rs
|
||||
@@ -361,10 +361,10 @@ mod exe_info {
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use crate::env::git::{exe_info, NULL_DEVICE};
|
||||
- use gix_testtools::tempfile;
|
||||
+ //use gix_testtools::tempfile;
|
||||
use serial_test::serial;
|
||||
|
||||
- /// Wrapper for a valid path to a plausible location, kept from accidentally existing (until drop).
|
||||
+ /* /// Wrapper for a valid path to a plausible location, kept from accidentally existing (until drop).
|
||||
#[derive(Debug)]
|
||||
struct NonexistentLocation {
|
||||
_empty: tempfile::TempDir,
|
||||
@@ -392,9 +392,9 @@ mod exe_info {
|
||||
fn path(&self) -> &Path {
|
||||
&self.nonexistent
|
||||
}
|
||||
- }
|
||||
+ }*/
|
||||
|
||||
- fn set_temp_env_vars<'a>(path: &Path) -> gix_testtools::Env<'a> {
|
||||
+ /*fn set_temp_env_vars<'a>(path: &Path) -> gix_testtools::Env<'a> {
|
||||
let path_str = path.to_str().expect("valid Unicode");
|
||||
|
||||
let env = gix_testtools::Env::new()
|
||||
@@ -409,11 +409,11 @@ mod exe_info {
|
||||
);
|
||||
|
||||
env
|
||||
- }
|
||||
+ }*/
|
||||
|
||||
- fn unset_windows_directory_vars<'a>() -> gix_testtools::Env<'a> {
|
||||
+ /*fn unset_windows_directory_vars<'a>() -> gix_testtools::Env<'a> {
|
||||
gix_testtools::Env::new().unset("windir").unset("SystemRoot")
|
||||
- }
|
||||
+ }*/
|
||||
|
||||
fn check_exe_info() {
|
||||
let path = exe_info()
|
||||
@@ -436,24 +436,24 @@ mod exe_info {
|
||||
check_exe_info();
|
||||
}
|
||||
|
||||
- #[test]
|
||||
+ /*#[test]
|
||||
#[serial]
|
||||
fn tolerates_broken_temp() {
|
||||
let non = NonexistentLocation::new();
|
||||
let _env = set_temp_env_vars(non.path());
|
||||
check_exe_info();
|
||||
- }
|
||||
+ }*/
|
||||
|
||||
- #[test]
|
||||
+ /*#[test]
|
||||
#[serial]
|
||||
fn tolerates_oversanitized_env() {
|
||||
// This test runs on all systems, but it is only checking for a Windows regression. Also, on
|
||||
// Windows, having both a broken temp dir and an over-sanitized environment is not supported.
|
||||
let _env = unset_windows_directory_vars();
|
||||
check_exe_info();
|
||||
- }
|
||||
+ }*/
|
||||
|
||||
- #[test]
|
||||
+ /* #[test]
|
||||
#[serial]
|
||||
fn same_result_with_broken_temp() {
|
||||
let with_unmodified_temp = exe_info();
|
||||
@@ -465,9 +465,9 @@ mod exe_info {
|
||||
};
|
||||
|
||||
assert_eq!(with_unmodified_temp, with_nonexistent_temp);
|
||||
- }
|
||||
+ } */
|
||||
|
||||
- #[test]
|
||||
+ /* #[test]
|
||||
#[serial]
|
||||
fn same_result_with_oversanitized_env() {
|
||||
let with_unmodified_env = exe_info();
|
||||
@@ -478,9 +478,9 @@ mod exe_info {
|
||||
};
|
||||
|
||||
assert_eq!(with_unmodified_env, with_oversanitized_env);
|
||||
- }
|
||||
+ } */
|
||||
|
||||
- #[test]
|
||||
+ /*#[test]
|
||||
#[serial]
|
||||
#[cfg(not(target_os = "macos"))] // Assumes no higher "unknown" scope. The `nosystem` case works.
|
||||
fn never_from_local_scope() {
|
||||
@@ -496,9 +496,9 @@ mod exe_info {
|
||||
maybe_path, None,
|
||||
"Should find no config path if the config would be local (empty system config)"
|
||||
);
|
||||
- }
|
||||
+ }*/
|
||||
|
||||
- #[test]
|
||||
+ /*#[test]
|
||||
#[serial]
|
||||
fn never_from_local_scope_nosystem() {
|
||||
let repo = gix_testtools::scripted_fixture_read_only("local_config.sh").expect("script succeeds");
|
||||
@@ -513,9 +513,9 @@ mod exe_info {
|
||||
maybe_path, None,
|
||||
"Should find no config path if the config would be local (suppressed system config)"
|
||||
);
|
||||
- }
|
||||
+ }*/
|
||||
|
||||
- #[test]
|
||||
+ /*#[test]
|
||||
#[serial]
|
||||
#[cfg(not(target_os = "macos"))] // Assumes no higher "unknown" scope. The `nosystem` case works.
|
||||
fn never_from_local_scope_even_if_temp_is_here() {
|
||||
@@ -534,9 +534,9 @@ mod exe_info {
|
||||
maybe_path, None,
|
||||
"Should find no config path if the config would be local even in a `/tmp`-like dir (empty system config)"
|
||||
);
|
||||
- }
|
||||
+ }*/
|
||||
|
||||
- #[test]
|
||||
+ /*#[test]
|
||||
#[serial]
|
||||
fn never_from_local_scope_even_if_temp_is_here_nosystem() {
|
||||
let repo = gix_testtools::scripted_fixture_read_only("local_config.sh")
|
||||
@@ -554,7 +554,7 @@ mod exe_info {
|
||||
maybe_path, None,
|
||||
"Should find no config path if the config would be local even in a `/tmp`-like dir (suppressed system config)"
|
||||
);
|
||||
- }
|
||||
+ }*/
|
||||
|
||||
#[test]
|
||||
fn first_file_from_config_with_origin() {
|
4
src/gix-path/debian/patches/series
Normal file
4
src/gix-path/debian/patches/series
Normal file
@ -0,0 +1,4 @@
|
||||
remove-gix-testtools.patch
|
||||
drop-windows.patch
|
||||
relax-dep.patch
|
||||
disable-test-assumes-git-repo.patch
|
Loading…
Reference in New Issue
Block a user