Make the CI checks say what they mean, and format the workspace
The Android job's "Verify minimum API level" step has never verified the minimum API level. It took the first `*.so` anywhere under the target directory, which is a host proc-macro from debug/deps — an x86-64 object built by the runner's gcc, whose .comment section cannot mention Android and so can never contradict the expected value. It now reads the artifact under the target triple, compares against MIN_API parsed from the Dockerfile rather than a second copy of the number, and fails on a mismatch. Both sides are checked non-empty first: two failed parses would otherwise compare equal and pass, which is the same silent success in a new costume. The Android image installs one SDK package per layer and keeps the output. sdkmanager is a JVM program that aborts when it cannot get memory, and the single `> /dev/null` step reported that as a bare "exit code 134" while a retry re-downloaded everything that had already succeeded. tools/ci-local.sh runs all four jobs — desktop, android, layering, traceability — against the host toolchain, which is pinned to the same 1.92.0 CI installs. Its matrix check compares regeneration against the working tree rather than against HEAD: CI starts from a clean checkout, so git's answer is the right one there and reports every local run stale here. The rest is rustfmt across the workspace, and the clippy findings that surfaced once it did: manual_contains in dr-thumbs and collections_ui, a map iterated as pairs for its keys, an index loop over a slice, and two runtime assertions on a constant now made at compile time. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -326,7 +326,9 @@ mod tests {
|
||||
let later = start + Duration::from_secs(600);
|
||||
r.observe::<()>(&Err(network()), later);
|
||||
|
||||
let elapsed = r.offline_for(later).expect("offline since the first failure");
|
||||
let elapsed = r
|
||||
.offline_for(later)
|
||||
.expect("offline since the first failure");
|
||||
assert!(
|
||||
elapsed >= Duration::from_secs(600),
|
||||
"measured from the first failure, got {elapsed:?}"
|
||||
|
||||
@@ -446,7 +446,10 @@ mod tests {
|
||||
"a trashed image must not come back as an ordinary one"
|
||||
);
|
||||
// The real photographs are still found.
|
||||
assert!(result.images.iter().any(|i| i.path.as_str().ends_with("a.CR2")));
|
||||
assert!(result
|
||||
.images
|
||||
.iter()
|
||||
.any(|i| i.path.as_str().ends_with("a.CR2")));
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
@@ -500,9 +503,7 @@ mod tests {
|
||||
// And nothing else is swept up by it.
|
||||
assert!(!is_excluded(&RemotePath::new("Photos/2025")));
|
||||
assert!(!is_excluded(&RemotePath::new("Photos/trash")));
|
||||
assert!(!is_excluded(&RemotePath::new(
|
||||
"Photos/.darkroom-trash-old"
|
||||
)));
|
||||
assert!(!is_excluded(&RemotePath::new("Photos/.darkroom-trash-old")));
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
Reference in New Issue
Block a user