Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
iceseer committed Feb 17, 2020
2 parents 2a557a8 + 1063815 commit d5a1511
Show file tree
Hide file tree
Showing 39 changed files with 212 additions and 334 deletions.
2 changes: 1 addition & 1 deletion .jenkinsci/builders/x64-mac-build-steps.groovy
Expand Up @@ -66,7 +66,7 @@ def buildSteps(int parallelism, List compilerVersions, String build_type, boolea
-DBENCHMARKING=${cmakeBooleanOption[benchmarking]} \
-DPACKAGE_TGZ=${cmakeBooleanOption[packagebuild]} \
-DUSE_BTF=${cmakeBooleanOption[useBTF]} \
-DCMAKE_TOOLCHAIN_FILE=/opt/dependencies/scripts/buildsystems/vcpkg.cmake ")
-DCMAKE_TOOLCHAIN_FILE=/opt/dependencies/vcpkg/scripts/buildsystems/vcpkg.cmake ")

build.cmakeBuild(buildDir, cmakeBuildOptions, parallelism)
}
Expand Down
4 changes: 3 additions & 1 deletion CMakeLists.txt
Expand Up @@ -11,9 +11,11 @@ endif()

PROJECT(iroha C CXX)

SET(CMAKE_CXX_STANDARD 14)

