History

Assert that macOS on CI is high granularity

This raises the risk of a failure when there is no bug, but hopefully only slightly, and it's a simple way to verify that the snapshot `journey` test really is running fully in at least one regularlly tested platform.

Eliah Kagan committed 1 year ago

Commit d1b0d1c1 parent d4a8d793 files · +7 −1Browse files

Unified · Split

3 files
  1. Cargo.lock +1 −0
  2. gix-fs/Cargo.toml +2 −1
  3. gix-fs/tests/fs/snapshot.rs +4 −0
Cargo.lock+1−0
@@ -1903,6 +1903,7 @@ dependencies = [ · 1902 unmodified lines
1903 "fastrand",1903 "fastrand",
1904 "gix-features 0.40.0",1904 "gix-features 0.40.0",
1905 "gix-utils 0.1.14",1905 "gix-utils 0.1.14",
1906 "is_ci",
1906 "serde",1907 "serde",
1907 "tempfile",1908 "tempfile",
1908]1909]
gix-fs/Cargo.toml+2−1
@@ -27,5 +27,6 @@ serde = { version = "1.0.114", optional = true, default-features = false, featur · 26 unmodified lines
27fastrand = { version = "2.1.0", default-features = false, features = ["std"] }27fastrand = { version = "2.1.0", default-features = false, features = ["std"] }
28 28
29[dev-dependencies]29[dev-dependencies]
30tempfile = "3.5.0"
31crossbeam-channel = "0.5.0"30crossbeam-channel = "0.5.0"
31is_ci = "1.1.1"
32tempfile = "3.5.0"
gix-fs/tests/fs/snapshot.rs+4−0
@@ -64,5 +64,9 @@ fn has_granular_times(root: &Path) -> std::io::Result<bool> { · 63 unmodified lines
64 64
65 // This could be wrongly false if a filesystem has very precise timings yet is ridiculously65 // This could be wrongly false if a filesystem has very precise timings yet is ridiculously
66 // fast. Then the `journey` test wouldn't run, though it could. But that's OK, and unlikely.66 // fast. Then the `journey` test wouldn't run, though it could. But that's OK, and unlikely.
67 // However, for now, on CI, on macOS only, we assert the expectation of high granularity.
68 if cfg!(target_os = "macos") && is_ci::cached() {
69 assert_eq!(times.len(), n);
70 }
67 Ok(times.len() == n)71 Ok(times.len() == n)
68}72}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t