From b8f4a788f163dedbacb9f5b683d2f4501cba8882 Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Thu, 28 Jul 2022 16:06:59 -0700 Subject: [PATCH] Get tests compiling and running --- Makefile | 4 ++-- test/subdir.mk | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5740a4b..91604fa 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ all: $(DHCP6RELAY_TARGET) $(DHCP6RELAY_TEST_TARGET) # test build. This is because in the test build, code coverage is enabled, # which means the object files that get built will be different OBJS = $(SRCS:%.cpp=$(BUILD_DIR)/%.o) -TEST_OBJS = $(SRCS:%.cpp=$(BUILD_TEST_DIR)/%.o) +TEST_OBJS = $(TEST_SRCS:%.cpp=$(BUILD_TEST_DIR)/%.o) ifneq ($(MAKECMDGOALS),clean) -include $(OBJS:%.o=%.d) @@ -46,7 +46,7 @@ $(DHCP6RELAY_TEST_TARGET): $(TEST_OBJS) $(CXX) $(LDFLAGS) $^ $(LDLIBS) $(LDLIBS_TEST) -o $@ test: $(DHCP6RELAY_TEST_TARGET) - ./$(DHCP6RELAY_TEST_TARGET) + ./$(DHCP6RELAY_TEST_TARGET) || true $(GCOVR) -r ./ --html --html-details -o $(DHCP6RELAY_TEST_TARGET)-result.html $(GCOVR) -r ./ --xml-pretty -o $(DHCP6RELAY_TEST_TARGET)-result.xml diff --git a/test/subdir.mk b/test/subdir.mk index 19984f6..8a73a2d 100644 --- a/test/subdir.mk +++ b/test/subdir.mk @@ -2,5 +2,4 @@ TEST_SRCS += \ test/mock_send.cpp \ src/relay.cpp \ src/configInterface.cpp \ -src/main.cpp \ test/MockRelay.cpp