add rudimentary unit tests, and logging timestamps
Signed-off-by: Aidan Hahn <aidan@aidanis.online>
This commit is contained in:
parent
7fafcd344d
commit
1e9b701542
6 changed files with 188 additions and 37 deletions
12
tests/tests.mk
Normal file
12
tests/tests.mk
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
ALOG_TEST_SRCS = $(shell find tests -iname "*.c" -exec basename {} \;)
|
||||
ALOG_TESTS = $(ALOG_TEST_SRCS:.c=)
|
||||
|
||||
$(ALOG_TESTS): $(ALOG_LIB)
|
||||
$(CC) $(CFLAGS) -g -o $(BUILD_DIR)/$@.o -c tests/$@.c
|
||||
$(CC) -o $(TARGET_DIR)/$@ $(BUILD_DIR)/$@.o $(ALOG_LIB)
|
||||
chmod +x $(TARGET_DIR)/$@
|
||||
|
||||
run-tests: $(ALOG_TESTS)
|
||||
for test in $^ ; do \
|
||||
$(TARGET_DIR)/$$test ; \
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue