ipld-eth-state-snapshot/Makefile
2023-09-02 19:36:53 +08:00

24 lines
492 B
Makefile

MOCKGEN ?= mockgen
MOCKS_DIR := $(CURDIR)/internal/mocks
mocks: $(MOCKS_DIR)/gen_indexer.go
.PHONY: mocks
$(MOCKS_DIR)/gen_indexer.go:
$(MOCKGEN) --package mocks --destination $@ \
--mock_names Indexer=MockgenIndexer \
github.com/cerc-io/plugeth-statediff/indexer Indexer
clean:
rm -f mocks/snapshot/publisher.go
build:
go fmt ./...
go build
test: mocks
go clean -testcache && go test -p 1 -v ./...
dbtest: mocks
go clean -testcache && TEST_WITH_DB=true go test -p 1 -v ./...