diff options
| author | Gene Pasquet <dev@etenil.net> | 2026-04-17 16:52:41 +0100 |
|---|---|---|
| committer | Gene Pasquet <dev@etenil.net> | 2026-04-17 16:52:41 +0100 |
| commit | a02b892e2ad1e1605ff942c63afdd618daa48be4 (patch) | |
| tree | 7ccd9278a0cdc7fd2f156b0b4710f6ac00acab27 /Makefile | |
| parent | 8251c85a4a588504d38a2fad05e4b0fe1cdccb9d (diff) | |
Migrate tests to the test egg
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -37,7 +37,7 @@ bin/%.o: %.scm | bin csc -c -J -unit downstroke-$* $*.scm -o bin/$*.o -I bin @if [ -f downstroke-$*.import.scm ]; then mv downstroke-$*.import.scm bin/; fi -.PHONY: clean test engine demos +.PHONY: clean test engine demos filter clean: rm -rf bin downstroke/ @@ -59,6 +59,17 @@ test: @csi -s tests/scene-loader-test.scm @csi -s tests/tween-test.scm +# Run a single test file with optional name/group filtering (pytest -k style). +# make filter FILE=tests/physics-test.scm # whole file +# make filter FILE=tests/physics-test.scm K=gravity # tests matching regex +# make filter FILE=tests/physics-test.scm G=apply # groups matching regex +# Note: combining K/G with TEST_QUIET=1 hits a known bug in the `test` egg +# (modulo error in summary timing), so this target intentionally doesn't +# expose Q. Use `TEST_QUIET=1 csi -s <file>` directly when you want quiet. +filter: + @if [ -z "$(FILE)" ]; then echo "usage: make filter FILE=<test.scm> [K=name-regex] [G=group-regex]"; exit 2; fi + @$(if $(K),TEST_FILTER='$(K)') $(if $(G),TEST_GROUP_FILTER='$(G)') csi -s $(FILE) + demos: engine $(DEMO_BINS) bin/demo-%: demo/%.scm $(OBJECT_FILES) | bin |
