summaryrefslogtreecommitdiff
path: root/test/process/window.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-05 10:46:03 -0300
committerGabriel Schneider <[email protected]>2026-11-05 15:12:36 -0300
commit11204e1206f7f7ffeaa861c1a442a312e563d3ed (patch)
treef788736bf5b6a56694563b664b5db73bc54bff72 /test/process/window.zig
parentc9b9dad8469f5d654c31d688d7e2d93da8325f39 (diff)
downloadpardes-11204e1206f7f7ffeaa861c1a442a312e563d3ed.tar.gz
pardes-11204e1206f7f7ffeaa861c1a442a312e563d3ed.zip
effects out, the post chain: Crt, Bloom, Vignette, Grain, Shader and ShaderAnimation go with src/gui/Post.zig, src/ShaderBuild.zig (the run-time glslc spawn and its watched files), shaders/post/, post.vert, bloom-down and bloom-up and their prebuilt .spv, the window's scene texture and its post-chain-only redraw (level A), the disable_scene_effects tape site and Pardes.disableSceneEffects; EffectCode goes with src/effect_sources.zig, which only embedded the effects' sources (/virtual keeps src/); the corner-click test keeps its point without a chain, the window monkey loses its Bloom axis; macOS's post-processor (ScenePostprocessor.swift, crt.ci.metal, pardes_scene) is a change of its own
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'test/process/window.zig')
-rw-r--r--test/process/window.zig19
1 files changed, 9 insertions, 10 deletions
diff --git a/test/process/window.zig b/test/process/window.zig
index 1fe2fd2e..40d2e6a6 100644
--- a/test/process/window.zig
+++ b/test/process/window.zig
@@ -30,13 +30,12 @@ fn paneWith(f: *process.Files, word: []const u8) !u32 {
const motions = [_][]const u8{ "off", "crisp", "smooth", "bouncy", "playful" };
const lifts = [_][]const u8{ "off", "shadow", "rim", "auto" };
-const blooms = [_][]const u8{ "0", "2" };
const themes = [_][]const u8{ "lapis", "lapis_plain", "forge", "acme", "dusk", "daybreak" };
-/// test/gui_monkey.py's: each Motion x Lift x Bloom gets a random burst,
-/// then must settle with its process alive and no crash record. Two
+/// test/gui_monkey.py's: each Motion x Lift gets a random burst, then
+/// must settle with its process alive and no crash record. Two
/// combinations and 30 steps in process-test; PARDES_GUI_MONKEY=all runs
-/// all 40 (`zig build monkey-gui`), PARDES_GUI_MONKEY_SEED and _STEPS
+/// all 20 (`zig build monkey-gui`), PARDES_GUI_MONKEY_SEED and _STEPS
/// choose the rest.
fn monkey(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try process.only(.gui);
@@ -45,20 +44,20 @@ fn monkey(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
const steps = try std.fmt.parseInt(usize, envOr("PARDES_GUI_MONKEY_STEPS", if (all) "60" else "30"), 10);
var failed: usize = 0;
var n: usize = 0;
- for (motions) |m| for (lifts) |l| for (blooms) |b| {
+ for (motions) |m| for (lifts) |l| {
defer n += 1;
// The smoke run: the quietest combination and the busiest.
- if (!all and n != 0 and n != motions.len * lifts.len * blooms.len - 1) continue;
- if (!try monkeyOne(gpa, exe, m, l, b, seed * 1000 + n, steps)) failed += 1;
+ if (!all and n != 0 and n != motions.len * lifts.len - 1) continue;
+ if (!try monkeyOne(gpa, exe, m, l, seed * 1000 + n, steps)) failed += 1;
};
if (failed > 0) return error.MonkeyFailed;
}
-fn monkeyOne(gpa: std.mem.Allocator, exe: [:0]const u8, motion: []const u8, lift: []const u8, bloom: []const u8, seed: u64, steps: usize) !bool {
+fn monkeyOne(gpa: std.mem.Allocator, exe: [:0]const u8, motion: []const u8, lift: []const u8, seed: u64, steps: usize) !bool {
var arena = std.heap.ArenaAllocator.init(gpa);
defer arena.deinit();
const a = arena.allocator();
- const init = try std.fmt.allocPrint(a, "Shell /bin/sh\nMessageLinger 0\nMotion {s}\nLift {s}\nBloom {s}\nPanelSlide\nSelectionGlow on\nHoverGlow on\n", .{ motion, lift, bloom });
+ const init = try std.fmt.allocPrint(a, "Shell /bin/sh\nMessageLinger 0\nMotion {s}\nLift {s}\nPanelSlide\nSelectionGlow on\nHoverGlow on\n", .{ motion, lift });
var d = try process.Detached.start(gpa, exe, "monkey", .{ .init = init, .grid = .{ 80, 28 }, .env = &.{
.{ "PARDES_TEST_CLOCK", "1" }, .{ "PARDES_TEST_PAD", "0" },
} });
@@ -102,7 +101,7 @@ fn monkeyOne(gpa: std.mem.Allocator, exe: [:0]const u8, motion: []const u8, lift
};
} else |_| {}
const ok = std.mem.eql(u8, verdict, "ok");
- if (!ok) std.debug.print("monkey {s}-{s}-bloom{s} (seed {d}): {s}\n{s}", .{ motion, lift, bloom, seed, verdict, log.items });
+ if (!ok) std.debug.print("monkey {s}-{s} (seed {d}): {s}\n{s}", .{ motion, lift, seed, verdict, log.items });
return ok;
}