a73x

6720a6b9

Add make targets for render + bench tests

a73x   2026-04-17 16:33

make test-render, golden-update, bench-baseline, bench-check.
Gitignore stray test_* scratch binaries at repo root.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

diff --git a/.gitignore b/.gitignore
index a815586..df57e1a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,10 @@ bench.log
perf.data
flamegraph.svg
tests/golden/output/

# Scratch test binaries (ad-hoc compilations)
/test_io
/test_io2
/test_io3
/test_sig
/test_timer
diff --git a/Makefile b/Makefile
index 3e7754a..087369b 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ ZIG ?= zig
FLAMEGRAPH ?= flamegraph.pl
STACKCOLLAPSE ?= stackcollapse-perf.pl

.PHONY: build run test bench profile clean
.PHONY: build run test bench profile clean test-render golden-update bench-baseline bench-check

build:
	$(ZIG) build
@@ -13,7 +13,7 @@ run: build
test:
	$(ZIG) build test

zig-out/bin/waystty: $(wildcard src/*.zig) $(wildcard shaders/*)
zig-out/bin/waystty: $(wildcard src/*.zig) $(wildcard src/tools/*.zig) $(wildcard shaders/*)
	$(ZIG) build

bench: zig-out/bin/waystty
@@ -32,5 +32,17 @@ profile:
	@grep -A 12 "waystty frame timing" bench.log || echo "(no timing data found)"
	xdg-open flamegraph.svg

test-render:
	$(ZIG) build test-render

golden-update:
	WAYSTTY_GOLDEN_UPDATE=1 $(ZIG) build test-render

bench-baseline:
	$(ZIG) build bench-baseline

bench-check:
	$(ZIG) build bench-check

clean:
	rm -rf zig-out .zig-cache perf.data bench.log flamegraph.svg
	rm -rf zig-out .zig-cache perf.data bench.log flamegraph.svg tests/golden/output