From f0a0ac8318e794a65efe696d51689238e82f26f7 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Fri, 9 Oct 2026 10:39:25 -0400 Subject: [PATCH] vst3-host tests: expect editor 'unsupported' off macOS VST3 editor windows are hosted on macOS only, but editor_main_thread and fixture_e2e asserted a probed view size on every platform, failing the FreeBSD job on every commit to main (and Linux locally). Gate only the size assertion; the controller round trips still run everywhere. Co-Authored-By: Claude Opus 5.5 --- crates/vst3-host/tests/editor_main_thread.rs | 7 ++++++- crates/vst3-host/tests/fixture_e2e.rs | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/crates/vst3-host/tests/editor_main_thread.rs b/crates/vst3-host/tests/editor_main_thread.rs index ab5d28c3..b6fbaa50 100644 --- a/crates/vst3-host/tests/editor_main_thread.rs +++ b/crates/vst3-host/tests/editor_main_thread.rs @@ -9,7 +9,12 @@ fn main() { let dir = common::fixture_dir(); let gain = soundcraft_vst3_host::scan_paths(&[dir.to_path_buf()]).into_iter().find(|d| d.name == "Fixture Gain").expect("fixture").id; let mut p = soundcraft_vst3_host::instantiate_plugin(&gain).expect("instantiate"); - assert_eq!(p.editor_size(), Ok((320, 240))); + // Editor windows are hosted on macOS only; elsewhere the probe reports "unsupported". + if cfg!(target_os = "macos") { + assert_eq!(p.editor_size(), Ok((320, 240))); + } else { + assert!(p.editor_size().is_err()); + } let mut ed = soundcraft_dsp::Plugin::editor(&mut p).expect("editor handle"); assert!(!ed.is_open()); assert_eq!(ed.idle().len(), 1, "the fixture's setup edit"); diff --git a/crates/vst3-host/tests/fixture_e2e.rs b/crates/vst3-host/tests/fixture_e2e.rs index 23970d2c..e3603b7a 100644 --- a/crates/vst3-host/tests/fixture_e2e.rs +++ b/crates/vst3-host/tests/fixture_e2e.rs @@ -212,7 +212,12 @@ fn state_saves_component_and_controller_and_restores_them() { fn editor_view_is_probed_and_edits_come_back_as_plain_values() { let id = id_of("Fixture Gain"); let mut p = soundcraft_vst3_host::instantiate_plugin(&id).unwrap(); - assert_eq!(p.editor_size(), Ok((320, 240))); + // Editor windows are hosted on macOS only; elsewhere the probe reports "unsupported". + if cfg!(target_os = "macos") { + assert_eq!(p.editor_size(), Ok((320, 240))); + } else { + assert!(p.editor_size().is_err()); + } let mut ed = soundcraft_dsp::Plugin::editor(&mut p).expect("editor handle"); // The fixture "edits" Gain to 0.9 (normalized) when it gets the component handler. assert_eq!(ed.idle(), vec![("7".to_string(), 1.8)]);