Compare commits

...
Author SHA1 Message Date
Brandon ThomasandClaude Opus 5.5 b684376eba TEMP: verify the engine and catalog tests on Windows and macOS (drop before merge)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 02:01:03 -04:00
Brandon ThomasandClaude Opus 5.5 2e1c7d0247 CI: the settings dialog test clicks Performance choices until they take
settings_dialog_by_keyboard_and_clicks failed on FreeBSD (0dd6593d): cache_mb stayed 0
because the click on settingsCache-0 missed. The GPU status line at the top of the
Performance tab reads process-wide GPU state that tests running alongside change (one
turns app.gpu off; a device failure marks the GPU broken). On a host without a GPU that
line is a long, wrapping error, so when it changes between the frame that placed a button
and the click, the rows below move. These choices are idempotent: click until the setting
takes (at most five tries), asserting each click is accepted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 02:01:03 -04:00
2 changed files with 42 additions and 8 deletions

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
# TEMPORARY (dropped before merge): run the engine and catalog tests on Windows and macOS.
name: tmp verify fix-ci
on:
pull_request:
branches: [main]
permissions:
contents: read
jobs:
test:
if: github.head_ref == 'claude/fix-main-ci-freebsd'
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 90
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: dtolnay/rust-toolchain@686976e191b89faba57d3206551f0f330d8cb249 # stable
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- run: cargo test --locked -p lightcraft-engine -p lightcraft-catalog --lib --no-fail-fast
env:
CARGO_PROFILE_DEV_DEBUG: "0"
+19 -8
View File
@@ -3833,17 +3833,28 @@ mod tests {
for _ in 0..4 {
h.step();
}
// Performance: the thumbnail cache size goes to the library preferences
// Performance: the thumbnail cache size goes to the library preferences. The GPU status
// line at the top of this tab reads process-wide GPU state that tests running alongside
// change (app.gpu off, a device failure); when its text rewraps between the frame that
// placed a button and the click, everything below shifts and the click misses. These
// choices are idempotent, so click again until the setting takes.
fn click_until(h: &mut Headless, id: &str, done: impl Fn(&Headless) -> bool) {
for _ in 0..5 {
let r = h.request("ui.clickWidget", json!({"id": id}), Duration::from_secs(10));
assert_eq!(r["ok"], true, "{id}: {r}");
if done(h) {
return;
}
}
panic!("clicking {id} never took effect");
}
h.request("ui.clickWidget", json!({"id": "button:settingsTab-performance"}), t);
h.request("ui.clickWidget", json!({"id": "button:settingsCache-0"}), t);
assert_eq!(h.app.session.cache_mb, 512);
h.request("ui.clickWidget", json!({"id": "button:settingsPreview-3"}), t);
assert_eq!(h.app.ui.settings.preview_limit, 3840);
h.request("ui.clickWidget", json!({"id": "button:settingsMemory-2"}), t);
assert_eq!(h.app.ui.settings.memory_mb, 1024);
click_until(&mut h, "button:settingsCache-0", |h| h.app.session.cache_mb == 512);
click_until(&mut h, "button:settingsPreview-3", |h| h.app.ui.settings.preview_limit == 3840);
click_until(&mut h, "button:settingsMemory-2", |h| h.app.ui.settings.memory_mb == 1024);
h.step();
assert_eq!(lightcraft_engine::memory::budget(), 1024 << 20, "applied through app.memoryBudget");
h.request("ui.clickWidget", json!({"id": "button:settingsMemory-0"}), t);
click_until(&mut h, "button:settingsMemory-0", |h| h.app.ui.settings.memory_mb == 0);
h.step();
assert_eq!(lightcraft_engine::memory::budget(), lightcraft_engine::memory::default_budget(), "back to automatic");
// Import: per-camera defaults