Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node: exclude snapshots tests in Windows build #1326

Merged
merged 2 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions silkworm/node/snapshot/index_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,16 @@

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"};
HeaderIndex header_index{*SnapshotPath::parse(tmp_snapshot_file.path().string())};
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};
Expand All @@ -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};
Expand Down Expand Up @@ -140,4 +141,6 @@ TEST_CASE("TransactionIndex::build OK", "[silkworm][snapshot][index]") {
CHECK_NOTHROW(tx_index.build());
}

#endif // _WIN32

} // namespace silkworm::snapshot
5 changes: 5 additions & 0 deletions silkworm/node/snapshot/repository_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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{}});
Expand Down Expand Up @@ -201,4 +204,6 @@ TEST_CASE("SnapshotRepository::find_segment", "[silkworm][node][snapshot]") {
}
}

#endif // _WIN32

} // namespace silkworm::snapshot
5 changes: 5 additions & 0 deletions silkworm/node/snapshot/snapshot_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::pair<BlockNum, BlockNum>> block_ranges{
Expand Down Expand Up @@ -174,4 +177,6 @@ TEST_CASE("TransactionSnapshot::txn_by_id OK", "[silkworm][node][snapshot][index
}
}

#endif // _WIN32

} // namespace silkworm::snapshot