Bumps the minor-and-patch group with 3 updates: [github.com/coreos/go-oidc/v3](https://github.com/coreos/go-oidc), [go.etcd.io/bbolt](https://github.com/etcd-io/bbolt) and [golang.org/x/image](https://github.com/golang/image). Updates `github.com/coreos/go-oidc/v3` from 3.18.0 to 3.19.0 - [Release notes](https://github.com/coreos/go-oidc/releases) - [Commits](https://github.com/coreos/go-oidc/compare/v3.18.0...v3.19.0) Updates `go.etcd.io/bbolt` from 1.4.3 to 1.5.0 - [Release notes](https://github.com/etcd-io/bbolt/releases) - [Commits](https://github.com/etcd-io/bbolt/compare/v1.4.3...v1.5.0) Updates `golang.org/x/image` from 0.42.0 to 0.43.0 - [Commits](https://github.com/golang/image/compare/v0.42.0...v0.43.0) --- updated-dependencies: - dependency-name: github.com/coreos/go-oidc/v3 dependency-version: 3.19.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: go.etcd.io/bbolt dependency-version: 1.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: golang.org/x/image dependency-version: 0.43.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
103 lines
3.2 KiB
Makefile
103 lines
3.2 KiB
Makefile
BRANCH=`git rev-parse --abbrev-ref HEAD`
|
|
COMMIT=`git rev-parse --short HEAD`
|
|
GOLDFLAGS="-X main.branch $(BRANCH) -X main.commit $(COMMIT)"
|
|
GOFILES = $(shell find . -name \*.go)
|
|
REPOSITORY_ROOT := $(shell git rev-parse --show-toplevel)
|
|
GOTOOLCHAIN ?= go$(shell cat $(REPOSITORY_ROOT)/.go-version)
|
|
|
|
TESTFLAGS_RACE=-race=false
|
|
ifdef ENABLE_RACE
|
|
TESTFLAGS_RACE=-race=true
|
|
endif
|
|
|
|
TESTFLAGS_CPU=
|
|
ifdef CPU
|
|
TESTFLAGS_CPU=-cpu=$(CPU)
|
|
endif
|
|
TESTFLAGS = $(TESTFLAGS_RACE) $(TESTFLAGS_CPU) $(EXTRA_TESTFLAGS)
|
|
|
|
TESTFLAGS_TIMEOUT=30m
|
|
ifdef TIMEOUT
|
|
TESTFLAGS_TIMEOUT=$(TIMEOUT)
|
|
endif
|
|
|
|
TESTFLAGS_ENABLE_STRICT_MODE=false
|
|
ifdef ENABLE_STRICT_MODE
|
|
TESTFLAGS_ENABLE_STRICT_MODE=$(ENABLE_STRICT_MODE)
|
|
endif
|
|
|
|
.EXPORT_ALL_VARIABLES:
|
|
TEST_ENABLE_STRICT_MODE=${TESTFLAGS_ENABLE_STRICT_MODE}
|
|
|
|
.PHONY: fmt
|
|
fmt:
|
|
@echo "Verifying gofmt, failures can be fixed with ./scripts/fix.sh"
|
|
@!(gofmt -l -s -d ${GOFILES} | grep '[a-z]')
|
|
|
|
@echo "Verifying goimports, failures can be fixed with ./scripts/fix.sh"
|
|
@!(go tool golang.org/x/tools/cmd/goimports -l -d ${GOFILES} | grep '[a-z]')
|
|
|
|
.PHONY: lint
|
|
lint:
|
|
golangci-lint run ./...
|
|
|
|
.PHONY: test
|
|
test:
|
|
@echo "hashmap freelist test"
|
|
BBOLT_VERIFY=all TEST_FREELIST_TYPE=hashmap go test -v ${TESTFLAGS} -timeout ${TESTFLAGS_TIMEOUT}
|
|
BBOLT_VERIFY=all TEST_FREELIST_TYPE=hashmap go test -v ${TESTFLAGS} ./internal/...
|
|
BBOLT_VERIFY=all TEST_FREELIST_TYPE=hashmap go test -v ${TESTFLAGS} ./cmd/bbolt/...
|
|
|
|
@echo "array freelist test"
|
|
BBOLT_VERIFY=all TEST_FREELIST_TYPE=array go test -v ${TESTFLAGS} -timeout ${TESTFLAGS_TIMEOUT}
|
|
BBOLT_VERIFY=all TEST_FREELIST_TYPE=array go test -v ${TESTFLAGS} ./internal/...
|
|
BBOLT_VERIFY=all TEST_FREELIST_TYPE=array go test -v ${TESTFLAGS} ./cmd/bbolt/...
|
|
|
|
.PHONY: coverage
|
|
coverage:
|
|
@echo "hashmap freelist test"
|
|
TEST_FREELIST_TYPE=hashmap go test -v -timeout ${TESTFLAGS_TIMEOUT} \
|
|
-coverprofile cover-freelist-hashmap.out -covermode atomic
|
|
|
|
@echo "array freelist test"
|
|
TEST_FREELIST_TYPE=array go test -v -timeout ${TESTFLAGS_TIMEOUT} \
|
|
-coverprofile cover-freelist-array.out -covermode atomic
|
|
|
|
BOLT_CMD=bbolt
|
|
|
|
build:
|
|
go build -o bin/${BOLT_CMD} ./cmd/${BOLT_CMD}
|
|
|
|
.PHONY: clean
|
|
clean: # Clean binaries
|
|
rm -f ./bin/${BOLT_CMD}
|
|
|
|
.PHONY: gofail-enable
|
|
gofail-enable:
|
|
go tool go.etcd.io/gofail enable .
|
|
|
|
.PHONY: gofail-disable
|
|
gofail-disable:
|
|
go tool go.etcd.io/gofail disable .
|
|
|
|
.PHONY: test-failpoint
|
|
test-failpoint:
|
|
@echo "[failpoint] hashmap freelist test"
|
|
BBOLT_VERIFY=all TEST_FREELIST_TYPE=hashmap go test -v ${TESTFLAGS} -timeout 30m ./tests/failpoint
|
|
|
|
@echo "[failpoint] array freelist test"
|
|
BBOLT_VERIFY=all TEST_FREELIST_TYPE=array go test -v ${TESTFLAGS} -timeout 30m ./tests/failpoint
|
|
|
|
.PHONY: test-robustness # Running robustness tests requires root permission for now
|
|
# TODO: Remove sudo once we fully migrate to the prow infrastructure
|
|
test-robustness: gofail-enable build
|
|
sudo env PATH=$$PATH go test -v ${TESTFLAGS} ./tests/dmflakey -test.root
|
|
sudo env PATH=$(PWD)/bin:$$PATH go test -v ${TESTFLAGS} ${ROBUSTNESS_TESTFLAGS} ./tests/robustness -test.root
|
|
|
|
.PHONY: test-benchmark-compare
|
|
# Runs benchmark tests on the current git ref and the given REF, and compares
|
|
# the two.
|
|
test-benchmark-compare:
|
|
@git fetch
|
|
./scripts/compare_benchmarks.sh $(REF)
|