From 64a56ea777949ea6198bbe2d55271f47cc1ba371 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sun, 2 Jan 2022 22:06:55 +0100 Subject: [PATCH] Add run tests --- .circleci/config.yml | 3 +++ Makefile | 5 ++++- Tests/Makefile | 7 ++++--- 3 files changed, 11 insertions(+), 4 deletions(-) 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 -