diff --git a/silkworm/node/snapshot/index_test.cpp b/silkworm/node/snapshot/index_test.cpp index 009e90eeed..c477907d33 100644 --- a/silkworm/node/snapshot/index_test.cpp +++ b/silkworm/node/snapshot/index_test.cpp @@ -24,6 +24,9 @@ namespace silkworm::snapshot { +// Exclude tests from Windows build +#ifndef _WIN32 + TEST_CASE("Index::Index", "[silkworm][snapshot][index]") { test_util::SetLogVerbosityGuard guard{log::Level::kNone}; test::TemporarySnapshotFile tmp_snapshot_file{"v1-014500-015000-headers.seg"}; @@ -31,7 +34,6 @@ TEST_CASE("Index::Index", "[silkworm][snapshot][index]") { CHECK_THROWS_AS(header_index.build(), std::logic_error); } -#ifndef _WIN32 // This unit test fails on Windows with error: SIGSEGV - Segmentation violation signal TEST_CASE("BodyIndex::build OK", "[silkworm][snapshot][index]") { test_util::SetLogVerbosityGuard guard{log::Level::kNone}; @@ -40,7 +42,6 @@ TEST_CASE("BodyIndex::build OK", "[silkworm][snapshot][index]") { BodyIndex body_index{body_snapshot_path}; CHECK_NOTHROW(body_index.build()); } -#endif // _WIN32 TEST_CASE("TransactionIndex::build KO: empty snapshot", "[silkworm][snapshot][index]") { test_util::SetLogVerbosityGuard guard{log::Level::kNone}; @@ -140,4 +141,6 @@ TEST_CASE("TransactionIndex::build OK", "[silkworm][snapshot][index]") { CHECK_NOTHROW(tx_index.build()); } +#endif // _WIN32 + } // namespace silkworm::snapshot diff --git a/silkworm/node/snapshot/repository_test.cpp b/silkworm/node/snapshot/repository_test.cpp index c4432d15c2..69a69570e4 100644 --- a/silkworm/node/snapshot/repository_test.cpp +++ b/silkworm/node/snapshot/repository_test.cpp @@ -25,6 +25,9 @@ namespace silkworm::snapshot { +// Exclude tests from Windows build +#ifndef _WIN32 + TEST_CASE("SnapshotRepository::SnapshotRepository", "[silkworm][node][snapshot]") { test_util::SetLogVerbosityGuard guard{log::Level::kNone}; CHECK_NOTHROW(SnapshotRepository{SnapshotSettings{}}); @@ -201,4 +204,6 @@ TEST_CASE("SnapshotRepository::find_segment", "[silkworm][node][snapshot]") { } } +#endif // _WIN32 + } // namespace silkworm::snapshot diff --git a/silkworm/node/snapshot/snapshot_test.cpp b/silkworm/node/snapshot/snapshot_test.cpp index 348490d435..391ca74759 100644 --- a/silkworm/node/snapshot/snapshot_test.cpp +++ b/silkworm/node/snapshot/snapshot_test.cpp @@ -42,6 +42,9 @@ class Snapshot_ForTest : public Snapshot { void close_index() override {} }; +// Exclude tests from Windows build +#ifndef _WIN32 + TEST_CASE("Snapshot::Snapshot", "[silkworm][node][snapshot][snapshot]") { SECTION("valid") { std::vector> block_ranges{ @@ -174,4 +177,6 @@ TEST_CASE("TransactionSnapshot::txn_by_id OK", "[silkworm][node][snapshot][index } } +#endif // _WIN32 + } // namespace silkworm::snapshot