about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
authorMel <mel@rnrd.eu>2025-07-04 03:27:27 +0200
committerMel <mel@rnrd.eu>2025-07-04 03:27:27 +0200
commit8f2e0f0202317cc27371d2833eb93b64230ac0e8 (patch)
treee2b395c1abbdab5fe12d22b3847c7ce7373f4bd6 /Makefile
parent8e0beabeb4efa50a3072ef805682c0f42b6c16a8 (diff)
downloadcatskill-8f2e0f0202317cc27371d2833eb93b64230ac0e8.tar.zst
catskill-8f2e0f0202317cc27371d2833eb93b64230ac0e8.zip
Test suite runner prototype for `catboot`
Signed-off-by: Mel <mel@rnrd.eu>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 12 insertions, 2 deletions
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/*