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
19031903 "fastrand",
19041904 "gix-features 0.40.0",
19051905 "gix-utils 0.1.14",
1906+ "is_ci",
19061907 "serde",
19071908 "tempfile",
19081909 ]
gix-fs/Cargo.toml+2−1
@@ -27,5 +27,6 @@ serde = { version = "1.0.114", optional = true, default-features = false, featur · 26 unmodified lines
2727 fastrand = { version = "2.1.0", default-features = false, features = ["std"] }
2828
2929 [dev-dependencies]
30−tempfile = "3.5.0"
3130 crossbeam-channel = "0.5.0"
31+is_ci = "1.1.1"
32+tempfile = "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
6464
6565 // This could be wrongly false if a filesystem has very precise timings yet is ridiculously
6666 // 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+ }
6771 Ok(times.len() == n)
6872 }

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