Add tests for config
I have started writing tests for the config functions. This has resulted in a few changes to the config code (tests working I guess) I have also added a special "all" config file which (as the name suggests) runs all test suites In the makefile I have added the compiled test files to the clean target and added targets for building and running tests
This commit is contained in:
parent
c046ac37a9
commit
e42705280c
4 changed files with 159 additions and 8 deletions
13
Makefile
13
Makefile
|
@ -2,7 +2,9 @@
|
|||
|
||||
CFILES = $(wildcard src/*.c)
|
||||
OBJFILES = $(CFILES:.c=.o)
|
||||
OUT = proxy
|
||||
TESTFILES = $(wildcard tests/*.c)
|
||||
TESTOUT = $(TESTFILES:.c=)
|
||||
OUT = yaip
|
||||
CFLAGS = -Wall
|
||||
LDLIBS = -lsqlite3
|
||||
CC = gcc
|
||||
|
@ -22,7 +24,14 @@ $(OUT): $(OBJFILES)
|
|||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $^
|
||||
|
||||
tests/%.test: tests/%.test.c tests/munit/munit.c
|
||||
$(CC) $? -o $@
|
||||
|
||||
|
||||
test-%: tests/%.test
|
||||
$<
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f $(OBJFILES) $(OUT)
|
||||
rm -f $(OBJFILES) $(OUT) $(TESTOUT)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue