github.com/tsuna/gohbase@v0.0.0-20250731002811-4ffcadfba63e/Makefile (about) 1 # Copyright (C) 2015 The GoHBase Authors. All rights reserved. 2 # This file is part of GoHBase. 3 # Use of this source code is governed by the Apache License 2.0 4 # that can be found in the COPYING file. 5 6 GO := go 7 TEST_TIMEOUT := 30s 8 INTEGRATION_TIMEOUT := 120s 9 GOTEST_FLAGS := -v 10 GOTEST_ARGS := 11 12 13 check: vet fmtcheck 14 jenkins: check test integration 15 16 COVER_PKGS := `go list ./... | grep -v test` 17 COVER_MODE := atomic 18 integration_cover: 19 $(GO) test -v -covermode=$(COVER_MODE) -race -timeout=$(INTEGRATION_TIMEOUT) -tags=integration -coverprofile=coverage.out $(COVER_PKGS) 20 21 coverage: integration_cover 22 $(GO) tool cover -html=coverage.out 23 24 fmtcheck: 25 errors=`gofmt -l .`; if test -n "$$errors"; then echo Check these files for style errors:; echo "$$errors"; exit 1; fi 26 find . -name '*.go' ! -path "./pb/*" ! -path "./test/mock/*" ! -path './gen.go' -exec ./check_line_len.awk {} + 27 28 vet: 29 $(GO) vet ./... 30 31 test: 32 $(GO) test $(GOTEST_FLAGS) -race -timeout=$(TEST_TIMEOUT) ./... 33 34 integration: 35 $(GO) test $(GOTEST_FLAGS) -race -timeout=$(INTEGRATION_TIMEOUT) -tags=integration -args $(GOTEST_ARGS) 36 37 .PHONY: check coverage integration_cover fmtcheck integration jenkins test vet