From 13ac482c9b7398beb135bcecb49fdeef95156336 Mon Sep 17 00:00:00 2001 From: Krista Bennett Date: Mon, 3 Dec 2018 12:26:02 +0100 Subject: [PATCH] Changes in build to make NETPGP work in the tests. --- test/Makefile | 9 +++++++-- test/src/EngineTestSuite.cc | 4 ++-- test/src/pEpTestOutput.cc | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/test/Makefile b/test/Makefile index 372a3cb6..afa5d19b 100644 --- a/test/Makefile +++ b/test/Makefile @@ -17,13 +17,14 @@ SRCS := $(wildcard src/*.cc) $(wildcard src/*/*.cc) OBJS := $(addsuffix .o,$(basename $(SRCS))) DEPS := $(OBJS:.o=.d) -INC_DIRS := ./include /usr/local/include +INC_DIRS := ./include /usr/local/include ../src ../sync ../asn.1 INC_FLAGS := $(addprefix -I,$(INC_DIRS)) $(GPGME_INC) $(CPPUNIT_INC) LDFLAGS += -L/usr/local/lib CFLAGS += -Wno-deprecated CXXFLAGS += -Wno-deprecated +CFLAGS:=$(filter-out -Wall,$(CFLAGS)) LDFLAGS+= $(ETPAN_LIB) $(CPPUNIT_LIB) -L../asn.1 -L../src LDLIBS+= -letpan -lpEpEngine -lstdc++ -lasn1 @@ -34,6 +35,7 @@ endif ifeq ($(OPENPGP),NETPGP) LDLIBS+= -lnetpgp + CFLAGS+= -DUSE_NETPGP ifeq ($(BUILD_FOR),Linux) LDLIBS+= -ltre endif @@ -88,8 +90,11 @@ CPPFLAGS += $(INC_FLAGS) -MMD -MP all: suitemaker $(TARGET) test_home_ scripts +%.o: %.cc + $(CXX) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ + $(TARGET): $(OBJS) - $(CXX) $(CPPFLAGS) $(LDFLAGS) $(OBJS) $(LDFLAGS) $(LDLIBS) -o $@ + $(CXX) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(OBJS) $(LDFLAGS) $(LDLIBS) -o $@ .PHONY: suitemaker suitemaker: diff --git a/test/src/EngineTestSuite.cc b/test/src/EngineTestSuite.cc index d2f96932..8bfb5684 100644 --- a/test/src/EngineTestSuite.cc +++ b/test/src/EngineTestSuite.cc @@ -10,8 +10,8 @@ #include #include -#import -#import +#include +#include #include #include "platform_unix.h" diff --git a/test/src/pEpTestOutput.cc b/test/src/pEpTestOutput.cc index 5e404e54..2c4574a6 100644 --- a/test/src/pEpTestOutput.cc +++ b/test/src/pEpTestOutput.cc @@ -16,7 +16,7 @@ namespace Test { cout << setw(width); if (num_tests) { double percentage = ((num_tests - failures) / (double)num_tests) * 100; - cout << std::fixed << setprecision(1) << percentage << "\%"; + cout << std::fixed << setprecision(1) << percentage << "%"; } else cout << "N/A"; @@ -112,4 +112,4 @@ namespace Test { void pEpTestOutput::assertment(const Source& s) { _test_errors.push_back(s); } -} \ No newline at end of file +}