Basic tests implemented using cmocka
This commit is contained in:
parent
1e76066400
commit
bfffbb9211
2 changed files with 108 additions and 1 deletions
8
Makefile
8
Makefile
|
|
@ -27,6 +27,9 @@ ASMS = $(C_SOURCES:.c=.s)
|
|||
|
||||
all: $(OBJECTS)
|
||||
|
||||
test: test/test.elf
|
||||
./test/test.elf
|
||||
|
||||
%.o: %.c $(C_HEADERS)
|
||||
@echo "CC $<"
|
||||
@$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
|
@ -41,6 +44,9 @@ driver: $(OBJECTS)
|
|||
run: driver
|
||||
@./driver
|
||||
|
||||
test/test.elf: test/test_ringbuf.o ringbuf.o
|
||||
@$(CC) $(CFLAGS) $^ -o $@ -lpthread -lcmocka
|
||||
|
||||
lib: $(OBJECTS)
|
||||
@ar rcs librbuf.a ringbuf.o
|
||||
|
||||
|
|
@ -64,4 +70,4 @@ tidy:
|
|||
format:
|
||||
clang-format -i $(C_SOURCES) $(C_HEADERS)
|
||||
|
||||
.PHONY: all clean format asm
|
||||
.PHONY: all clean format asm test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue