Skip to content

Commit bfd2ee5

Browse files
authored
Merge pull request #11363 from mathijs81/master
Make `cargo test` work on Ubuntu 24.04 regardless of umask
2 parents b72fe3e + 6837926 commit bfd2ee5

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

crates/but-core/tests/core/worktree/checkout.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ fn unrelated_additions_are_fine_even_with_conflicts_in_index() -> anyhow::Result
636636

637637
#[test]
638638
fn forced_changes_with_snapshot_and_directory_to_file() -> anyhow::Result<()> {
639-
if but_testsupport::gix_testtools::is_ci::cached() {
639+
if cfg!(target_os = "linux") {
640640
// Fails on checkout on Linux as it tries to get null from the ODB for some reason.
641641
// Too strange, usually related to the index somehow.
642642
eprintln!("SKIPPING TEST KNOWN TO FAIL ON CI ONLY");

crates/but-testsupport/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,14 @@ pub fn visualize_disk_tree_skip_dot_git(root: &Path) -> anyhow::Result<termtree:
306306
fn normalize_mode(mode: u32) -> u32 {
307307
match mode {
308308
0o40777 => 0o40755,
309+
0o40775 => 0o40755,
310+
0o10664 => 0o10644,
311+
0o10666 => 0o10644,
312+
0o100664 => 0o100644,
309313
0o100666 => 0o100644,
314+
0o100775 => 0o100755,
310315
0o100777 => 0o100755,
316+
0o120775 => 0o120755,
311317
0o120777 => 0o120755,
312318
other => other,
313319
}

0 commit comments

Comments
 (0)