History

Merge branch 'limit-git'

Sebastian Thiel committed 3 years ago

Commit 68d9e802 parents b629f8a 4ed84a62 files · +15 −9Browse files

Unified · Split

2 files
  1. gix-worktree/tests/worktree/checkout.rs +12 −9
  2. tests/tools/src/lib.rs +3 −0
gix-worktree/tests/worktree/checkout.rs+12−9
@@ -290,7 +290,12 @@ fn keep_going_collects_results() { · 289 unmodified lines
290 }290 }
291 291
292 if multi_threaded() {292 if multi_threaded() {
293 assert_eq!(dir_structure(&destination).len(), 3);293 let actual = dir_structure(&destination);
294 assert!(
295 (2..=3).contains(&actual.len()),
296 "it's 3 most of the time, but can be 2 of the 'empty' file is missing as the object couldn't be accessed.\
297 It's unclear why there isn't more, as it would keep going"
298 );
294 } else {299 } else {
295 assert_eq!(300 assert_eq!(
296 stripped_prefix(&destination, &dir_structure(&destination)),301 stripped_prefix(&destination, &dir_structure(&destination)),
@@ -350,10 +355,9 @@ fn collisions_are_detected_on_a_case_insensitive_filesystem_even_with_delayed_fi · 53 unmodified lines
350 355
351 let dest_files = dir_structure(&destination);356 let dest_files = dir_structure(&destination);
352 if multi_threaded() {357 if multi_threaded() {
353 assert_eq!(358 assert!(
354 dest_files.len(),359 (4..=6).contains(&dest_files.len()),
355 5,360 "due to the clash happening at nearly any time, and keep-going is false, we get a variance of files"
356 "can only assert on number as it's racily creating files so unclear which one clashes"
357 );361 );
358 } else {362 } else {
359 assert_eq!(363 assert_eq!(
@@ -370,10 +374,9 @@ fn collisions_are_detected_on_a_case_insensitive_filesystem_even_with_delayed_fi · 10 unmodified lines
370 let error_kind_dir = error_kind;374 let error_kind_dir = error_kind;
371 375
372 if multi_threaded() {376 if multi_threaded() {
373 assert_eq!(377 assert!(
374 outcome.collisions.len(),378 (5..=6).contains(&outcome.collisions.len()),
375 5,379 "can only assert on number as it's racily creating files so unclear which one clashes, and due to keep-going = false there is variance"
376 "can only assert on number as it's racily creating files so unclear which one clashes"
377 );380 );
378 } else {381 } else {
379 assert_eq!(382 assert_eq!(
tests/tools/src/lib.rs+3−0
@@ -497,6 +497,7 @@ fn configure_command<'a>( · 496 unmodified lines
497 args: &[String],497 args: &[String],
498 script_result_directory: &Path,498 script_result_directory: &Path,
499) -> &'a mut std::process::Command {499) -> &'a mut std::process::Command {
500 let never_path = if cfg!(windows) { "-" } else { ":" };
500 cmd.args(args)501 cmd.args(args)
501 .stdout(std::process::Stdio::piped())502 .stdout(std::process::Stdio::piped())
502 .stderr(std::process::Stdio::piped())503 .stderr(std::process::Stdio::piped())
@@ -504,6 +505,8 @@ fn configure_command<'a>( · 1 unmodified line
504 .env_remove("GIT_DIR")505 .env_remove("GIT_DIR")
505 .env_remove("GIT_ASKPASS")506 .env_remove("GIT_ASKPASS")
506 .env_remove("SSH_ASKPASS")507 .env_remove("SSH_ASKPASS")
508 .env("GIT_CONFIG_SYSTEM", never_path)
509 .env("GIT_CONFIG_GLOBAL", never_path)
507 .env("GIT_TERMINAL_PROMPT", "false")510 .env("GIT_TERMINAL_PROMPT", "false")
508 .env("GIT_AUTHOR_DATE", "2000-01-01 00:00:00 +0000")511 .env("GIT_AUTHOR_DATE", "2000-01-01 00:00:00 +0000")
509 .env("GIT_AUTHOR_EMAIL", "author@example.com")512 .env("GIT_AUTHOR_EMAIL", "author@example.com")