Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b684376eba | ||
|
|
2e1c7d0247 |
No files matched your search
@@ -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"
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user