Add run tests

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

@ -25,6 +25,9 @@ jobs:
- run: - run:
name: "Build Tests" name: "Build Tests"
command: "make -j 3 tests" command: "make -j 3 tests"
- run:
name: "Run Tests"
command: "make run-tests"
# Invoke jobs via workflows # Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#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 # 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.o
@$(RM) -f DStarGatewayApp.d @$(RM) -f DStarGatewayApp.d
@$(MAKE) -C Tests tests @$(MAKE) -C Tests dstargateway_tests
.PHONY run-tests:
@$(MAKE) -C Tests run-tests
FORCE: FORCE:

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

Loading…
Cancel
Save

Powered by TurnKey Linux.