SET(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
if (NOT MSVC)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -fdiagnostics-color=always")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fdiagnostics-color=always")
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -Wno-error=deprecated-declarations")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -Wextra -Wno-unused-parameter -Wno-deprecated-declarations -O0")
endif()
Expand Down
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -38,6 +38,8 @@ We have documentation in several languages available and you are welcome to cont
| **Korean** <br> [![Documentation Status](https://readthedocs.org/projects/iroha-ko/badge/?version=latest)](https://iroha.readthedocs.io/ko/latest/?badge=latest) </br> | **Dutch** <br> [![Documentation Status](https://readthedocs.org/projects/iroha-nl/badge/?version=latest)](https://iroha.readthedocs.io/nl/latest/?badge=latest) </br> | **Portuguese** <br> [![Documentation Status](https://readthedocs.org/projects/iroha-pt/badge/?version=latest)](https://iroha.readthedocs.io/pt/latest/?badge=latest) </br> | **Russian** <br> [![Documentation Status](https://readthedocs.org/projects/iroha-ru/badge/?version=latest)](https://iroha.readthedocs.io/ru/latest/?badge=latest) </br> | **Ukrainian** <br> [![Documentation Status](https://readthedocs.org/projects/iroha-uk/badge/?version=latest)](https://iroha.readthedocs.io/uk/latest/?badge=latest) </br> | **Simplified Chinese** <br> [![Documentation Status](https://readthedocs.org/projects/iroha-zh/badge/?version=latest)](https://iroha.readthedocs.io/zh_CN/latest/?badge=latest) </br> |

</center>

> We are currently researching better ideas for translation platforms. That is why the documentation in outdated at the moment. Please, refer to the English documentation for now.
### How to explore Iroha really fast?

Expand Down
4 changes: 3 additions & 1 deletion docker/develop/Dockerfile
Expand Up @@ -9,7 +9,8 @@ ENV IROHA_BUILD /opt/iroha/build

RUN apt-get update && \
apt-get -y --no-install-recommends install apt-utils software-properties-common wget gpg-agent; \
apt-get -y clean
apt-get -y clean && \
rm -rf /var/lib/apt/lists/*

# add repos
RUN set -e; \
Expand Down Expand Up @@ -73,6 +74,7 @@ RUN set -e; \
RUN set -e; \
apt-get update; \
apt-get -y install openjdk-8-jre; \
rm -rf /var/lib/apt/lists/*; \
java -version

# python bindings dependencies
Expand Down
5 changes: 3 additions & 2 deletions libs/logger/logger.hpp
Expand Up @@ -11,6 +11,7 @@
#include <string>

#include <fmt/core.h>
#include <fmt/format.h>
// Windows includes transitively included by format.h define interface as
// struct, leading to compilation issues
#undef interface
Expand All @@ -26,13 +27,13 @@ namespace fmt {
char>> {
// The following functions are not defined intentionally.
template <typename ParseContext>
typename ParseContext::iterator parse(ParseContext &ctx) {
auto parse(ParseContext &ctx) -> decltype(ctx.begin()) {
return ctx.begin();
}

template <typename FormatContext>
auto format(const T &val, FormatContext &ctx) -> decltype(ctx.out()) {
return format_to(ctx.begin(), "{}", val.toString());
return format_to(ctx.out(), "{}", val.toString());
}
};
} // namespace fmt
Expand Down
10 changes: 5 additions & 5 deletions test/integration/executor/add_asset_qty_test.cpp
Expand Up @@ -96,10 +96,10 @@ TEST_P(AddAssetQuantityBasicTest, DestOverflowPrecision2) {
checkAssetQuantities(kAdminId, {AssetQuantity{kAssetId, kAmountPrec2Max}});
}

INSTANTIATE_TEST_CASE_P(Base,
AddAssetQuantityBasicTest,
executor_testing::getExecutorTestParams(),
executor_testing::paramToString);
INSTANTIATE_TEST_SUITE_P(Base,
AddAssetQuantityBasicTest,
executor_testing::getExecutorTestParams(),
executor_testing::paramToString);

using AddAssetQuantityPermissionTest =
command_permission_test::CommandPermissionTest<AddAssetQuantityTest>;
Expand All @@ -117,7 +117,7 @@ TEST_P(AddAssetQuantityPermissionTest, CommandPermissionTest) {
}
}

INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
Common,
AddAssetQuantityPermissionTest,
command_permission_test::getParams(
Expand Down
10 changes: 5 additions & 5 deletions test/integration/executor/add_signatory_test.cpp
Expand Up @@ -69,10 +69,10 @@ TEST_P(AddSignatoryBasicTest, ExistingPubKey) {
checkSignatories(kUserId, {kUserKeypair.publicKey()});
}

INSTANTIATE_TEST_CASE_P(Base,
AddSignatoryBasicTest,
executor_testing::getExecutorTestParams(),
executor_testing::paramToString);
INSTANTIATE_TEST_SUITE_P(Base,
AddSignatoryBasicTest,
executor_testing::getExecutorTestParams(),
executor_testing::paramToString);

using AddSignatoryPermissionTest =
command_permission_test::CommandPermissionTest<AddSignatoryTest>;
Expand All @@ -91,7 +91,7 @@ TEST_P(AddSignatoryPermissionTest, CommandPermissionTest) {
}
}

INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
Common,
AddSignatoryPermissionTest,
command_permission_test::getParams(Role::kAddSignatory,
Expand Down
21 changes: 10 additions & 11 deletions test/integration/executor/create_account_test.cpp
Expand Up @@ -120,10 +120,10 @@ TEST_P(CreateAccountBasicTest, PrivelegeElevation) {
checkNoSuchAccount();
}

INSTANTIATE_TEST_CASE_P(Base,
CreateAccountBasicTest,
executor_testing::getExecutorTestParams(),
executor_testing::paramToString);
INSTANTIATE_TEST_SUITE_P(Base,
CreateAccountBasicTest,
executor_testing::getExecutorTestParams(),
executor_testing::paramToString);

using CreateAccountPermissionTest =
command_permission_test::CommandPermissionTest<CreateAccountTest>;
Expand All @@ -139,10 +139,9 @@ TEST_P(CreateAccountPermissionTest, CommandPermissionTest) {
}
}

INSTANTIATE_TEST_CASE_P(Common,
CreateAccountPermissionTest,
command_permission_test::getParams(boost::none,
boost::none,
Role::kCreateAccount,
boost::none),
command_permission_test::paramToString);
INSTANTIATE_TEST_SUITE_P(
Common,
CreateAccountPermissionTest,
command_permission_test::getParams(
boost::none, boost::none, Role::kCreateAccount, boost::none),
command_permission_test::paramToString);
22 changes: 11 additions & 11 deletions test/integration/executor/create_role_test.cpp
Expand Up @@ -87,10 +87,10 @@ TEST_P(CreateRoleBasicTest, NameExists) {
checkRole(kAnotherRole, {Role::kCreateRole});
}

INSTANTIATE_TEST_CASE_P(Base,
CreateRoleBasicTest,
executor_testing::getExecutorTestParams(),
executor_testing::paramToString);
INSTANTIATE_TEST_SUITE_P(Base,
CreateRoleBasicTest,
executor_testing::getExecutorTestParams(),
executor_testing::paramToString);

using CreateRolePermissionTest =
command_permission_test::CommandPermissionTest<CreateRoleTest>;
Expand All @@ -107,10 +107,10 @@ TEST_P(CreateRolePermissionTest, CommandPermissionTest) {
}
}

INSTANTIATE_TEST_CASE_P(Common,
CreateRolePermissionTest,
command_permission_test::getParams(boost::none,
boost::none,
Role::kCreateRole,
boost::none),
command_permission_test::paramToString);
INSTANTIATE_TEST_SUITE_P(Common,
CreateRolePermissionTest,
command_permission_test::getParams(boost::none,
boost::none,
Role::kCreateRole,
boost::none),
command_permission_test::paramToString);
10 changes: 5 additions & 5 deletions test/integration/executor/get_account_assets_test.cpp
Expand Up @@ -236,10 +236,10 @@ TEST_P(GetAccountAssetsBasicTest, NonexistentStartTx) {
response, error_codes::kInvalidPagination);
}

INSTANTIATE_TEST_CASE_P(Base,
GetAccountAssetsBasicTest,
executor_testing::getExecutorTestParams(),
executor_testing::paramToString);
INSTANTIATE_TEST_SUITE_P(Base,
GetAccountAssetsBasicTest,
executor_testing::getExecutorTestParams(),
executor_testing::paramToString);

using GetAccountAssetsPermissionTest =
query_permission_test::QueryPermissionTest<GetAccountAssetsTest>;
Expand All @@ -255,7 +255,7 @@ TEST_P(GetAccountAssetsPermissionTest, QueryPermissionTest) {
});
}

INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
Common,
GetAccountAssetsPermissionTest,
query_permission_test::getParams({Role::kGetMyAccAst},
Expand Down
4 changes: 2 additions & 2 deletions test/integration/executor/get_account_detail_test.cpp
Expand Up @@ -446,7 +446,7 @@ TEST_P(GetAccountDetailRecordIdTest, LastPage) {
2);
}

INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
Base,
GetAccountDetailRecordIdTest,
::testing::Combine(executor_testing::getExecutorTestParams(),
Expand All @@ -470,7 +470,7 @@ TEST_P(GetAccountDetailPermissionTest, QueryPermissionTest) {
});
}

INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
Common,
GetAccountDetailPermissionTest,
query_permission_test::getParams({Role::kGetMyAccDetail},
Expand Down
10 changes: 5 additions & 5 deletions test/integration/executor/get_account_test.cpp
Expand Up @@ -67,10 +67,10 @@ TEST_P(GetAccountBasicTest, NonexistentAccount) {
0);
}

INSTANTIATE_TEST_CASE_P(Base,
GetAccountBasicTest,
executor_testing::getExecutorTestParams(),
executor_testing::paramToString);
INSTANTIATE_TEST_SUITE_P(Base,
GetAccountBasicTest,
executor_testing::getExecutorTestParams(),
executor_testing::paramToString);

using GetAccountPermissionTest =
query_permission_test::QueryPermissionTest<GetAccountTest>;
Expand All @@ -85,7 +85,7 @@ TEST_P(GetAccountPermissionTest, QueryPermissionTest) {
});
}

INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
Common,
GetAccountPermissionTest,
query_permission_test::getParams({Role::kGetMyAccount},
Expand Down
20 changes: 10 additions & 10 deletions test/integration/executor/get_asset_info_test.cpp
Expand Up @@ -55,10 +55,10 @@ TEST_P(GetAssetInfoBasicTest, InvalidNoAsset) {
query(), error_codes::kNoStatefulError);
}

INSTANTIATE_TEST_CASE_P(Base,
GetAssetInfoBasicTest,
executor_testing::getExecutorTestParams(),
executor_testing::paramToString);
INSTANTIATE_TEST_SUITE_P(Base,
GetAssetInfoBasicTest,
executor_testing::getExecutorTestParams(),
executor_testing::paramToString);

using GetAssetInfoPermissionTest =
query_permission_test::QueryPermissionTest<GetAssetInfoTest>;
Expand All @@ -72,9 +72,9 @@ TEST_P(GetAssetInfoPermissionTest, QueryPermissionTest) {
});
}

INSTANTIATE_TEST_CASE_P(Common,
GetAssetInfoPermissionTest,
query_permission_test::getParams({boost::none},
{boost::none},
{Role::kReadAssets}),
query_permission_test::paramToString);
INSTANTIATE_TEST_SUITE_P(Common,
GetAssetInfoPermissionTest,
query_permission_test::getParams({boost::none},
{boost::none},
{Role::kReadAssets}),
query_permission_test::paramToString);
10 changes: 5 additions & 5 deletions test/integration/executor/get_signatories_test.cpp
Expand Up @@ -86,10 +86,10 @@ TEST_P(GetSignatoriesBasicTest, InvalidNoAccount) {
error_codes::kNoStatefulError);
}

INSTANTIATE_TEST_CASE_P(Base,
GetSignatoriesBasicTest,
executor_testing::getExecutorTestParams(),
executor_testing::paramToString);
INSTANTIATE_TEST_SUITE_P(Base,
GetSignatoriesBasicTest,
executor_testing::getExecutorTestParams(),
executor_testing::paramToString);

using GetSignatoriesPermissionTest =
query_permission_test::QueryPermissionTest<GetSignatoriesTest>;
Expand All @@ -103,7 +103,7 @@ TEST_P(GetSignatoriesPermissionTest, QueryPermissionTest) {
});
}

INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
Common,
GetSignatoriesPermissionTest,
query_permission_test::getParams({Role::kGetMySignatories},
Expand Down
10 changes: 5 additions & 5 deletions test/integration/executor/remove_signatory_test.cpp
Expand Up @@ -100,10 +100,10 @@ TEST_P(RemoveSignatoryBasicTest, SignatoriesLessThanQuorum) {
checkSignatories(kUserId, {old_sig_, kTargetSignatory});
}

INSTANTIATE_TEST_CASE_P(Base,
RemoveSignatoryBasicTest,
executor_testing::getExecutorTestParams(),
executor_testing::paramToString);
INSTANTIATE_TEST_SUITE_P(Base,
RemoveSignatoryBasicTest,
executor_testing::getExecutorTestParams(),
executor_testing::paramToString);

using RemoveSignatoryPermissionTest =
command_permission_test::CommandPermissionTest<RemoveSignatoryTest>;
Expand All @@ -123,7 +123,7 @@ TEST_P(RemoveSignatoryPermissionTest, CommandPermissionTest) {
}
}

INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
Common,
RemoveSignatoryPermissionTest,
command_permission_test::getParams(Role::kRemoveSignatory,
Expand Down
10 changes: 5 additions & 5 deletions test/integration/executor/set_account_detail_test.cpp
Expand Up @@ -145,10 +145,10 @@ TEST_P(SetAccountDetailBasicTest, RootPermission) {
checkDetails(kUserId, DetailsByKeyByWriter{{{kUserId, {{kKey, kVal}}}}});
}

INSTANTIATE_TEST_CASE_P(Base,
SetAccountDetailBasicTest,
executor_testing::getExecutorTestParams(),
executor_testing::paramToString);
INSTANTIATE_TEST_SUITE_P(Base,
SetAccountDetailBasicTest,
executor_testing::getExecutorTestParams(),
executor_testing::paramToString);

using SetAccountDetailPermissionTest =
command_permission_test::CommandPermissionTest<SetAccountDetailTest>;
Expand All @@ -165,7 +165,7 @@ TEST_P(SetAccountDetailPermissionTest, CommandPermissionTest) {
}
}

INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
Common,
SetAccountDetailPermissionTest,
command_permission_test::getParams(boost::none,
Expand Down
12 changes: 6 additions & 6 deletions test/integration/pipeline/batch_pipeline_test.cpp
Expand Up @@ -342,12 +342,12 @@ TEST_F(BatchPipelineTest, InvalidOrderedBatch) {
});
}

INSTANTIATE_TEST_CASE_P(BatchPipelineParameterizedTest,
BatchPipelineTest,
// note additional comma is needed to make it compile
// https://github.com/google/googletest/issues/1419
Values(interface::types::BatchType::ATOMIC,
interface::types::BatchType::ORDERED), );
INSTANTIATE_TEST_SUITE_P(BatchPipelineParameterizedTest,
BatchPipelineTest,
// note additional comma is needed to make it compile
// https://github.com/google/googletest/issues/1419
Values(interface::types::BatchType::ATOMIC,
interface::types::BatchType::ORDERED));

/**
* Test that a batch would not be passed to stateful validation when one
Expand Down

0 comments on commit d5a1511

Please sign in to comment.