Skip to content

Commit

Permalink
test build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrus committed Nov 2, 2023
1 parent 8c2e8b7 commit 376cedd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
12 changes: 8 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ builds:
dir: go/
flags:
- -trimpath
# Build oasis-node with jemalloc tag (used by badgerdb).
# TODO: Use 'tags' attribute when GoReleaser is udpated to newer version:
# https://github.com/goreleaser/goreleaser/pull/2268
- -tags=jemalloc
tags:
# Build BadgerDB with jemalloc.
- jemalloc
# Build RocksDB storage backend.
- rocksdb
- grocksdb_clean_link
env:
- CGO_ENABLED=1
ldflags:
# NOTE: At the moment, GoReleaser produces different binaries when
# releases are built from different git paths, unless -buildid= is added
Expand Down
1 change: 1 addition & 0 deletions go/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ endif
# If GO_TAGS is not empty, append it to GO_EXTRA_FLAGS.
ifneq ($(GO_TAGS),)
GO_EXTRA_FLAGS += -tags "$(GO_TAGS)"
GO_TEST_FLAGS += -tags "$(GO_TAGS)"
endif

# Set all target as the default target.
Expand Down
2 changes: 1 addition & 1 deletion go/storage/mkvs/db/rocksdb/norocksdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ import (
)

// New creates a new RocksDB-backed node database.
func New(cfg *api.Config) (api.NodeDB, error) {
func New(_ *api.Config) (api.NodeDB, error) {
return nil, fmt.Errorf("mkvs/rocksdb: not compiled with RocksDB support")
}
2 changes: 0 additions & 2 deletions go/storage/mkvs/db/rocksdb/rocksdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ func verifyNodes(require *require.Assertions, rocksdb *rocksdbNodeDB, version ui
}

checkNodes := func(cf *grocksdb.ColumnFamilyHandle) {
fmt.Println("checking nodes")
it := prefixIterator(rocksdb.db.NewIteratorCF(timestampReadOptions(version), cf), nil)
defer it.Close()
for ; it.Valid(); it.Next() {
Expand All @@ -148,7 +147,6 @@ func verifyNodes(require *require.Assertions, rocksdb *rocksdbNodeDB, version ui
delete(notVisited, string(key))
}
}
fmt.Println("Verify nodes.....")
checkNodes(rocksdb.cfIOTree)
checkNodes(rocksdb.cfStateTree)

Expand Down

0 comments on commit 376cedd

Please sign in to comment.