Browse Source

Makefile bugfix

JNI-88
heck 6 years ago
parent
commit
cbf1b2221c
  1. 19
      test/Makefile
  2. 11
      test/Testing.java

19
test/Makefile

@ -1,14 +1,17 @@
include ../Makefile.conf include ../Makefile.conf
$(info If on Mac, make sure to disable SIP, or copy the libpEpEngine.dylib into here) $(info If on Mac, make sure to disable SIP, or copy the libpEpEngine.dylib into here)
ifeq ($(BUILD_FOR),Linux)
ifndef LD_LIBRARY_PATH ifdef ENGINE_LIB_PATH
export LD_LIBRARY_PATH=$(ENGINE_LIB_PATH) ifeq ($(BUILD_FOR),Linux)
endif ifndef LD_LIBRARY_PATH
else ifeq ($(BUILD_FOR),Darwin) export LD_LIBRARY_PATH=$(ENGINE_LIB_PATH)
ifndef DYLD_LIBRARY_PATH endif
export DYLD_LIBRARY_PATH=$(ENGINE_LIB_PATH) else ifeq ($(BUILD_FOR),Darwin)
endif ifndef DYLD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$(ENGINE_LIB_PATH)
endif
endif
endif endif
CLASSPATH=.:../src CLASSPATH=.:../src

11
test/Testing.java

@ -29,7 +29,7 @@ class Testing {
e = new Engine(); e = new Engine();
SyncCallbacks callbacks = new SyncCallbacks(); SyncCallbacks callbacks = new SyncCallbacks();
//e.setNotifyHandshakeCallback(callbacks); //e.setNotifyHandshakeCallback(callbacks);
e.setMessageToSendCallback(callbacks); e.setMessageToSendCallback(callbacks);
} }
catch (pEpException ex) { catch (pEpException ex) {
System.out.println("Cannot load"); System.out.println("Cannot load");
@ -47,7 +47,7 @@ class Testing {
user = e.myself(user); user = e.myself(user);
System.out.print("Keys generated: "); System.out.print("Keys generated: ");
System.out.println(user.fpr); System.out.println(user.fpr);
// Import key // Import key
try { try {
Path path = Paths.get("test_keys/pub/pep-test-alice-0x6FF00E97_pub.asc"); Path path = Paths.get("test_keys/pub/pep-test-alice-0x6FF00E97_pub.asc");
@ -116,20 +116,20 @@ class Testing {
System.out.println("cannot decrypt"); System.out.println("cannot decrypt");
ex.printStackTrace(); ex.printStackTrace();
} }
System.out.println(result.dst.getShortmsg()); System.out.println(result.dst.getShortmsg());
System.out.println(result.dst.getLongmsg()); System.out.println(result.dst.getLongmsg());
System.out.println("TEST DONE - FINISHED"); System.out.println("TEST DONE - FINISHED");
try { try {
e.key_reset_all_own_keys(); e.key_reset_all_own_keys();
} }
catch (pEpException ex) { catch (pEpException ex) {
System.out.println("cannot reset all own keys"); System.out.println("cannot reset all own keys");
ex.printStackTrace(); ex.printStackTrace();
} }
//e.startSync(); e.startSync();
// Keygen // Keygen
System.out.println("Generating keys: "); System.out.println("Generating keys: ");
@ -154,4 +154,3 @@ class Testing {
System.exit(0); System.exit(0);
} }
} }

Loading…
Cancel
Save