feat(test): add comprehensive test infrastructure
- Add test target to both bmake.mk and gmake.mk Makefiles - Add test-related artifacts to .gitignore (excluding DLLs/shared libs) - Create test directory with cross-platform Makefiles (bmake.mk, gmake.mk) - Implement cross-platform test program with signal handling (test.c) - Add test module source for compilation (test_mod.c) - Set up automated test environment with mods/ directory - Support both POSIX and Windows platforms The test infrastructure allows running integration tests via 'make test' and demonstrates stk library functionality with dynamic module loading. Generated DLLs/shared libraries are excluded from version control.
This commit is contained in:
@@ -12,7 +12,7 @@ LDFLAGS_PLAT = -ldl
|
||||
CFLAGS_PLAT = -fPIC
|
||||
CFLAGS_BASE = -Wall -Wpedantic -I${.CURDIR}/${INC_DIR} -std=c89 ${CFLAGS_PLAT}
|
||||
|
||||
.PHONY: all debug release clean
|
||||
.PHONY: all debug release clean test
|
||||
|
||||
all: debug
|
||||
|
||||
@@ -47,3 +47,7 @@ obj/release/${_obj_base}: ${_src}
|
||||
|
||||
clean:
|
||||
rm -rf ${.CURDIR}/${OBJ_DIR} ${.CURDIR}/${BIN_DIR}
|
||||
|
||||
test: debug
|
||||
@echo "=== Building and running stk tests ==="
|
||||
cd test && ${MAKE} -f bmake.mk
|
||||
|
||||
Reference in New Issue
Block a user