2019-04-26 18:27:27 +03:00
|
|
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
# Licensed under the Apache 2.0 License.
|
2021-09-06 18:29:19 +03:00
|
|
|
cmake_minimum_required(VERSION 3.16)
|
2019-04-26 18:27:27 +03:00
|
|
|
|
|
|
|
set(CCF_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
include(${CCF_DIR}/cmake/preproject.cmake)
|
2020-06-25 13:45:58 +03:00
|
|
|
include(${CCF_DIR}/cmake/version.cmake)
|
2019-04-26 18:27:27 +03:00
|
|
|
|
2020-01-28 21:09:42 +03:00
|
|
|
project(
|
2022-06-14 21:45:43 +03:00
|
|
|
${CCF_PROJECT}
|
2020-06-25 13:45:58 +03:00
|
|
|
VERSION ${CCF_RELEASE_VERSION}
|
2020-01-28 21:09:42 +03:00
|
|
|
LANGUAGES C CXX
|
|
|
|
)
|
2019-04-26 18:27:27 +03:00
|
|
|
|
2021-04-29 14:04:35 +03:00
|
|
|
message(STATUS "CCF version = ${CCF_VERSION}")
|
|
|
|
message(STATUS "CCF release version = ${CCF_RELEASE_VERSION}")
|
|
|
|
message(STATUS "CCF version suffix = ${CCF_VERSION_SUFFIX}")
|
2020-06-15 17:29:24 +03:00
|
|
|
|
2020-07-31 13:46:52 +03:00
|
|
|
include(${CCF_DIR}/cmake/cpack_settings.cmake)
|
|
|
|
|
2020-01-28 21:09:42 +03:00
|
|
|
# Set the default install prefix for CCF. Users may override this value with the
|
|
|
|
# cmake command. For example:
|
2020-01-21 18:14:27 +03:00
|
|
|
#
|
2020-01-28 21:09:42 +03:00
|
|
|
# $ cmake -DCMAKE_INSTALL_PREFIX=/opt/myplace ..
|
2020-01-21 18:14:27 +03:00
|
|
|
#
|
2020-01-28 21:09:42 +03:00
|
|
|
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
2020-01-21 18:14:27 +03:00
|
|
|
set(CMAKE_INSTALL_PREFIX
|
2022-06-14 21:45:43 +03:00
|
|
|
"/opt/${CCF_PROJECT}"
|
2020-01-28 21:09:42 +03:00
|
|
|
CACHE PATH "Default install prefix" FORCE
|
|
|
|
)
|
2020-01-21 18:14:27 +03:00
|
|
|
endif()
|
|
|
|
|
|
|
|
message(STATUS "CMAKE_INSTALL_PREFIX is '${CMAKE_INSTALL_PREFIX}'")
|
|
|
|
|
2020-01-29 18:09:28 +03:00
|
|
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake/preproject.cmake
|
|
|
|
DESTINATION cmake
|
|
|
|
)
|
|
|
|
|
2020-12-03 17:30:32 +03:00
|
|
|
include(GNUInstallDirs)
|
|
|
|
|
2019-12-16 14:55:33 +03:00
|
|
|
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/common.cmake)
|
2020-03-06 14:52:17 +03:00
|
|
|
|
2021-05-06 21:47:00 +03:00
|
|
|
set(CMAKE_GENERATED_COMMENT
|
|
|
|
"This file was auto-generated by CMake from a corresponding *.in file. DO NOT EDIT"
|
|
|
|
)
|
|
|
|
configure_file(
|
|
|
|
${CCF_DIR}/src/common/version.h.in ${CCF_DIR}/include/ccf/version.h @ONLY
|
|
|
|
)
|
2020-06-25 13:45:58 +03:00
|
|
|
configure_file(
|
2021-05-06 21:47:00 +03:00
|
|
|
${CCF_DIR}/python/version.py.in ${CCF_DIR}/python/version.py @ONLY
|
2020-06-25 13:45:58 +03:00
|
|
|
)
|
2021-05-06 21:47:00 +03:00
|
|
|
install(FILES ${CCF_DIR}/include/ccf/version.h DESTINATION include/ccf)
|
2020-06-25 13:45:58 +03:00
|
|
|
|
2022-01-27 14:57:49 +03:00
|
|
|
file(READ ${CCF_DIR}/doc/host_config_schema/cchost_config.json
|
|
|
|
HOST_CONFIG_SCHEMA
|
|
|
|
)
|
|
|
|
configure_file(
|
|
|
|
${CCF_DIR}/src/host/config_schema.h.in ${CCF_DIR}/src/host/config_schema.h
|
|
|
|
@ONLY
|
|
|
|
)
|
|
|
|
|
2021-10-06 18:42:07 +03:00
|
|
|
if(ENABLE_BFT AND (WORKER_THREADS EQUAL 0))
|
2021-11-25 15:58:35 +03:00
|
|
|
set(CONSENSUSES cft bft)
|
2021-09-10 13:20:04 +03:00
|
|
|
set(CONSENSUS_FILTER all)
|
2021-03-26 19:49:12 +03:00
|
|
|
else()
|
2021-11-25 15:58:35 +03:00
|
|
|
set(CONSENSUSES cft)
|
|
|
|
set(CONSENSUS_FILTER cft)
|
2021-03-26 19:49:12 +03:00
|
|
|
endif()
|
2019-12-16 14:55:33 +03:00
|
|
|
|
2019-04-26 18:27:27 +03:00
|
|
|
option(BUILD_TESTS "Build tests" ON)
|
2020-03-26 18:30:06 +03:00
|
|
|
option(BUILD_UNIT_TESTS "Build unit tests" ON)
|
2020-04-07 13:05:24 +03:00
|
|
|
option(TLS_TEST "TLS Test using https://github.com/drwetter/testssl.sh" OFF)
|
2021-06-25 13:23:31 +03:00
|
|
|
option(BUILD_TPCC "Build TPPC sample app and clients" OFF)
|
2022-08-16 23:11:00 +03:00
|
|
|
option(
|
|
|
|
FORCE_ENABLE_XAPIC_MITIGATION
|
|
|
|
"Always enable aligned reads from host-memory to mitigate xAPIC stale data read vulnerability. When this setting is off, the mitigation is enabled at run-time when vulnerable hardware is detected"
|
|
|
|
OFF
|
|
|
|
)
|
2019-04-30 13:30:59 +03:00
|
|
|
|
2022-08-17 15:54:04 +03:00
|
|
|
# Allow framework code to use LOG_*_FMT macros. These will be removed from
|
|
|
|
# public headers in future
|
|
|
|
add_compile_definitions(CCF_LOGGER_NO_DEPRECATE)
|
|
|
|
|
2020-01-28 17:06:12 +03:00
|
|
|
# Build common library for CCF enclaves
|
|
|
|
add_custom_target(ccf ALL)
|
|
|
|
|
2021-03-25 17:19:15 +03:00
|
|
|
set(CCF_IMPL_SOURCE
|
2021-04-30 11:59:25 +03:00
|
|
|
${CCF_DIR}/src/enclave/main.cpp ${CCF_DIR}/src/enclave/enclave_time.cpp
|
|
|
|
${CCF_DIR}/src/enclave/thread_local.cpp ${CCF_DIR}/src/js/wrap.cpp
|
2022-03-04 12:10:42 +03:00
|
|
|
${CCF_DIR}/src/node/quote.cpp
|
2021-03-25 17:19:15 +03:00
|
|
|
)
|
|
|
|
|
2020-03-25 17:50:30 +03:00
|
|
|
if("sgx" IN_LIST COMPILE_TARGETS)
|
2020-01-28 17:06:12 +03:00
|
|
|
# enclave version
|
2021-09-07 22:36:36 +03:00
|
|
|
add_enclave_library(
|
|
|
|
ccf.enclave ${CCF_IMPL_SOURCE} ${CCF_GENERATED_DIR}/ccf_t.cpp
|
2020-01-28 17:06:12 +03:00
|
|
|
)
|
|
|
|
|
2020-07-21 18:08:25 +03:00
|
|
|
add_warning_checks(ccf.enclave)
|
2020-01-28 17:06:12 +03:00
|
|
|
|
2020-01-28 21:09:42 +03:00
|
|
|
target_include_directories(
|
2020-01-29 18:09:28 +03:00
|
|
|
ccf.enclave SYSTEM
|
2021-03-25 17:19:15 +03:00
|
|
|
PUBLIC
|
|
|
|
$<BUILD_INTERFACE:${CCF_GENERATED_DIR}>
|
|
|
|
$<INSTALL_INTERFACE:include/ccf/> #< This contains the private headers
|
|
|
|
#< which are currently under src, and
|
|
|
|
#< should be removed or renamed
|
|
|
|
$<INSTALL_INTERFACE:include/>
|
|
|
|
$<INSTALL_INTERFACE:include/3rdparty/>
|
2020-01-28 17:06:12 +03:00
|
|
|
)
|
|
|
|
|
2020-01-28 21:09:42 +03:00
|
|
|
target_link_libraries(
|
2021-09-07 22:36:36 +03:00
|
|
|
ccf.enclave PUBLIC quickjs.enclave ccfcrypto.enclave http_parser.enclave
|
2022-02-23 19:50:49 +03:00
|
|
|
sss.enclave ccf_endpoints.enclave ccf_kv.enclave
|
2020-01-28 17:06:12 +03:00
|
|
|
)
|
|
|
|
|
2021-12-08 12:41:14 +03:00
|
|
|
if(ENABLE_HTTP2)
|
|
|
|
target_link_libraries(ccf.enclave PUBLIC nghttp2.enclave)
|
|
|
|
endif()
|
|
|
|
|
2020-01-28 17:06:12 +03:00
|
|
|
enable_quote_code(ccf.enclave)
|
|
|
|
|
2020-07-28 13:56:45 +03:00
|
|
|
add_lvi_mitigations(ccf.enclave)
|
|
|
|
|
2020-01-29 18:09:28 +03:00
|
|
|
install(
|
|
|
|
TARGETS ccf.enclave
|
|
|
|
EXPORT ccf
|
|
|
|
DESTINATION lib
|
|
|
|
)
|
2020-01-28 17:06:12 +03:00
|
|
|
|
|
|
|
add_dependencies(ccf ccf.enclave)
|
|
|
|
endif()
|
|
|
|
|
2020-03-25 17:50:30 +03:00
|
|
|
if("virtual" IN_LIST COMPILE_TARGETS)
|
2020-01-28 17:06:12 +03:00
|
|
|
# virtual version
|
2021-03-25 17:19:15 +03:00
|
|
|
add_library(ccf.virtual STATIC ${CCF_IMPL_SOURCE})
|
2020-01-28 17:06:12 +03:00
|
|
|
|
2020-01-28 21:09:42 +03:00
|
|
|
target_compile_definitions(
|
|
|
|
ccf.virtual PUBLIC INSIDE_ENCLAVE VIRTUAL_ENCLAVE
|
|
|
|
_LIBCPP_HAS_THREAD_API_PTHREAD
|
2020-01-28 17:06:12 +03:00
|
|
|
)
|
|
|
|
|
2021-02-25 20:34:07 +03:00
|
|
|
target_compile_options(ccf.virtual PUBLIC ${COMPILE_LIBCXX})
|
2020-07-21 18:08:25 +03:00
|
|
|
add_warning_checks(ccf.virtual)
|
2020-01-28 17:06:12 +03:00
|
|
|
|
2020-01-28 21:09:42 +03:00
|
|
|
target_include_directories(
|
2020-01-29 18:09:28 +03:00
|
|
|
ccf.virtual SYSTEM
|
2021-03-25 17:19:15 +03:00
|
|
|
PUBLIC
|
|
|
|
$<BUILD_INTERFACE:${CCF_GENERATED_DIR}>
|
|
|
|
$<INSTALL_INTERFACE:include/ccf/> #< This contains the private headers
|
|
|
|
#< which are currently under src, and
|
|
|
|
#< should be removed or renamed
|
|
|
|
$<INSTALL_INTERFACE:include/>
|
|
|
|
$<INSTALL_INTERFACE:include/3rdparty/>
|
2020-01-28 17:06:12 +03:00
|
|
|
)
|
|
|
|
|
2020-01-28 21:09:42 +03:00
|
|
|
target_link_libraries(
|
|
|
|
ccf.virtual
|
2020-05-28 11:39:05 +03:00
|
|
|
PUBLIC ${LINK_LIBCXX}
|
2020-05-06 16:03:17 +03:00
|
|
|
-lgcc
|
2020-01-28 21:09:42 +03:00
|
|
|
ccfcrypto.host
|
|
|
|
http_parser.host
|
2021-03-18 12:01:12 +03:00
|
|
|
quickjs.host
|
2020-02-07 12:15:54 +03:00
|
|
|
sss.host
|
2021-03-25 17:19:15 +03:00
|
|
|
ccf_endpoints.host
|
2022-02-23 19:50:49 +03:00
|
|
|
ccf_kv.host
|
2021-02-23 21:58:30 +03:00
|
|
|
openenclave::oehost
|
2020-01-28 21:09:42 +03:00
|
|
|
${CMAKE_THREAD_LIBS_INIT}
|
2020-01-28 17:06:12 +03:00
|
|
|
)
|
|
|
|
|
2021-12-08 12:41:14 +03:00
|
|
|
if(ENABLE_HTTP2)
|
|
|
|
target_link_libraries(ccf.virtual PUBLIC nghttp2.host)
|
|
|
|
endif()
|
|
|
|
|
2020-01-28 21:09:42 +03:00
|
|
|
set_property(TARGET ccf.virtual PROPERTY POSITION_INDEPENDENT_CODE ON)
|
2020-01-28 17:06:12 +03:00
|
|
|
|
|
|
|
add_san(ccf.virtual)
|
|
|
|
|
2020-01-29 18:09:28 +03:00
|
|
|
install(
|
|
|
|
TARGETS ccf.virtual
|
|
|
|
EXPORT ccf
|
|
|
|
DESTINATION lib
|
|
|
|
)
|
2020-01-28 17:06:12 +03:00
|
|
|
|
|
|
|
add_dependencies(ccf ccf.virtual)
|
|
|
|
endif()
|
|
|
|
|
2020-12-03 17:30:32 +03:00
|
|
|
install(
|
|
|
|
EXPORT ccf
|
|
|
|
DESTINATION cmake
|
|
|
|
FILE ccf-targets.cmake
|
|
|
|
)
|
2020-01-29 18:09:28 +03:00
|
|
|
|
2021-03-29 13:50:26 +03:00
|
|
|
# Install exported 3rd-party library includes
|
|
|
|
install(
|
|
|
|
DIRECTORY 3rdparty/exported/
|
|
|
|
DESTINATION include/3rdparty
|
|
|
|
FILES_MATCHING
|
|
|
|
PATTERN "*.h"
|
|
|
|
PATTERN "*.hpp"
|
|
|
|
)
|
2020-01-29 18:09:28 +03:00
|
|
|
|
2022-03-29 11:25:43 +03:00
|
|
|
# Install all private CCF headers, which may still be needed
|
2020-01-29 18:09:28 +03:00
|
|
|
install(
|
|
|
|
DIRECTORY src/
|
2022-03-29 11:25:43 +03:00
|
|
|
DESTINATION include/ccf/_private
|
2020-01-29 18:09:28 +03:00
|
|
|
FILES_MATCHING
|
|
|
|
PATTERN "*.h"
|
|
|
|
PATTERN "*/test*" EXCLUDE
|
|
|
|
)
|
|
|
|
|
2021-03-01 23:27:07 +03:00
|
|
|
# Install all public CCF headers
|
|
|
|
install(
|
|
|
|
DIRECTORY include/
|
|
|
|
DESTINATION include
|
|
|
|
FILES_MATCHING
|
|
|
|
PATTERN "*.h"
|
|
|
|
)
|
|
|
|
|
2020-01-29 18:09:28 +03:00
|
|
|
# Install CCF Python infrastructure
|
|
|
|
install(
|
|
|
|
DIRECTORY tests/infra/
|
2020-02-07 17:29:02 +03:00
|
|
|
DESTINATION bin/infra
|
2020-01-29 18:09:28 +03:00
|
|
|
FILES_MATCHING
|
|
|
|
PATTERN "*.py"
|
|
|
|
PATTERN "*/__pycache__*" EXCLUDE
|
|
|
|
)
|
|
|
|
|
2020-10-05 13:00:31 +03:00
|
|
|
install(PROGRAMS tests/sandbox/sandbox.sh DESTINATION bin)
|
2022-01-13 21:31:53 +03:00
|
|
|
install(FILES samples/constitutions/default/actions.js DESTINATION bin)
|
|
|
|
install(FILES samples/constitutions/default/validate.js DESTINATION bin)
|
|
|
|
install(FILES samples/constitutions/sandbox/resolve.js DESTINATION bin)
|
|
|
|
install(FILES samples/constitutions/default/apply.js DESTINATION bin)
|
2020-01-29 18:09:28 +03:00
|
|
|
install(FILES tests/start_network.py DESTINATION bin)
|
2020-02-07 17:29:02 +03:00
|
|
|
install(FILES tests/requirements.txt DESTINATION bin)
|
2020-01-29 18:09:28 +03:00
|
|
|
|
2020-11-25 13:55:12 +03:00
|
|
|
# Generate an ephemeral signing key
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/signing_key.pem
|
|
|
|
COMMAND openssl genrsa -out ${CMAKE_CURRENT_BINARY_DIR}/signing_key.pem -3
|
|
|
|
3072
|
|
|
|
)
|
|
|
|
add_custom_target(
|
|
|
|
signing_key ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/signing_key.pem
|
|
|
|
)
|
|
|
|
|
2022-08-17 15:54:04 +03:00
|
|
|
# Add sample apps
|
|
|
|
add_subdirectory(${CCF_DIR}/samples)
|
2021-01-18 15:06:58 +03:00
|
|
|
|
2020-01-28 21:09:42 +03:00
|
|
|
if(BUILD_TESTS)
|
2019-04-26 18:27:27 +03:00
|
|
|
enable_testing()
|
|
|
|
|
2019-10-15 17:09:54 +03:00
|
|
|
# Unit tests
|
2020-03-26 18:30:06 +03:00
|
|
|
if(BUILD_UNIT_TESTS)
|
|
|
|
add_unit_test(map_test ${CMAKE_CURRENT_SOURCE_DIR}/src/ds/test/map_test.cpp)
|
2019-04-26 18:27:27 +03:00
|
|
|
|
2020-03-26 18:30:06 +03:00
|
|
|
add_unit_test(
|
|
|
|
json_schema ${CMAKE_CURRENT_SOURCE_DIR}/src/ds/test/json_schema.cpp
|
|
|
|
)
|
Json schema: Take 3 (#113)
* Add a getApi method, listing all installed RPC method names
* Sketch RecordParams struct
* WIP
* Broken WIP
* Partial macro
* Basic examples working
* Partial file separation
* Move, rename, and fix FOR macro
* Use json get
* Build to_json from RequiredJsonFields too
* Remove unneeded pair specialisation
* Add comments, collide required and optional
* REformat
* Use new macros everywhere
* Remove unused template
* Rename getApi to listMethods
* Move frontend-specific calltypes to /rpc
* Specify GetTxHist return type
* Pretty-print client responses by default
* Add a GetSchema RPC
* Other tools demand ugly formatting by default
* mins and maxes for numerics, map of schemas
* Support _FOR_JSON_0
* Fix support for std::optional optional fields
* Test std optionals
* Define schemas for GetCommit
* More definitions for existing RPCs
* Tidy schema generation, including for vectors
* Add proper unit test
* Initial test of schema generation
* Fix failing tests
* Formatting
* Add (currently failing) test of nested structs
* Add misleadingly passing test
* Set correct expected pointers, test currently fails
* Oops - deexpand
* Correctly build pointer path for erroneous array elements
* Demonstrate invalid, not just missing, valeus
* Skeleton of json_bench
* Fix typo
* WIP
* Compare manual json parsers vs macro-defined
* mumble mumble
* Add valijson, +basic test
* Add benchmark of valijson validation
* Benchmark simple and complex structs
* Additional broken schema test
* Include pointer to parse errors
* Restore old basic translator macro
* Restore simpler macro for translators that don't need schema
* Add auto schema for private logging methods
* Add manual schema + validation for PUBLIC logging RPCs
* Match RPC format
* More RPC format fixes
* Correct scenario test target
* Add documentation entry on API schema
* Initial schema retrieval test
* Correct URLs in generated schema
* Send schema to a flat folder
* Remove unnecessary size_t max restriction
* Report non-matching schema
* Add current schemas
* Tidying
* clang-format
* Remove schema generation e2e test
* fmtlib, remove $id from schema
* Fix pointer paths
2019-06-05 12:36:50 +03:00
|
|
|
|
2022-08-17 11:51:14 +03:00
|
|
|
add_unit_test(
|
|
|
|
logger_test ${CMAKE_CURRENT_SOURCE_DIR}/src/ds/test/logger.cpp
|
|
|
|
)
|
|
|
|
|
2020-09-25 12:16:12 +03:00
|
|
|
add_unit_test(
|
|
|
|
openapi_test ${CMAKE_CURRENT_SOURCE_DIR}/src/ds/test/openapi.cpp
|
|
|
|
)
|
|
|
|
target_link_libraries(openapi_test PRIVATE http_parser.host)
|
|
|
|
|
2020-03-26 18:30:06 +03:00
|
|
|
add_unit_test(
|
|
|
|
logger_json_test
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/ds/test/logger_json_test.cpp
|
|
|
|
)
|
2021-04-01 19:27:55 +03:00
|
|
|
target_compile_definitions(logger_json_test PUBLIC VERBOSE_LOGGING)
|
2019-09-04 14:03:33 +03:00
|
|
|
|
2020-03-26 18:30:06 +03:00
|
|
|
add_unit_test(
|
2020-06-29 17:07:27 +03:00
|
|
|
kv_test
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/kv/test/kv_test.cpp
|
2020-03-26 18:30:06 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/kv/test/kv_contention.cpp
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/kv/test/kv_serialisation.cpp
|
2020-06-29 17:07:27 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/kv/test/kv_snapshot.cpp
|
2020-08-24 17:09:06 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/kv/test/kv_dynamic_tables.cpp
|
2020-03-26 18:30:06 +03:00
|
|
|
)
|
|
|
|
target_link_libraries(
|
2022-02-23 19:50:49 +03:00
|
|
|
kv_test PRIVATE ${CMAKE_THREAD_LIBS_INIT} http_parser.host ccf_kv.host
|
2020-03-26 18:30:06 +03:00
|
|
|
)
|
2019-04-26 18:27:27 +03:00
|
|
|
|
2020-03-26 18:30:06 +03:00
|
|
|
add_unit_test(
|
|
|
|
ds_test
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/ds/test/ring_buffer.cpp
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/ds/test/messaging.cpp
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/ds/test/oversized.cpp
|
2020-06-09 12:25:26 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/ds/test/typed_messages.cpp
|
2020-03-26 18:30:06 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/ds/test/serializer.cpp
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/ds/test/hash.cpp
|
2020-07-27 22:29:24 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/ds/test/thread_messaging.cpp
|
2021-02-22 15:02:16 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/ds/test/lru.cpp
|
2021-03-18 14:25:55 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/ds/test/hex.cpp
|
2021-12-01 12:25:42 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/ds/test/contiguous_set.cpp
|
2021-12-06 19:56:05 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/ds/test/unit_strings.cpp
|
2020-03-26 18:30:06 +03:00
|
|
|
)
|
|
|
|
target_link_libraries(ds_test PRIVATE ${CMAKE_THREAD_LIBS_INIT})
|
2020-01-28 21:09:42 +03:00
|
|
|
|
2020-03-26 18:30:06 +03:00
|
|
|
add_unit_test(
|
|
|
|
ledger_test ${CMAKE_CURRENT_SOURCE_DIR}/src/host/test/ledger.cpp
|
|
|
|
)
|
2020-01-28 21:09:42 +03:00
|
|
|
|
2020-03-26 18:30:06 +03:00
|
|
|
add_unit_test(
|
2020-09-04 10:49:02 +03:00
|
|
|
raft_test ${CMAKE_CURRENT_SOURCE_DIR}/src/consensus/aft/test/main.cpp
|
2020-09-17 13:38:23 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/consensus/aft/test/view_history.cpp
|
2021-08-03 18:40:56 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/consensus/aft/test/committable_suffix.cpp
|
2020-03-26 18:30:06 +03:00
|
|
|
)
|
2021-02-25 20:34:07 +03:00
|
|
|
target_link_libraries(raft_test PRIVATE ccfcrypto.host)
|
2020-01-28 21:09:42 +03:00
|
|
|
|
2020-03-26 18:30:06 +03:00
|
|
|
add_unit_test(
|
|
|
|
raft_enclave_test
|
2020-09-04 10:49:02 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/consensus/aft/test/enclave.cpp
|
2020-03-26 18:30:06 +03:00
|
|
|
)
|
|
|
|
target_include_directories(raft_enclave_test PRIVATE ${CCFCRYPTO_INC})
|
2021-02-25 20:34:07 +03:00
|
|
|
target_link_libraries(raft_enclave_test PRIVATE ccfcrypto.host)
|
2019-04-26 18:27:27 +03:00
|
|
|
|
2020-03-26 18:30:06 +03:00
|
|
|
add_unit_test(
|
|
|
|
crypto_test ${CMAKE_CURRENT_SOURCE_DIR}/src/crypto/test/crypto.cpp
|
|
|
|
)
|
|
|
|
target_include_directories(crypto_test PRIVATE ${CCFCRYPTO_INC})
|
2021-02-25 20:34:07 +03:00
|
|
|
target_link_libraries(crypto_test PRIVATE ccfcrypto.host)
|
2020-01-28 21:09:42 +03:00
|
|
|
|
2021-11-04 18:49:26 +03:00
|
|
|
add_unit_test(
|
|
|
|
key_exchange_test
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/crypto/test/key_exchange.cpp
|
|
|
|
)
|
|
|
|
target_link_libraries(key_exchange_test PRIVATE)
|
|
|
|
|
2020-03-26 18:30:06 +03:00
|
|
|
add_unit_test(
|
|
|
|
history_test ${CMAKE_CURRENT_SOURCE_DIR}/src/node/test/history.cpp
|
|
|
|
)
|
2022-02-23 19:50:49 +03:00
|
|
|
target_link_libraries(
|
|
|
|
history_test PRIVATE ccfcrypto.host http_parser.host ccf_kv.host
|
|
|
|
)
|
2020-01-28 21:09:42 +03:00
|
|
|
|
2020-03-26 18:30:06 +03:00
|
|
|
add_unit_test(
|
|
|
|
secret_sharing_test
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/node/test/secret_share.cpp
|
|
|
|
)
|
|
|
|
target_link_libraries(secret_sharing_test PRIVATE sss.host)
|
2020-02-18 12:28:05 +03:00
|
|
|
|
2020-03-26 18:30:06 +03:00
|
|
|
add_unit_test(
|
|
|
|
encryptor_test ${CMAKE_CURRENT_SOURCE_DIR}/src/node/test/encryptor.cpp
|
|
|
|
)
|
2022-02-23 19:50:49 +03:00
|
|
|
target_link_libraries(encryptor_test PRIVATE ccfcrypto.host ccf_kv.host)
|
2019-04-26 18:27:27 +03:00
|
|
|
|
2020-06-11 11:59:30 +03:00
|
|
|
add_unit_test(
|
2020-06-15 17:58:45 +03:00
|
|
|
historical_queries_test
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/node/test/historical_queries.cpp
|
2022-04-29 15:03:22 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/node/test/receipt.cpp
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/node/receipt.cpp
|
2020-06-11 11:59:30 +03:00
|
|
|
)
|
2021-02-19 17:03:12 +03:00
|
|
|
target_link_libraries(
|
2022-02-23 19:50:49 +03:00
|
|
|
historical_queries_test PRIVATE http_parser.host sss.host ccf_kv.host
|
2021-02-19 17:03:12 +03:00
|
|
|
)
|
2020-06-11 11:59:30 +03:00
|
|
|
|
2022-01-14 18:49:56 +03:00
|
|
|
add_unit_test(
|
|
|
|
indexing_test ${CMAKE_CURRENT_SOURCE_DIR}/src/indexing/test/indexing.cpp
|
2022-01-31 22:29:03 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/indexing/test/lfs.cpp
|
2022-01-14 18:49:56 +03:00
|
|
|
)
|
2022-02-23 19:50:49 +03:00
|
|
|
target_link_libraries(
|
|
|
|
indexing_test PRIVATE ccf_endpoints.host sss.host ccf_kv.host
|
|
|
|
)
|
2022-01-14 18:49:56 +03:00
|
|
|
|
2020-08-18 17:53:51 +03:00
|
|
|
add_unit_test(
|
|
|
|
snapshot_test ${CMAKE_CURRENT_SOURCE_DIR}/src/node/test/snapshot.cpp
|
|
|
|
)
|
2022-02-23 19:50:49 +03:00
|
|
|
target_link_libraries(snapshot_test PRIVATE ccf_kv.host)
|
2020-08-18 17:53:51 +03:00
|
|
|
|
2020-09-30 17:42:35 +03:00
|
|
|
add_unit_test(
|
|
|
|
snapshotter_test
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/node/test/snapshotter.cpp
|
|
|
|
)
|
2022-03-01 12:46:16 +03:00
|
|
|
target_link_libraries(
|
|
|
|
snapshotter_test PRIVATE ccf_kv.host ccf_endpoints.host
|
|
|
|
)
|
2020-09-30 17:42:35 +03:00
|
|
|
|
2021-08-09 19:00:40 +03:00
|
|
|
add_unit_test(
|
|
|
|
node_info_json_test
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/node/test/node_info_json.cpp
|
|
|
|
)
|
|
|
|
|
2021-12-01 16:15:16 +03:00
|
|
|
add_unit_test(tls_test ${CMAKE_CURRENT_SOURCE_DIR}/src/tls/test/main.cpp)
|
|
|
|
target_link_libraries(tls_test PRIVATE ${CMAKE_THREAD_LIBS_INIT})
|
|
|
|
|
2021-11-26 16:32:09 +03:00
|
|
|
add_unit_test(
|
|
|
|
base64_test ${CMAKE_CURRENT_SOURCE_DIR}/src/crypto/test/base64.cpp
|
|
|
|
)
|
|
|
|
target_link_libraries(base64_test PRIVATE ${CMAKE_THREAD_LIBS_INIT})
|
2019-04-26 18:27:27 +03:00
|
|
|
|
2021-11-26 16:32:09 +03:00
|
|
|
add_test_bin(
|
|
|
|
kp_cert_test ${CMAKE_CURRENT_SOURCE_DIR}/src/crypto/test/kp_cert.cpp
|
|
|
|
)
|
|
|
|
target_link_libraries(kp_cert_test PRIVATE ${CMAKE_THREAD_LIBS_INIT})
|
2020-09-01 19:35:05 +03:00
|
|
|
|
2020-03-26 18:30:06 +03:00
|
|
|
add_unit_test(
|
|
|
|
channels_test ${CMAKE_CURRENT_SOURCE_DIR}/src/node/test/channels.cpp
|
|
|
|
)
|
2021-02-18 18:13:14 +03:00
|
|
|
target_link_libraries(channels_test PRIVATE)
|
2019-04-26 18:27:27 +03:00
|
|
|
|
2020-03-26 18:30:06 +03:00
|
|
|
add_unit_test(
|
|
|
|
http_test ${CMAKE_CURRENT_SOURCE_DIR}/src/http/test/http_test.cpp
|
|
|
|
)
|
2021-02-18 18:13:14 +03:00
|
|
|
target_link_libraries(http_test PRIVATE http_parser.host)
|
2019-09-30 13:26:31 +03:00
|
|
|
|
2020-03-26 18:30:06 +03:00
|
|
|
add_unit_test(
|
2021-03-18 12:01:12 +03:00
|
|
|
frontend_test ${CMAKE_CURRENT_SOURCE_DIR}/src/js/wrap.cpp
|
2020-03-26 18:30:06 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/node/rpc/test/frontend_test.cpp
|
2021-04-30 11:59:25 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/enclave/enclave_time.cpp
|
2020-03-26 18:30:06 +03:00
|
|
|
)
|
|
|
|
target_link_libraries(
|
2021-04-14 21:14:40 +03:00
|
|
|
frontend_test PRIVATE ${CMAKE_THREAD_LIBS_INIT} http_parser.host sss.host
|
2022-02-23 19:50:49 +03:00
|
|
|
ccf_endpoints.host ccf_kv.host quickjs.host
|
2020-03-26 18:30:06 +03:00
|
|
|
)
|
2020-01-28 21:09:42 +03:00
|
|
|
|
2020-05-01 15:55:20 +03:00
|
|
|
add_unit_test(
|
|
|
|
tx_status_test
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/node/rpc/test/tx_status_test.cpp
|
|
|
|
)
|
|
|
|
|
2021-02-03 13:09:59 +03:00
|
|
|
add_unit_test(
|
2021-03-18 12:01:12 +03:00
|
|
|
proposal_id_test ${CMAKE_CURRENT_SOURCE_DIR}/src/js/wrap.cpp
|
2021-02-03 13:09:59 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/node/rpc/test/proposal_id_test.cpp
|
|
|
|
)
|
|
|
|
target_link_libraries(
|
2022-02-23 19:50:49 +03:00
|
|
|
proposal_id_test
|
|
|
|
PRIVATE ${CMAKE_THREAD_LIBS_INIT} http_parser.host sss.host
|
|
|
|
ccf_endpoints.host quickjs.host ccf_kv.host
|
2020-03-26 18:30:06 +03:00
|
|
|
)
|
2020-01-28 21:09:42 +03:00
|
|
|
|
2020-03-26 18:30:06 +03:00
|
|
|
add_unit_test(
|
2022-06-28 22:23:04 +03:00
|
|
|
node_frontend_test ${CMAKE_CURRENT_SOURCE_DIR}/src/js/wrap.cpp
|
2020-03-26 18:30:06 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/node/rpc/test/node_frontend_test.cpp
|
|
|
|
)
|
|
|
|
target_link_libraries(
|
2022-06-28 22:23:04 +03:00
|
|
|
node_frontend_test
|
|
|
|
PRIVATE ${CMAKE_THREAD_LIBS_INIT} http_parser.host sss.host
|
|
|
|
ccf_endpoints.host ccf_kv.host quickjs.host
|
2020-03-26 18:30:06 +03:00
|
|
|
)
|
|
|
|
|
2020-06-11 15:50:24 +03:00
|
|
|
add_unit_test(
|
|
|
|
merkle_test ${CMAKE_CURRENT_SOURCE_DIR}/src/node/test/merkle_test.cpp
|
|
|
|
)
|
|
|
|
|
2020-03-26 18:30:06 +03:00
|
|
|
# Merkle Tree memory test
|
|
|
|
add_executable(merkle_mem src/node/test/merkle_mem.cpp)
|
2021-03-30 15:13:12 +03:00
|
|
|
target_compile_options(merkle_mem PRIVATE ${COMPILE_LIBCXX})
|
|
|
|
target_link_libraries(
|
|
|
|
merkle_mem PRIVATE ${CMAKE_THREAD_LIBS_INIT} ${LINK_LIBCXX} crypto
|
|
|
|
)
|
2020-12-11 22:32:21 +03:00
|
|
|
|
2020-03-26 18:30:06 +03:00
|
|
|
# Raft driver and scenario test
|
|
|
|
add_executable(
|
2020-09-04 10:49:02 +03:00
|
|
|
raft_driver ${CMAKE_CURRENT_SOURCE_DIR}/src/consensus/aft/test/driver.cpp
|
2020-03-26 18:30:06 +03:00
|
|
|
)
|
2021-02-18 18:13:14 +03:00
|
|
|
target_link_libraries(raft_driver PRIVATE ccfcrypto.host)
|
2020-09-04 10:49:02 +03:00
|
|
|
target_include_directories(raft_driver PRIVATE src/aft)
|
2020-03-26 18:30:06 +03:00
|
|
|
|
|
|
|
add_test(
|
|
|
|
NAME raft_scenario_test
|
|
|
|
COMMAND
|
|
|
|
${PYTHON} ${CMAKE_SOURCE_DIR}/tests/raft_scenarios_runner.py
|
2021-07-23 13:21:15 +03:00
|
|
|
--gen-scenarios ./raft_driver ${CMAKE_SOURCE_DIR}/tests/raft_scenarios/
|
2020-03-26 18:30:06 +03:00
|
|
|
)
|
|
|
|
set_property(TEST raft_scenario_test PROPERTY LABELS raft_scenario)
|
2020-09-01 19:35:05 +03:00
|
|
|
|
|
|
|
add_test(NAME csr_test COMMAND ${PYTHON} ${CMAKE_SOURCE_DIR}/tests/certs.py
|
2021-11-26 16:32:09 +03:00
|
|
|
./kp_cert_test
|
2020-09-01 19:35:05 +03:00
|
|
|
)
|
|
|
|
set_property(
|
|
|
|
TEST csr_test
|
|
|
|
APPEND
|
|
|
|
PROPERTY LABELS unit_test
|
|
|
|
)
|
2021-04-29 14:04:35 +03:00
|
|
|
|
2022-03-14 17:05:59 +03:00
|
|
|
if(NOT UNSAFE_VERSION)
|
|
|
|
# Unsafe builds do not follow normal version conventions
|
|
|
|
add_test(NAME versionifier_test
|
2022-07-01 13:09:21 +03:00
|
|
|
COMMAND ${PYTHON}
|
|
|
|
${CMAKE_SOURCE_DIR}/python/ccf/_versionifier.py
|
2022-03-14 17:05:59 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
add_test(NAME github_version_lts_test
|
|
|
|
COMMAND ${PYTHON} ${CMAKE_SOURCE_DIR}/tests/infra/github.py
|
|
|
|
)
|
|
|
|
endif()
|
2020-03-26 18:30:06 +03:00
|
|
|
endif()
|
2020-01-28 21:09:42 +03:00
|
|
|
|
|
|
|
# Picobench benchmarks
|
|
|
|
add_picobench(map_bench SRCS src/ds/test/map_bench.cpp)
|
|
|
|
add_picobench(logger_bench SRCS src/ds/test/logger_bench.cpp)
|
2021-04-01 19:27:55 +03:00
|
|
|
target_compile_definitions(logger_bench PUBLIC VERBOSE_LOGGING)
|
2020-01-28 21:09:42 +03:00
|
|
|
add_picobench(json_bench SRCS src/ds/test/json_bench.cpp)
|
2020-03-25 19:02:04 +03:00
|
|
|
add_picobench(ring_buffer_bench SRCS src/ds/test/ring_buffer_bench.cpp)
|
2020-01-28 21:09:42 +03:00
|
|
|
add_picobench(
|
2021-02-21 20:38:57 +03:00
|
|
|
crypto_bench
|
|
|
|
SRCS src/crypto/test/bench.cpp
|
2021-02-18 18:13:14 +03:00
|
|
|
LINK_LIBS
|
2019-10-14 13:23:15 +03:00
|
|
|
)
|
2022-02-23 19:50:49 +03:00
|
|
|
add_picobench(
|
|
|
|
history_bench
|
|
|
|
SRCS src/node/test/history_bench.cpp
|
|
|
|
LINK_LIBS ccf_kv.host
|
|
|
|
)
|
2021-03-31 17:57:47 +03:00
|
|
|
|
|
|
|
if(LONG_TESTS)
|
|
|
|
add_picobench(
|
2022-02-24 12:10:51 +03:00
|
|
|
kv_bench
|
|
|
|
SRCS src/kv/test/kv_bench.cpp src/enclave/thread_local.cpp
|
|
|
|
LINK_LIBS ccf_kv.host
|
2021-03-31 17:57:47 +03:00
|
|
|
)
|
|
|
|
add_picobench(merkle_bench SRCS src/node/test/merkle_bench.cpp)
|
|
|
|
add_picobench(hash_bench SRCS src/ds/test/hash_bench.cpp)
|
|
|
|
endif()
|
2019-04-26 18:27:27 +03:00
|
|
|
|
2021-04-14 21:14:40 +03:00
|
|
|
set(CONSTITUTION_ARGS
|
|
|
|
--constitution
|
2022-01-13 21:31:53 +03:00
|
|
|
${CCF_DIR}/samples/constitutions/default/actions.js
|
2021-04-14 21:14:40 +03:00
|
|
|
--constitution
|
2022-01-13 21:31:53 +03:00
|
|
|
${CCF_DIR}/samples/constitutions/test/test_actions.js
|
2021-04-14 21:14:40 +03:00
|
|
|
--constitution
|
2022-01-13 21:31:53 +03:00
|
|
|
${CCF_DIR}/samples/constitutions/default/validate.js
|
2021-04-14 21:14:40 +03:00
|
|
|
--constitution
|
2022-01-13 21:31:53 +03:00
|
|
|
${CCF_DIR}/samples/constitutions/test/resolve.js
|
2021-04-14 21:14:40 +03:00
|
|
|
--constitution
|
2022-01-13 21:31:53 +03:00
|
|
|
${CCF_DIR}/samples/constitutions/default/apply.js
|
2021-04-14 21:14:40 +03:00
|
|
|
)
|
2021-03-29 17:26:05 +03:00
|
|
|
|
2022-04-29 17:00:40 +03:00
|
|
|
if(LONG_TESTS)
|
|
|
|
set(ADDITIONAL_RECOVERY_ARGS --with-load)
|
|
|
|
endif()
|
|
|
|
|
2021-08-04 15:17:34 +03:00
|
|
|
add_e2e_test(
|
2021-11-25 15:58:35 +03:00
|
|
|
NAME recovery_test_cft
|
2021-08-04 15:17:34 +03:00
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/recovery.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2022-04-29 17:00:40 +03:00
|
|
|
ADDITIONAL_ARGS ${ADDITIONAL_RECOVERY_ARGS}
|
2021-08-04 15:17:34 +03:00
|
|
|
)
|
|
|
|
|
2021-08-27 18:24:58 +03:00
|
|
|
if(LONG_TESTS)
|
|
|
|
add_e2e_test(
|
|
|
|
NAME recovery_test_curve_256
|
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/recovery.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2021-08-27 18:24:58 +03:00
|
|
|
ADDITIONAL_ARGS --curve-id secp256r1
|
|
|
|
)
|
|
|
|
endif()
|
2021-04-27 18:55:02 +03:00
|
|
|
|
2020-05-06 19:56:53 +03:00
|
|
|
add_e2e_test(
|
|
|
|
NAME recovery_test_suite
|
2020-03-06 14:52:17 +03:00
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/e2e_suite.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2020-04-07 15:59:49 +03:00
|
|
|
LABEL suite
|
2021-12-20 20:29:35 +03:00
|
|
|
ADDITIONAL_ARGS --test-duration 150 --test-suite rekey_recovery
|
|
|
|
--test-suite membership_recovery
|
2020-03-06 14:52:17 +03:00
|
|
|
)
|
2019-11-08 23:39:11 +03:00
|
|
|
|
2020-07-03 14:02:26 +03:00
|
|
|
add_e2e_test(
|
|
|
|
NAME reconfiguration_test_suite
|
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/e2e_suite.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2020-07-03 14:02:26 +03:00
|
|
|
LABEL suite
|
2021-12-20 20:29:35 +03:00
|
|
|
ADDITIONAL_ARGS --test-duration 200 --test-suite reconfiguration
|
2021-01-19 18:44:36 +03:00
|
|
|
)
|
|
|
|
|
2020-06-17 16:22:26 +03:00
|
|
|
add_e2e_test(
|
|
|
|
NAME full_test_suite
|
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/e2e_suite.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2020-06-17 16:22:26 +03:00
|
|
|
LABEL suite
|
|
|
|
ADDITIONAL_ARGS
|
2020-10-15 10:57:52 +03:00
|
|
|
--oe-binary
|
|
|
|
${OE_BINDIR}
|
2020-06-17 16:22:26 +03:00
|
|
|
--ledger-recovery-timeout
|
|
|
|
20
|
|
|
|
--test-duration
|
|
|
|
200
|
|
|
|
--test-suite
|
|
|
|
all
|
|
|
|
)
|
2020-05-06 19:56:53 +03:00
|
|
|
|
2020-09-30 15:16:57 +03:00
|
|
|
add_e2e_test(
|
|
|
|
NAME committable_suffix_test
|
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/committable.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2021-02-02 16:07:59 +03:00
|
|
|
ADDITIONAL_ARGS --sig-ms-interval 100
|
2020-09-30 15:16:57 +03:00
|
|
|
)
|
|
|
|
|
2020-03-06 14:52:17 +03:00
|
|
|
add_e2e_test(
|
2020-11-20 18:17:25 +03:00
|
|
|
NAME js_batched_stress_test
|
2020-03-17 17:50:19 +03:00
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/e2e_batched.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2021-02-02 16:07:59 +03:00
|
|
|
ADDITIONAL_ARGS
|
|
|
|
--js-app-bundle
|
|
|
|
${CMAKE_SOURCE_DIR}/src/apps/batched
|
2021-11-23 20:35:01 +03:00
|
|
|
--election-timeout-ms
|
2021-02-02 16:07:59 +03:00
|
|
|
10000 # Larger election timeout as recording large JS applications may
|
|
|
|
# trigger leadership changes
|
2020-03-06 14:52:17 +03:00
|
|
|
)
|
2019-07-19 15:56:29 +03:00
|
|
|
|
2020-08-07 16:57:49 +03:00
|
|
|
add_e2e_test(
|
|
|
|
NAME modules_test
|
2020-11-19 21:47:53 +03:00
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/js-modules/modules.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2021-02-02 16:07:59 +03:00
|
|
|
ADDITIONAL_ARGS
|
2021-12-16 17:55:29 +03:00
|
|
|
--package libjs_generic --election-timeout-ms
|
|
|
|
10000 # Larger election timeout as recording
|
2021-11-23 20:35:01 +03:00
|
|
|
# large JS applications may trigger leadership changes
|
2020-08-07 16:57:49 +03:00
|
|
|
)
|
|
|
|
|
2021-12-16 17:55:29 +03:00
|
|
|
if(ENABLE_V8)
|
|
|
|
add_e2e_test(
|
|
|
|
NAME modules_v8_test
|
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/js-modules/modules.py
|
|
|
|
CONSENSUS cft
|
|
|
|
ADDITIONAL_ARGS
|
|
|
|
--package libjs_v8 --election-timeout-ms 10000 # Larger election timeout
|
|
|
|
# as recording
|
|
|
|
# large JS applications may trigger leadership changes
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2020-09-04 16:55:50 +03:00
|
|
|
add_e2e_test(
|
2021-09-07 16:56:08 +03:00
|
|
|
NAME auth
|
2020-11-19 21:47:53 +03:00
|
|
|
PYTHON_SCRIPT
|
|
|
|
${CMAKE_SOURCE_DIR}/tests/js-custom-authorization/custom_authorization.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2022-02-03 12:17:12 +03:00
|
|
|
ADDITIONAL_ARGS --package libjs_generic --js-app-bundle
|
|
|
|
${CMAKE_SOURCE_DIR}/tests
|
2020-09-08 13:21:57 +03:00
|
|
|
)
|
|
|
|
|
2022-02-03 12:17:12 +03:00
|
|
|
if(ENABLE_V8)
|
|
|
|
add_e2e_test(
|
|
|
|
NAME auth_v8
|
|
|
|
PYTHON_SCRIPT
|
|
|
|
${CMAKE_SOURCE_DIR}/tests/js-custom-authorization/custom_authorization.py
|
|
|
|
CONSENSUS cft
|
|
|
|
ADDITIONAL_ARGS --package libjs_v8 --js-app-bundle
|
|
|
|
${CMAKE_SOURCE_DIR}/tests
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2021-05-28 19:37:38 +03:00
|
|
|
add_e2e_test(
|
|
|
|
NAME launch_host_process_test
|
|
|
|
PYTHON_SCRIPT
|
|
|
|
${CMAKE_SOURCE_DIR}/tests/js-launch-host-process/host_process.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2021-05-28 19:37:38 +03:00
|
|
|
ADDITIONAL_ARGS --js-app-bundle
|
|
|
|
${CMAKE_SOURCE_DIR}/tests/js-launch-host-process
|
|
|
|
)
|
|
|
|
|
2020-11-24 16:49:13 +03:00
|
|
|
add_e2e_test(
|
|
|
|
NAME governance_test
|
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/governance.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2021-08-26 19:54:04 +03:00
|
|
|
CONSTITUTION ${CONSTITUTION_ARGS}
|
2022-01-13 20:14:37 +03:00
|
|
|
ADDITIONAL_ARGS
|
|
|
|
--oe-binary ${OE_BINDIR} --initial-operator-count 1
|
|
|
|
--jinja-templates-path ${CMAKE_SOURCE_DIR}/samples/templates
|
2021-01-06 19:22:56 +03:00
|
|
|
)
|
|
|
|
|
2020-11-24 16:49:13 +03:00
|
|
|
add_e2e_test(
|
|
|
|
NAME jwt_test
|
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/jwt_test.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2020-11-24 16:49:13 +03:00
|
|
|
)
|
|
|
|
|
2021-03-31 21:44:25 +03:00
|
|
|
add_e2e_test(
|
|
|
|
NAME code_update_test
|
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/code_update.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2021-03-31 21:44:25 +03:00
|
|
|
ADDITIONAL_ARGS --oe-binary ${OE_BINDIR} --js-app-bundle
|
|
|
|
${CMAKE_SOURCE_DIR}/samples/apps/logging/js
|
|
|
|
)
|
2019-11-07 14:55:23 +03:00
|
|
|
|
2021-03-23 18:55:34 +03:00
|
|
|
if(BUILD_TPCC)
|
|
|
|
include(${CMAKE_CURRENT_SOURCE_DIR}/src/apps/tpcc/tpcc.cmake)
|
|
|
|
endif()
|
|
|
|
|
2020-04-07 13:05:24 +03:00
|
|
|
if(TLS_TEST)
|
2022-03-11 14:02:16 +03:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/testssl/testssl.sh
|
2020-04-07 13:05:24 +03:00
|
|
|
COMMAND
|
2022-03-11 14:02:16 +03:00
|
|
|
rm -rf ${CMAKE_CURRENT_BINARY_DIR}/testssl && git clone --depth 1
|
2022-04-05 12:03:04 +03:00
|
|
|
--branch v3.0.7 --single-branch https://github.com/drwetter/testssl.sh
|
2020-04-07 13:05:24 +03:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/testssl
|
|
|
|
)
|
2022-03-11 14:02:16 +03:00
|
|
|
add_custom_target(
|
|
|
|
testssl ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/testssl/testssl.sh
|
|
|
|
)
|
2020-04-07 13:05:24 +03:00
|
|
|
endif()
|
|
|
|
|
2020-09-07 14:20:26 +03:00
|
|
|
add_e2e_test(
|
2021-11-25 15:58:35 +03:00
|
|
|
NAME e2e_logging_cft
|
2020-09-07 14:20:26 +03:00
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/e2e_logging.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2021-09-20 19:45:38 +03:00
|
|
|
CONTAINER_NODES TRUE
|
2020-11-27 11:53:09 +03:00
|
|
|
ADDITIONAL_ARGS --js-app-bundle ${CMAKE_SOURCE_DIR}/samples/apps/logging/js
|
2020-09-07 14:20:26 +03:00
|
|
|
)
|
2020-04-29 20:19:51 +03:00
|
|
|
|
2020-11-10 18:34:58 +03:00
|
|
|
add_e2e_test(
|
|
|
|
NAME membership
|
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/membership.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2020-11-10 18:34:58 +03:00
|
|
|
)
|
2022-03-22 20:37:21 +03:00
|
|
|
set(PARTITIONS_TEST_ARGS
|
|
|
|
# Higher snapshot interval as the test currently assumes that no
|
|
|
|
# transactions
|
|
|
|
# are emitted while partitions are up. To be removed when
|
|
|
|
# https://github.com/microsoft/CCF/issues/2577 is implemented
|
|
|
|
--snapshot-tx-interval 10000
|
|
|
|
)
|
2021-11-04 18:07:09 +03:00
|
|
|
if(ENABLE_2TX_RECONFIG)
|
|
|
|
list(APPEND PARTITIONS_TEST_ARGS --include-2tx-reconfig)
|
|
|
|
endif()
|
2021-11-08 13:28:13 +03:00
|
|
|
|
2021-05-11 19:13:07 +03:00
|
|
|
add_e2e_test(
|
2021-11-25 15:58:35 +03:00
|
|
|
NAME partitions_cft
|
2021-05-11 19:13:07 +03:00
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/partitions_test.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2021-05-11 19:13:07 +03:00
|
|
|
LABEL partitions
|
2021-09-20 17:20:02 +03:00
|
|
|
CONFIGURATIONS partitions
|
2021-11-04 18:07:09 +03:00
|
|
|
ADDITIONAL_ARGS ${PARTITIONS_TEST_ARGS}
|
2021-05-11 19:13:07 +03:00
|
|
|
)
|
|
|
|
|
2022-01-24 15:15:52 +03:00
|
|
|
add_e2e_test(
|
|
|
|
NAME connections_cft
|
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/connections.py
|
|
|
|
CONSENSUS cft
|
|
|
|
)
|
2020-03-20 14:17:50 +03:00
|
|
|
|
2020-09-07 14:20:26 +03:00
|
|
|
if(TLS_TEST)
|
2020-03-17 17:50:19 +03:00
|
|
|
add_e2e_test(
|
2021-11-25 15:58:35 +03:00
|
|
|
NAME tlstest_cft
|
2020-09-07 14:20:26 +03:00
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/tlstest.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2020-09-07 14:20:26 +03:00
|
|
|
LABEL tlstest
|
2020-03-17 17:50:19 +03:00
|
|
|
)
|
2020-09-07 14:20:26 +03:00
|
|
|
endif()
|
2020-03-17 17:50:19 +03:00
|
|
|
|
2020-09-07 14:20:26 +03:00
|
|
|
add_e2e_test(
|
2021-11-25 15:58:35 +03:00
|
|
|
NAME schema_test_cft
|
2020-09-07 14:20:26 +03:00
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/schema.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2021-02-08 14:39:27 +03:00
|
|
|
ADDITIONAL_ARGS
|
2021-11-29 18:52:24 +03:00
|
|
|
--schema-dir
|
|
|
|
${CMAKE_SOURCE_DIR}/doc/schemas
|
|
|
|
--ledger-tutorial
|
2021-09-07 16:56:08 +03:00
|
|
|
${CMAKE_SOURCE_DIR}/python/ledger_tutorial.py
|
2021-11-29 18:52:24 +03:00
|
|
|
--config-samples-dir
|
|
|
|
${CMAKE_SOURCE_DIR}/samples/config
|
|
|
|
--config-file-1x
|
|
|
|
${CMAKE_SOURCE_DIR}/python/config_1_x.ini
|
2021-01-08 18:57:44 +03:00
|
|
|
)
|
|
|
|
|
2021-06-04 16:30:19 +03:00
|
|
|
list(APPEND LTS_TEST_ARGS --oe-binary ${OE_BINDIR} --ccf-version
|
|
|
|
${CCF_VERSION}
|
|
|
|
)
|
|
|
|
if(LONG_TESTS)
|
2022-01-24 18:27:17 +03:00
|
|
|
list(APPEND LTS_TEST_ARGS --check-ledger-compatibility
|
|
|
|
--check-2tx-reconfig-migration
|
|
|
|
)
|
2021-06-04 16:30:19 +03:00
|
|
|
endif()
|
|
|
|
|
2022-03-14 17:05:59 +03:00
|
|
|
if(NOT UNSAFE_VERSION)
|
|
|
|
# Unsafe builds do not follow normal version conventions
|
|
|
|
add_e2e_test(
|
|
|
|
NAME lts_compatibility
|
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/lts_compatibility.py
|
|
|
|
CONSENSUS cft
|
|
|
|
LABEL e2e
|
|
|
|
ADDITIONAL_ARGS ${LTS_TEST_ARGS}
|
|
|
|
)
|
|
|
|
endif()
|
2021-06-04 16:30:19 +03:00
|
|
|
|
2021-06-22 18:59:20 +03:00
|
|
|
if(LONG_TESTS)
|
2021-06-23 11:08:58 +03:00
|
|
|
set(ROTATION_TEST_ARGS --rotation-retirements 10)
|
2021-06-22 18:59:20 +03:00
|
|
|
endif()
|
|
|
|
|
|
|
|
add_e2e_test(
|
2021-11-25 15:58:35 +03:00
|
|
|
NAME rotation_test_cft
|
2021-06-22 18:59:20 +03:00
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/rotation.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2021-06-22 18:59:20 +03:00
|
|
|
LABEL rotation
|
|
|
|
ADDITIONAL_ARGS ${ROTATION_TEST_ARGS}
|
|
|
|
)
|
|
|
|
|
2021-11-04 18:07:09 +03:00
|
|
|
set(RECONFIG_TEST_ARGS --ccf-version ${CCF_VERSION})
|
|
|
|
if(ENABLE_2TX_RECONFIG)
|
|
|
|
list(APPEND RECONFIG_TEST_ARGS --include-2tx-reconfig)
|
|
|
|
endif()
|
2021-09-07 20:05:20 +03:00
|
|
|
add_e2e_test(
|
2021-11-25 15:58:35 +03:00
|
|
|
NAME reconfiguration_test_cft
|
2021-09-07 20:05:20 +03:00
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/reconfiguration.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2021-11-04 18:07:09 +03:00
|
|
|
ADDITIONAL_ARGS ${RECONFIG_TEST_ARGS}
|
2021-09-07 20:05:20 +03:00
|
|
|
)
|
|
|
|
|
2021-09-09 20:04:35 +03:00
|
|
|
add_e2e_test(
|
|
|
|
NAME election_test
|
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/election.py
|
2021-09-10 13:20:04 +03:00
|
|
|
CONSENSUS ${CONSENSUS_FILTER}
|
2021-09-09 20:04:35 +03:00
|
|
|
)
|
2020-11-02 19:08:16 +03:00
|
|
|
|
2021-09-09 20:04:35 +03:00
|
|
|
foreach(CONSENSUS ${CONSENSUSES})
|
2021-01-27 00:20:56 +03:00
|
|
|
add_e2e_test(
|
|
|
|
NAME vegeta_stress_${CONSENSUS}
|
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/vegeta_stress.py
|
|
|
|
CONSENSUS ${CONSENSUS}
|
|
|
|
LABEL vegeta
|
2021-09-17 11:51:25 +03:00
|
|
|
ADDITIONAL_ARGS -p "samples/apps/logging/liblogging"
|
2021-01-27 00:20:56 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
add_e2e_test(
|
|
|
|
NAME vegeta_long_stress_${CONSENSUS}
|
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/vegeta_stress.py
|
|
|
|
CONSENSUS ${CONSENSUS}
|
|
|
|
LABEL vegeta
|
|
|
|
CONFIGURATIONS long_stress
|
2021-09-17 11:51:25 +03:00
|
|
|
ADDITIONAL_ARGS -p "samples/apps/logging/liblogging" --duration 45m
|
2021-01-27 00:20:56 +03:00
|
|
|
)
|
|
|
|
|
2020-03-06 14:52:17 +03:00
|
|
|
endforeach()
|
|
|
|
|
|
|
|
add_perf_test(
|
2021-02-05 14:32:19 +03:00
|
|
|
NAME ls
|
2020-04-09 17:53:31 +03:00
|
|
|
PYTHON_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/tests/infra/perfclient.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2020-03-06 14:52:17 +03:00
|
|
|
CLIENT_BIN ./scenario_perf_client
|
|
|
|
ADDITIONAL_ARGS
|
|
|
|
--package
|
2021-09-17 11:51:25 +03:00
|
|
|
"samples/apps/logging/liblogging"
|
2020-03-06 14:52:17 +03:00
|
|
|
--scenario-file
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/tests/perf_logging_scenario_100txs.json
|
|
|
|
--max-writes-ahead
|
|
|
|
1000
|
|
|
|
--repetitions
|
2020-12-18 12:37:39 +03:00
|
|
|
10000
|
2020-12-08 16:43:07 +03:00
|
|
|
--msg-ser-fmt
|
|
|
|
msgpack
|
2020-03-06 14:52:17 +03:00
|
|
|
)
|
2020-05-22 19:48:34 +03:00
|
|
|
|
2021-01-27 02:41:59 +03:00
|
|
|
add_perf_test(
|
2021-02-05 14:32:19 +03:00
|
|
|
NAME ls_jwt
|
2021-01-27 02:41:59 +03:00
|
|
|
PYTHON_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/tests/infra/perfclient.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2021-01-27 02:41:59 +03:00
|
|
|
CLIENT_BIN ./scenario_perf_client
|
|
|
|
ADDITIONAL_ARGS
|
|
|
|
--package
|
2021-09-17 11:51:25 +03:00
|
|
|
"samples/apps/logging/liblogging"
|
2021-01-27 02:41:59 +03:00
|
|
|
--scenario-file
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/tests/perf_logging_scenario_100txs.json
|
|
|
|
--max-writes-ahead
|
|
|
|
1000
|
|
|
|
--repetitions
|
|
|
|
1000
|
|
|
|
--use-jwt
|
|
|
|
--msg-ser-fmt
|
|
|
|
msgpack
|
|
|
|
)
|
|
|
|
|
2020-12-08 16:43:07 +03:00
|
|
|
add_perf_test(
|
2021-02-05 14:32:19 +03:00
|
|
|
NAME ls_js
|
2020-12-08 16:43:07 +03:00
|
|
|
PYTHON_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/tests/infra/perfclient.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2020-12-08 16:43:07 +03:00
|
|
|
CLIENT_BIN ./scenario_perf_client
|
2021-05-12 15:47:32 +03:00
|
|
|
ADDITIONAL_ARGS
|
|
|
|
--js-app-bundle
|
|
|
|
${CMAKE_SOURCE_DIR}/samples/apps/logging/js_perf
|
|
|
|
--scenario-file
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/tests/perf_logging_scenario_100txs.json
|
|
|
|
--max-writes-ahead
|
|
|
|
1000
|
|
|
|
--repetitions
|
|
|
|
1000
|
|
|
|
--msg-ser-fmt
|
|
|
|
text
|
|
|
|
)
|
2021-12-16 17:55:29 +03:00
|
|
|
if(ENABLE_V8)
|
|
|
|
add_perf_test(
|
|
|
|
NAME ls_v8
|
|
|
|
PYTHON_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/tests/infra/perfclient.py
|
|
|
|
CONSENSUS cft
|
|
|
|
CLIENT_BIN ./scenario_perf_client
|
|
|
|
ADDITIONAL_ARGS
|
|
|
|
--package
|
|
|
|
libjs_v8
|
|
|
|
--js-app-bundle
|
|
|
|
${CMAKE_SOURCE_DIR}/samples/apps/logging/js_perf
|
|
|
|
--scenario-file
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/tests/perf_logging_scenario_100txs.json
|
|
|
|
--max-writes-ahead
|
|
|
|
1000
|
|
|
|
--repetitions
|
|
|
|
1000
|
|
|
|
--msg-ser-fmt
|
|
|
|
text
|
|
|
|
)
|
|
|
|
endif()
|
2021-05-12 15:47:32 +03:00
|
|
|
|
|
|
|
add_perf_test(
|
|
|
|
NAME ls_full_js
|
|
|
|
PYTHON_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/tests/infra/perfclient.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2021-05-12 15:47:32 +03:00
|
|
|
CLIENT_BIN ./scenario_perf_client
|
2020-12-08 16:43:07 +03:00
|
|
|
ADDITIONAL_ARGS
|
|
|
|
--js-app-bundle
|
|
|
|
${CMAKE_SOURCE_DIR}/samples/apps/logging/js
|
|
|
|
--scenario-file
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/tests/perf_logging_scenario_100txs.json
|
|
|
|
--max-writes-ahead
|
|
|
|
1000
|
|
|
|
--repetitions
|
2020-12-18 12:37:39 +03:00
|
|
|
1000
|
2020-12-08 16:43:07 +03:00
|
|
|
--msg-ser-fmt
|
|
|
|
text
|
2020-05-22 19:48:34 +03:00
|
|
|
)
|
2021-12-16 17:55:29 +03:00
|
|
|
if(ENABLE_V8)
|
|
|
|
add_perf_test(
|
|
|
|
NAME ls_full_v8
|
|
|
|
PYTHON_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/tests/infra/perfclient.py
|
|
|
|
CONSENSUS cft
|
|
|
|
CLIENT_BIN ./scenario_perf_client
|
|
|
|
ADDITIONAL_ARGS
|
|
|
|
--package
|
|
|
|
libjs_v8
|
|
|
|
--js-app-bundle
|
|
|
|
${CMAKE_SOURCE_DIR}/samples/apps/logging/js
|
|
|
|
--scenario-file
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/tests/perf_logging_scenario_100txs.json
|
|
|
|
--max-writes-ahead
|
|
|
|
1000
|
|
|
|
--repetitions
|
|
|
|
1000
|
|
|
|
--msg-ser-fmt
|
|
|
|
text
|
|
|
|
)
|
|
|
|
endif()
|
2021-01-27 02:41:59 +03:00
|
|
|
|
|
|
|
add_perf_test(
|
2021-02-05 14:32:19 +03:00
|
|
|
NAME ls_js_jwt
|
2021-01-27 02:41:59 +03:00
|
|
|
PYTHON_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/tests/infra/perfclient.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2021-01-27 02:41:59 +03:00
|
|
|
CLIENT_BIN ./scenario_perf_client
|
|
|
|
ADDITIONAL_ARGS
|
|
|
|
--js-app-bundle
|
2021-05-12 15:47:32 +03:00
|
|
|
${CMAKE_SOURCE_DIR}/samples/apps/logging/js_perf
|
2021-01-27 02:41:59 +03:00
|
|
|
--scenario-file
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/tests/perf_logging_scenario_100txs.json
|
|
|
|
--max-writes-ahead
|
|
|
|
1000
|
|
|
|
--repetitions
|
|
|
|
700
|
|
|
|
--use-jwt
|
|
|
|
--msg-ser-fmt
|
|
|
|
text
|
|
|
|
)
|
2021-09-30 15:30:26 +03:00
|
|
|
|
|
|
|
add_e2e_test(
|
|
|
|
NAME historical_query_perf_test
|
|
|
|
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/historical_query_perf.py
|
2021-11-25 15:58:35 +03:00
|
|
|
CONSENSUS cft
|
2021-09-30 15:30:26 +03:00
|
|
|
LABEL perf
|
|
|
|
)
|
2019-04-26 18:27:27 +03:00
|
|
|
endif()
|
2020-12-03 17:30:32 +03:00
|
|
|
|
|
|
|
# Generate and install CMake export file for consumers using CMake
|
|
|
|
include(CMakePackageConfigHelpers)
|
|
|
|
configure_package_config_file(
|
2022-06-14 21:45:43 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/cmake/${CCF_PROJECT}-config.cmake.in
|
|
|
|
${CMAKE_BINARY_DIR}/cmake/${CCF_PROJECT}-config.cmake
|
2020-12-03 17:30:32 +03:00
|
|
|
INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX}/cmake
|
|
|
|
PATH_VARS CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_BINDIR CMAKE_INSTALL_INCLUDEDIR
|
|
|
|
)
|
|
|
|
write_basic_package_version_file(
|
2022-06-14 21:45:43 +03:00
|
|
|
${CMAKE_BINARY_DIR}/cmake/${CCF_PROJECT}-config-version.cmake
|
2020-12-03 17:30:32 +03:00
|
|
|
COMPATIBILITY SameMajorVersion
|
|
|
|
)
|
2022-06-14 21:45:43 +03:00
|
|
|
install(FILES ${CMAKE_BINARY_DIR}/cmake/${CCF_PROJECT}-config.cmake
|
|
|
|
${CMAKE_BINARY_DIR}/cmake/${CCF_PROJECT}-config-version.cmake
|
2020-12-03 17:30:32 +03:00
|
|
|
DESTINATION ${CMAKE_INSTALL_PREFIX}/cmake
|
|
|
|
)
|