From cbf1b2221cabf34674eb52df0661bc918f5ecb86 Mon Sep 17 00:00:00 2001 From: heck Date: Fri, 13 Dec 2019 15:58:05 +0100 Subject: [PATCH] Makefile bugfix --- test/Makefile | 19 +++++++++++-------- test/Testing.java | 11 +++++------ 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/test/Makefile b/test/Makefile index 7f26a6b..258fe3a 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,14 +1,17 @@ include ../Makefile.conf $(info If on Mac, make sure to disable SIP, or copy the libpEpEngine.dylib into here) -ifeq ($(BUILD_FOR),Linux) - ifndef LD_LIBRARY_PATH - export LD_LIBRARY_PATH=$(ENGINE_LIB_PATH) - endif -else ifeq ($(BUILD_FOR),Darwin) - ifndef DYLD_LIBRARY_PATH - export DYLD_LIBRARY_PATH=$(ENGINE_LIB_PATH) - endif + +ifdef ENGINE_LIB_PATH + ifeq ($(BUILD_FOR),Linux) + ifndef LD_LIBRARY_PATH + export LD_LIBRARY_PATH=$(ENGINE_LIB_PATH) + endif + else ifeq ($(BUILD_FOR),Darwin) + ifndef DYLD_LIBRARY_PATH + export DYLD_LIBRARY_PATH=$(ENGINE_LIB_PATH) + endif + endif endif CLASSPATH=.:../src diff --git a/test/Testing.java b/test/Testing.java index 0f41ef5..17c8634 100644 --- a/test/Testing.java +++ b/test/Testing.java @@ -29,7 +29,7 @@ class Testing { e = new Engine(); SyncCallbacks callbacks = new SyncCallbacks(); //e.setNotifyHandshakeCallback(callbacks); - e.setMessageToSendCallback(callbacks); + e.setMessageToSendCallback(callbacks); } catch (pEpException ex) { System.out.println("Cannot load"); @@ -47,7 +47,7 @@ class Testing { user = e.myself(user); System.out.print("Keys generated: "); System.out.println(user.fpr); - + // Import key try { Path path = Paths.get("test_keys/pub/pep-test-alice-0x6FF00E97_pub.asc"); @@ -116,20 +116,20 @@ class Testing { System.out.println("cannot decrypt"); ex.printStackTrace(); } - + System.out.println(result.dst.getShortmsg()); System.out.println(result.dst.getLongmsg()); System.out.println("TEST DONE - FINISHED"); try { e.key_reset_all_own_keys(); - } + } catch (pEpException ex) { System.out.println("cannot reset all own keys"); ex.printStackTrace(); } - //e.startSync(); + e.startSync(); // Keygen System.out.println("Generating keys: "); @@ -154,4 +154,3 @@ class Testing { System.exit(0); } } -