diff --git a/.circleci/config.yml b/.circleci/config.yml index 4409f38..7cfc309 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 diff --git a/Makefile b/Makefile index 79f9d87..b6088c4 100644 --- a/Makefile +++ b/Makefile @@ -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: \ No newline at end of file diff --git a/Tests/Makefile b/Tests/Makefile index 155361a..6b393dc 100644 --- a/Tests/Makefile +++ b/Tests/Makefile @@ -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 -