forked from 1b-agent/fieldcraft-upstream
ci: prove the lavapipe GPU path draws (FIELDCRAFT_REQUIRE_GPU=1)
The drawing tests skipped silently without an adapter. Under FIELDCRAFT_REQUIRE_GPU=1 they fail instead, and the snapshot and MCP screenshot tests require a GPU renderer. CI runs them with FIELDCRAFT_GPU=software on lavapipe. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
1 parent
b905f1bc89
commit
c6bc4d2ba0
5 files changed
+24
-5
No files matched your search
@@ -223,7 +223,7 @@ mod tests {
|
||||
|
||||
/// The cantilever drawn headless: a PNG of the size asked for, with the model in it (pixels
|
||||
/// of the hex colour) and its element edges (dark pixels). `auto` draws on the GPU when the
|
||||
/// machine has one and on the CPU otherwise (a CI box without a software GPU); `cpu` always
|
||||
/// machine has one and on the CPU otherwise (it must be the GPU under `FIELDCRAFT_REQUIRE_GPU=1`); `cpu` always
|
||||
/// on the CPU, and both pictures show the same model. A section and a field change it.
|
||||
#[test]
|
||||
fn snapshots_the_model_and_its_mesh_headless() {
|
||||
@@ -243,6 +243,8 @@ mod tests {
|
||||
assert!(edges > 100, "{drawn:?}: {edges} edge pixels");
|
||||
if policy == Policy::Cpu {
|
||||
assert_eq!(drawn, Renderer::Cpu { why: None });
|
||||
} else if fieldcraft_gpu::select::gpu_required() {
|
||||
assert!(matches!(drawn, Renderer::Gpu { .. }), "FIELDCRAFT_REQUIRE_GPU=1 but drawn by {drawn:?}");
|
||||
}
|
||||
}
|
||||
// A section along the beam draws half of it.
|
||||
|
||||
Reference in new issue
Block a user