From c23134009e46973305e2422de43ddef83410f9ec Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sun, 30 Jan 2022 07:38:11 +0100 Subject: [PATCH] #17 fix tests not running --- .circleci/config.yml | 2 +- .vscode/tasks.json | 25 +++++++++++++++++++------ Makefile | 1 + Tests/Makefile | 5 ++--- 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4e8c1d4..f858990 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,7 +24,7 @@ jobs: command: "make -j 3 ENABLE_DEBUG=1 USE_GPSD=1" - run: name: "Run Tests" - command: "make run-tests" + command: "make run-tests ENABLE_DEBUG=1 USE_GPSD=1" # Invoke jobs via workflows # See: https://circleci.com/docs/2.0/configuration-reference/#workflows workflows: diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 168ca95..68a8d9e 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -4,7 +4,7 @@ "version": "2.0.0", "tasks": [ { - "label": "Build", + "label": "Build All", "type": "shell", "command": "make", "args": [ @@ -12,10 +12,20 @@ "ENABLE_DEBUG=1", "USE_GPSD=1" ], - "group": { - "kind": "build", - "isDefault": true - }, + "group": "build", + "problemMatcher": [] + }, + { + "label": "Build DStarGateway", + "type": "shell", + "command": "make", + "args": [ + "-j3", + "ENABLE_DEBUG=1", + "USE_GPSD=1", + "DStarGateway/dstargateway" + ], + "group": "build", "problemMatcher": [] }, { @@ -28,7 +38,10 @@ "ENABLE_DEBUG=1", "USE_GPSD=1" ], - "group": "build", + "group": { + "kind": "build", + "isDefault": true + }, "problemMatcher": [] } ] diff --git a/Makefile b/Makefile index 9f295b6..fc595b6 100644 --- a/Makefile +++ b/Makefile @@ -145,3 +145,4 @@ run-tests: tests @$(MAKE) -C Tests run-tests FORCE: + @true diff --git a/Tests/Makefile b/Tests/Makefile index 2aafd55..2e29d24 100644 --- a/Tests/Makefile +++ b/Tests/Makefile @@ -1,10 +1,9 @@ - -SRCS = $(wildcard *.cpp) $(wildcard ../*.cpp) $(wildcard */*.cpp) +SRCS = $(wildcard *.cpp) $(wildcard */*.cpp) OBJS = $(SRCS:.cpp=.o) DEPS = $(SRCS:.cpp=.d) dstargateway_tests: ../VersionInfo/GitVersion.h $(OBJS) ../APRS/APRS.a ../IRCDDB/IRCDDB.a ../DStarBase/DStarBase.a ../BaseCommon/BaseCommon.a ../Common/Common.a - $(CC) $(CPPFLAGS) -o dstargateway_tests $(OBJS) ../Common/Common.a ../APRS/APRS.a ../DStarBase/DStarBase.a ../IRCDDB/IRCDDB.a ../BaseCommon/BaseCommon.a $(LDFLAGS) -lgtest -lgtest_main + $(CC) $(CPPFLAGS) -o dstargateway_tests $(OBJS) ../Common/Common.a ../APRS/APRS.a ../DStarBase/DStarBase.a ../IRCDDB/IRCDDB.a ../BaseCommon/BaseCommon.a $(LDFLAGS) -lgtest -lgtest_main %.o : %.cpp $(CC) $(CPPFLAGS) -DUNIT_TESTS -I../APRS -I../Common -I../BaseCommon -I../DStarBase -I../IRCDDB -I../VersionInfo -MMD -MD -c $< -o $@