From f4d192459f9f0c8a2152ca58509c67b11436359b Mon Sep 17 00:00:00 2001 From: Oleh Date: Thu, 22 Feb 2024 13:41:42 +0000 Subject: [PATCH] add tests --- Makefile.am | 4 ++-- TestUtils.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index 5991003b..6ad95870 100644 --- a/Makefile.am +++ b/Makefile.am @@ -76,7 +76,7 @@ COMMON_SRC = SGXException.cpp ExitHandler.cpp zmq_src/ZMQClient.cpp zmq_src/RspM SGXWalletServer.cpp SGXRegistrationServer.cpp CSRManagerServer.cpp BLSCrypto.cpp CryptoTools.cpp \ DKGCrypto.cpp ServerInit.cpp BLSPrivateKeyShareSGX.cpp LevelDB.cpp ServerDataChecker.cpp SEKManager.cpp \ third_party/intel/sgx_stub.c third_party/intel/sgx_detect_linux.c third_party/intel/create_enclave.c \ - third_party/intel/oc_alloc.c ECDSAImpl.c sgxwallet.c SGXInfoServer.cpp ECDSACrypto.cpp + third_party/intel/oc_alloc.c ECDSAImpl.c TestUtils.cpp sgxwallet.c SGXInfoServer.cpp ECDSACrypto.cpp COMMON_ENCLAVE_SRC = secure_enclave_u.c secure_enclave_u.h sgxwallet_SOURCES = sgxwall.cpp $(COMMON_SRC) @@ -112,7 +112,7 @@ sgxwallet_LDADD=-l$(SGX_URTS_LIB) -l$(SGX_UAE_SERVICE_LIB) -LlibBLS/deps/deps_in -ljsonrpccpp-stub -ljsonrpccpp-server -ljsonrpccpp-client -ljsonrpccpp-common -ljsoncpp -lmicrohttpd \ -lboost_system -lboost_thread -lgnutls -lgcrypt -lidn2 -lcurl -lssl -lcrypto -lz -lpthread -lstdc++fs -testw_SOURCES=testw.cpp $(COMMON_SRC) TestUtils.cpp +testw_SOURCES=testw.cpp $(COMMON_SRC) nodist_testw_SOURCES=${nodist_sgxwallet_SOURCES} EXTRA_testw_DEPENDENCIES=${EXTRA_sgxwallet_DEPENDENCIES} testw_LDADD=${sgxwallet_LDADD} diff --git a/TestUtils.cpp b/TestUtils.cpp index 6006e879..579a41e3 100644 --- a/TestUtils.cpp +++ b/TestUtils.cpp @@ -823,7 +823,7 @@ void TestUtils::doDKGV2(StubClient &c, int n, int t, } for (size_t i = 0; i < n; ++i) { - REQUIRE( allPubKeysFromServer[i] == pubKeyShares[i + 1] ); + CHECK_STATE( allPubKeysFromServer[i] == pubKeyShares[i + 1] ); } // create pub key