Add run tests

pull/32/head
Geoffrey Merck 4 years ago
parent 231bcc9394
commit 64a56ea777

@ -25,6 +25,9 @@ jobs:
- run:
name: "Build Tests"
command: "make -j 3 tests"
- run:
name: "Run Tests"
command: "make run-tests"
# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows

@ -135,6 +135,9 @@ tests : GitVersion.h
# remove these to force tests makefile to rebuild them with -DUNIT_TESTS, otherwise we end up with 2 mains
@$(RM) -f DStarGatewayApp.o
@$(RM) -f DStarGatewayApp.d
@$(MAKE) -C Tests tests
@$(MAKE) -C Tests dstargateway_tests
.PHONY run-tests:
@$(MAKE) -C Tests run-tests
FORCE:

@ -3,8 +3,7 @@ SRCS = $(wildcard *.cpp) $(wildcard ../*.cpp)
OBJS = $(SRCS:.cpp=.o)
DEPS = $(SRCS:.cpp=.d)
.PHONY tests:
tests: $(OBJS)
dstargateway_tests: $(OBJS)
$(CC) $(CPPFLAGS) -o dstargateway_tests $(OBJS) $(LDFLAGS) -lgtest -lgtest_main
%.o : %.cpp
@ -12,7 +11,9 @@ tests: $(OBJS)
-include $(DEPS)
.PHONY run-tests: dstargateway_tests
./dstargateway_tests
.PHONY clean :
clean :
@$(RM) $(OBJS) $(DEPS) dstargateway_tests

Loading…
Cancel
Save

Powered by TurnKey Linux.