-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix tests on ci and move slow tests to bench_tests folder.
- Loading branch information
Showing
21 changed files
with
682 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#---------------------------------------------------------------------------# | ||
# Copyright (c) 2018-2021 Mikhail Komarov <[email protected]> | ||
# | ||
# Distributed under the Boost Software License, Version 1.0 | ||
# See accompanying file LICENSE_1_0.txt or copy at | ||
# http://www.boost.org/LICENSE_1_0.txt | ||
#---------------------------------------------------------------------------# | ||
|
||
include(CMTest) | ||
|
||
add_custom_target(zk_runtime_bench_tests) | ||
|
||
macro(define_runtime_zk_test name) | ||
set(test_name "zk_${name}_bench_test") | ||
add_dependencies(zk_runtime_bench_tests ${test_name}) | ||
|
||
cm_test(NAME ${test_name} SOURCES ${name}.cpp) | ||
|
||
target_include_directories(${test_name} PRIVATE | ||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>" | ||
"$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>" | ||
|
||
${Boost_INCLUDE_DIRS}) | ||
|
||
set_target_properties(${test_name} PROPERTIES CXX_STANDARD 17 | ||
CXX_STANDARD_REQUIRED TRUE) | ||
|
||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") | ||
target_compile_options(${test_name} PRIVATE "-fconstexpr-steps=2147483647") | ||
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | ||
target_compile_options(${test_name} PRIVATE "-fconstexpr-ops-limit=4294967295") | ||
endif() | ||
|
||
target_compile_definitions(${test_name} PRIVATE TEST_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data/") | ||
endmacro() | ||
|
||
set(RUNTIME_TESTS_NAMES | ||
"bench_pedersen" | ||
"bench_lpc" | ||
) | ||
|
||
foreach(TEST_NAME ${RUNTIME_TESTS_NAMES}) | ||
define_runtime_zk_test(${TEST_NAME}) | ||
endforeach() | ||
|
Oops, something went wrong.