diff --git a/cmd/terramate/e2etests/core/main_test.go b/cmd/terramate/e2etests/core/main_test.go index 80562e1bd..1f63605b2 100644 --- a/cmd/terramate/e2etests/core/main_test.go +++ b/cmd/terramate/e2etests/core/main_test.go @@ -13,6 +13,8 @@ import ( ) func TestMain(m *testing.M) { + // TODO: line added for triggering bench in CI. + packageDir, err := os.Getwd() if err != nil { log.Printf("failed to get test working directory: %v", err) diff --git a/makefiles/common.mk b/makefiles/common.mk index 760144b38..3599b8113 100644 --- a/makefiles/common.mk +++ b/makefiles/common.mk @@ -2,7 +2,7 @@ GO_RELEASER_VERSION=v1.14.0 GOLANGCI_LINT_VERSION ?= v1.52.2 COVERAGE_REPORT ?= coverage.txt RUN_ADD_LICENSE=go run github.com/google/addlicense@v1.0.0 -l mpl -s=only -ignore 'docs/**' -BENCH_CHECK=go run github.com/madlambda/benchcheck/cmd/benchcheck@743137fbfd827958b25ab6b13fa1180e0e933eb1 +BENCH_CHECK=go run github.com/madlambda/benchcheck/cmd/benchcheck@customize-bench-runner ## Build terramate tools into bin directory .PHONY: build @@ -129,10 +129,10 @@ bench/check: pkg?=./... bench/check: old?=main bench/check: new?=$(shell git rev-parse HEAD) bench/check: - @$(BENCH_CHECK) -mod $(name) -pkg $(pkg) -go-test-flags "-benchmem,-count=20,-run=Bench" \ - -old $(old) -new $(new) \ + $(BENCH_CHECK) -mod $(name) -old $(old) -new $(new) \ -check allocs/op=$(allocdelta) \ - -check time/op=$(timedelta) + -check time/op=$(timedelta) \ + go test -benchmem -count=20 -run=Bench -bench=. $(pkg) ## cleanup artifacts produced by the benchmarking process bench/cleanup: