Commit 2f5cba92 authored by Willem Thiart's avatar Willem Thiart
Browse files

Add full tests to Makefile

parent 6cdad4a8
...@@ -20,12 +20,13 @@ SHAREDEXT = dylib ...@@ -20,12 +20,13 @@ SHAREDEXT = dylib
CFLAGS += -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/ CFLAGS += -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/
CFLAGS += -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include CFLAGS += -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include
CFLAGS += -fsanitize=address CFLAGS += -fsanitize=address
CFLAGS += -Wno-nullability-completeness
else else
SHAREDFLAGS = -shared SHAREDFLAGS = -shared
SHAREDEXT = so SHAREDEXT = so
endif endif
OBJECTS = raft_server.o raft_server_properties.o raft_node.o raft_log.o OBJECTS = src/raft_server.o src/raft_server_properties.o src/raft_node.o src/raft_log.o
all: static shared all: static shared
...@@ -57,10 +58,23 @@ tests: src/raft_server.c src/raft_server_properties.c src/raft_log.c src/raft_no ...@@ -57,10 +58,23 @@ tests: src/raft_server.c src/raft_server_properties.c src/raft_log.c src/raft_no
./tests_main ./tests_main
gcov raft_server.c gcov raft_server.c
.PHONY: fuzzer_tests .PHONY: test_fuzzer
fuzzer_tests: test_fuzzer:
python tests/log_fuzzer.py python tests/log_fuzzer.py
.PHONY: tests_full
tests_full:
make clean
make tests
make test_fuzzer
make test_virtraft
.PHONY: test_virtraft
test_virtraft:
cp src/*.c virtraft/deps/raft/
cp include/*.h virtraft/deps/raft/
cd virtraft; make clean; make; make tests
.PHONY: amalgamation .PHONY: amalgamation
amalgamation: amalgamation:
./scripts/amalgamate.sh > raft.h ./scripts/amalgamate.sh > raft.h
...@@ -71,7 +85,7 @@ infer: do_infer ...@@ -71,7 +85,7 @@ infer: do_infer
.PHONY: do_infer .PHONY: do_infer
do_infer: do_infer:
make clean make clean
infer -- make static infer -- make
clean: clean:
@rm -f $(TEST_DIR)/main_test.c *.o $(GCOV_OUTPUT); \ @rm -f $(TEST_DIR)/main_test.c *.o $(GCOV_OUTPUT); \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment