From 4fa31b5e5b9fefa912d364c8f1f5dbffb3c2ea0e Mon Sep 17 00:00:00 2001 From: Charles Baumer <343171694+CharlesBaumer@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:12:55 +0000 Subject: [PATCH 1/2] Engine tests: clippy passes on Windows (Stills is Unix-only) `Stills` is only used by the `#[cfg(unix)]` part of `footage_on_other_computers_is_never_looked_at`. On Windows it was dead code, so `cargo xtask ci` stopped at clippy (`-D warnings`). Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/doc_path/tests.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/doc_path/tests.rs b/crates/engine/src/doc_path/tests.rs index b8dcbc19..74680df7 100644 --- a/crates/engine/src/doc_path/tests.rs +++ b/crates/engine/src/doc_path/tests.rs @@ -34,9 +34,11 @@ impl Services for Recording { } } -/// Probes every file as a still. +/// Probes every file as a still. Only the Unix part of the test below imports files. +#[cfg(unix)] struct Stills; +#[cfg(unix)] impl crate::Importer for Stills { fn probe(&self, path: &str) -> Result { if !std::path::Path::new(path).is_file() { From bd961131a455dafe5112e5f38d0026ff612b2bcf Mon Sep 17 00:00:00 2001 From: Charles Baumer <343171694+CharlesBaumer@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:23:28 +0000 Subject: [PATCH 2/2] Media tests: ffmpeg fixtures survive concurrent first runs on Windows Tests that share a fixture each generate it on a first run and rename their temp file into place. On Windows the losing rename fails with PermissionDenied while the winner has the file open. Treat a failed rename as "another test made it first" when the fixture exists, as `png_sequence` already does. Co-Authored-By: Claude Opus 5.5 --- crates/media/tests/footage.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/media/tests/footage.rs b/crates/media/tests/footage.rs index 13ca605e..8fbd6e97 100644 --- a/crates/media/tests/footage.rs +++ b/crates/media/tests/footage.rs @@ -40,7 +40,11 @@ fn ffmpeg_fixture(name: &str, args: &[&str]) -> Option { let tmp = out.with_file_name(format!("tmp-{}-{:?}.{ext}", std::process::id(), std::thread::current().id()).replace(['(', ')'], "")); let st = Command::new("ffmpeg").args(["-hide_banner", "-loglevel", "error", "-y"]).args(args).arg(&tmp).status().expect("run ffmpeg"); assert!(st.success(), "ffmpeg failed for {name}"); - std::fs::rename(&tmp, &out).expect("rename"); + if std::fs::rename(&tmp, &out).is_err() { + // Another test made it first; on Windows the rename fails while that test has it open. + let _ = std::fs::remove_file(&tmp); + assert!(out.exists(), "rename {} to {name} failed", tmp.display()); + } Some(out) }