Added a rudimentary test framework

Tests can be found in 'tests/test_blah.sh'
Tests can be run with 'make test'
This commit is contained in:
Christopher Haster
2017-03-25 17:02:16 -05:00
parent 84a57642e5
commit afa4ad8254
12 changed files with 260 additions and 294 deletions

View File

@@ -9,6 +9,8 @@ OBJ := $(SRC:.c=.o)
DEP := $(SRC:.c=.d)
ASM := $(SRC:.c=.s)
TEST := $(wildcard tests/test_*)
ifdef DEBUG
CFLAGS += -O0 -g3
else
@@ -28,6 +30,9 @@ asm: $(ASM)
size: $(OBJ)
$(SIZE) -t $^
test:
for t in $(TEST) ; do ./$$t ; done
-include $(DEP)
$(TARGET): $(OBJ)