forked from lexus2k/tinyproto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.cpputest
33 lines (27 loc) · 1.14 KB
/
Makefile.cpputest
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.PHONY: unittest check clean_unittest
OBJ_UNIT_TEST = \
unittest/helpers/fake_wire.o \
unittest/helpers/fake_connection.o \
unittest/helpers/fake_endpoint.o \
unittest/helpers/tiny_base_helper.o \
unittest/helpers/tiny_hdlc_helper.o \
unittest/helpers/tiny_light_helper.o \
unittest/helpers/tiny_fd_helper.o \
unittest/main.o \
unittest/hal_tests.o \
unittest/packet_tests.o \
unittest/hdlc_tests.o \
unittest/light_tests.o \
unittest/fd_tests.o \
unittest: $(OBJ_UNIT_TEST) library
$(CXX) $(CPPFLAGS) -o $(BLD)/unit_test $(OBJ_UNIT_TEST) -L$(BLD) -lm -pthread -ltinyprotocol -lCppUTest -lCppUTestExt
check: unittest
$(BLD)/unit_test
clean: clean_unittest
clean_unittest:
rm -rf $(OBJ_UNIT_TEST) $(OBJ_UNIT_TEST:.o=.gcno) $(OBJ_UNIT_TEST:.o=.gcda) $(OBJ_UNIT_TEST:.o=.*.gcov)
coverage:
$(MAKE) ARCH=linux EXTRA_CPPFLAGS="--coverage" check
COVERALLS_REPO_TOKEN=4Ia7t9YDo22zQcFEnMYLh1tiWCRlBJlhk coveralls -b . \
--exclude docs --exclude extra --exclude unittest --exclude bld --exclude tools --exclude examples \
--gcov-options '\-lp' --dryrun