From 5628e43ae771cfe3bc057375966621b3bfb48846 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 13 Apr 2026 08:59:34 +0300 Subject: q2: add host-side unit test harness --- tests/Makefile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/Makefile (limited to 'tests/Makefile') diff --git a/tests/Makefile b/tests/Makefile new file mode 100644 index 0000000..ef3efc6 --- /dev/null +++ b/tests/Makefile @@ -0,0 +1,32 @@ +CC ?= gcc +CFLAGS ?= -std=c11 -Wall -Wextra -Werror -pedantic -g + +TZ ?= UTC +export TZ + +ROOT := .. +UNITY_DIR := vendor/unity/src +SRC_DIR := $(ROOT)/src/c + +TARGET := test_fastforge + +SRCS := \ + $(UNITY_DIR)/unity.c \ + $(SRC_DIR)/fastforge_logic.c \ + $(SRC_DIR)/fastforge_csv.c \ + $(wildcard test_*.c) + +INCLUDES := -I. -I$(UNITY_DIR) -I$(SRC_DIR) + +.PHONY: all test clean + +all: test + +test: $(TARGET) + TZ=$(TZ) ./$(TARGET) + +$(TARGET): $(SRCS) + $(CC) $(CFLAGS) $(INCLUDES) $(SRCS) -o $@ + +clean: + rm -f $(TARGET) -- cgit v1.2.3