From 7ba3fe663268ac7ed0ba53f2c67a6db14fcd2a0e Mon Sep 17 00:00:00 2001 From: huntedbytheirs Date: Tue, 4 Aug 2026 14:44:46 -0400 Subject: [PATCH] build: add test and clean targets to Makefile make test: builds then runs all three test suites (138 tests). make clean: removes build, build-debug, build-release directories. Finishing off 0.2. --- Makefile | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 72bb038..54092c5 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,8 @@ # debug — Debug build (build-debug/) # release - Release build (build-release/) # dist - tar.zst tarball of the release build (requires zstd) +# test — build then run all three test suites +# clean - remove all build directories # dist-clean - remove everything under dist/ # # Overridable: make release CXX=g++ GENERATOR="Unix Makefiles" @@ -25,7 +27,7 @@ DIST_NAME := kappa-$(GIT_COMMIT)-$(GIT_TAG)-$(STAMP) CMAKE := cmake -.PHONY: build debug release dist dist-clean +.PHONY: build debug release dist test clean dist-clean build: $(CMAKE) -S . -B $(BUILD_DIR) -G $(GENERATOR) \ @@ -53,3 +55,18 @@ dist: release dist-clean: rm -rf $(DIST_DIR) + +test: build + @echo "==> test.sh" + @./test.sh + @echo "" + @echo "==> test-init-switch.sh" + @./test-init-switch.sh + @echo "" + @echo "==> test-full.sh" + @./test-full.sh + @echo "" + @echo "all test suites passed" + +clean: + rm -rf $(BUILD_DIR) $(DEBUG_DIR) $(RELEASE_DIR)