From 13ac482c9b7398beb135bcecb49fdeef95156336 Mon Sep 17 00:00:00 2001 From: Krista Bennett Date: Mon, 3 Dec 2018 12:26:02 +0100 Subject: [PATCH 1/3] 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 +} From d1e360b7422f1bfd270b142f1a3bd755a6c19a4c Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 11 Dec 2018 10:39:40 +0100 Subject: [PATCH 2/3] Update windows build to Visual Studio 2017 --- asn.1/pEpEngineASN1/pEpEngineASN1.vcxproj | 8 ++++---- build-windows/pEpEngine.vcxproj | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/asn.1/pEpEngineASN1/pEpEngineASN1.vcxproj b/asn.1/pEpEngineASN1/pEpEngineASN1.vcxproj index 50bfbf8d..df2a8cf0 100644 --- a/asn.1/pEpEngineASN1/pEpEngineASN1.vcxproj +++ b/asn.1/pEpEngineASN1/pEpEngineASN1.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -14,19 +14,19 @@ {F8B454D8-E2DA-455C-AA56-3F076CAA1A6E} Win32Proj pEpEngineASN1 - 8.1 + 10.0.17763.0 StaticLibrary true - v140 + v141 Unicode StaticLibrary false - v140 + v141 true Unicode diff --git a/build-windows/pEpEngine.vcxproj b/build-windows/pEpEngine.vcxproj index 17e2579d..410e1ea8 100644 --- a/build-windows/pEpEngine.vcxproj +++ b/build-windows/pEpEngine.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -14,19 +14,19 @@ {146E69F8-E1DA-456A-B048-6DD29D9ACF6B} Win32Proj pEpEngine - 8.1 + 10.0.17763.0 DynamicLibrary true - v140 + v141 Unicode DynamicLibrary false - v140 + v141 true Unicode From 8127c70eaa0472b5a912315d230129e5694472f6 Mon Sep 17 00:00:00 2001 From: Krista Bennett Date: Tue, 11 Dec 2018 13:44:17 +0100 Subject: [PATCH 3/3] ENGINE-457 - mem leak in is_pep_user --- src/pEpEngine.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pEpEngine.c b/src/pEpEngine.c index f6866f9f..07c0f4b7 100644 --- a/src/pEpEngine.c +++ b/src/pEpEngine.c @@ -2717,6 +2717,8 @@ DYNAMIC_API PEP_STATUS is_pep_user(PEP_SESSION session, pEp_identity *identity, } sqlite3_reset(session->is_pep_user); + + free(alias_default); return PEP_STATUS_OK; }