summaryrefslogtreecommitdiff
path: root/Justfile
diff options
context:
space:
mode:
authorsteven-na <noreply.github@stvnc.dev>2026-07-29 01:53:59 -0700
committersteven-na <noreply.github@stvnc.dev>2026-07-29 01:53:59 -0700
commit62ae217a27531d9767bcdda0e7ff6c4368ed857e (patch)
tree7064c95504090894812a9684ecc6d7f6a30d9d8f /Justfile
parent95c5613776c27893c524f93f71980b5cb37adc6f (diff)
Scratch and temp arenas
Diffstat (limited to 'Justfile')
-rw-r--r--Justfile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Justfile b/Justfile
index 8343372..e1f0346 100644
--- a/Justfile
+++ b/Justfile
@@ -50,6 +50,14 @@ test-all:
{{cc}} {{cflags}} {{test_dir}}/*.c {{src_dir}}/*.c -o {{build_dir}}/test -lcriterion {{lflags}}
./{{build_dir}}/test
+coverage:
+ mkdir -p {{build_dir}}/cov-src {{build_dir}}/cov-tests
+ cd {{build_dir}}/cov-src && {{cc}} {{cflags}} --coverage -c ../../{{src_dir}}/*.c
+ cd {{build_dir}}/cov-tests && {{cc}} {{cflags}} --coverage -c ../../{{test_dir}}/*.c
+ {{cc}} {{cflags}} --coverage {{build_dir}}/cov-src/*.o {{build_dir}}/cov-tests/*.o -o {{build_dir}}/test-coverage -lcriterion {{lflags}}
+ ./{{build_dir}}/test-coverage
+ gcovr --root . --filter '{{src_dir}}/' {{build_dir}}/cov-src --html-details {{build_dir}}/coverage.html --print-summary
+
clean:
rm -rf {{build_dir}}