cepheid

An Aurora 4X clone
Log | Files | Refs | README

commit c244d030f12caa09b01fc6e4aaeb378f4ce4e597
parent fda5f458563c3fad93afcc03aec628dd94c1784f
Author: hhvn <dev@hhvn.uk>
Date:   Sun, 27 Nov 2022 20:28:05 +0000

Make debugging of code run by libcheck easier

Diffstat:
Mdev/config.mk | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/dev/config.mk b/dev/config.mk @@ -17,10 +17,15 @@ checks: $(SRC) test: touch .testing cd tests && make - make test-run + make test-run RUNNER=run rm -rf test.* touch .testing +test-gdb: + touch .testing + cd tests && make + CK_FORK=no make test-run RUNNER=gdb + clean: test-clean test-clean: cd tests && make clean @@ -29,7 +34,7 @@ test-clean: # to $(SRC), as shell macros are evaluated before the target is run. Hence, # this target is required. test-run: - make run CFLAGS="$(CFLAGS) -DTEST" LDFLAGS="$(LDFLAGS) -lcheck" SRC="$(SRC) $(shell find tests -type f -name "*.c")" + make $(RUNNER) CFLAGS="$(CFLAGS) -DTEST" LDFLAGS="$(LDFLAGS) -lcheck" SRC="$(SRC) $(shell find tests -type f -name "*.c")" run: all gdb -ex 'set confirm on' -ex run -ex bt -ex quit --args $(BIN) $(ARGS)