From 8f2e0f0202317cc27371d2833eb93b64230ac0e8 Mon Sep 17 00:00:00 2001 From: Mel Date: Fri, 4 Jul 2025 03:27:27 +0200 Subject: Test suite runner prototype for `catboot` Signed-off-by: Mel --- Makefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e99038a..1f6677b 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ CFLAGS ?= -std=c99 -Wall -Werror -static -g -O0 .DEFAULT_GOAL := all BOOTSTRAP_SOURCES = boot/catboot.c boot/common.c boot/lex.c boot/tree.c boot/visit.c boot/parse.c +BOOTSTRAP_TEST_SOURCES = boot/tests/test.c SOURCES = src/catskill.csk build/catskill: build $(SOURCES) @@ -11,12 +12,15 @@ build/catskill: build $(SOURCES) build/catboot: build $(BOOTSTRAP_SOURCES) $(CC) $(CFLAGS) -o ./build/catboot ./boot/catboot.c +build/catboot-test: build $(BOOTSTRAP_TEST_SOURCES) + $(CC) $(CFLAGS) -o ./build/catboot-test ./boot/tests/test.c + build: mkdir -p ./build -.PHONY: all run run-boot clean +.PHONY: all run run-boot clean test test-all -all: build/catskill build/catboot +all: build/catskill build/catboot build/catboot-test run: build/catskill echo "Not implemented yet." @@ -24,5 +28,11 @@ run: build/catskill run-boot: build/catboot ./build/catboot +test: build/catboot-test + ./build/catboot-test + +test-all: build/catboot-test + ./build/catboot-test all + clean: rm -rf build/* -- cgit 1.4.1