Skip to content

Commit 027a252

Browse files
committed
chore: cleanup rebase
1 parent 16b8c5b commit 027a252

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

Makefile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ CNI_IMAGE_INFO_FILE = azure-cni-$(CNI_VERSION).txt
107107
CNS_IMAGE_INFO_FILE = azure-cns-$(CNS_VERSION).txt
108108
NPM_IMAGE_INFO_FILE = azure-npm-$(NPM_VERSION).txt
109109

110+
#Tools paths
111+
TOOLS_GO_MOD = $(REPO_ROOT)/tools.go.mod
112+
110113
# Default target
111114
all-binaries-platforms: ## Make all platform binaries
112115
@for goos in "$(GOOSES)"; do \
@@ -846,7 +849,7 @@ clean: ## Clean build artifacts.
846849

847850
LINT_PKG ?= .
848851

849-
GOLANGCI_LINT = go tool golangci-lint
852+
GOLANGCI_LINT = go tool -modfile=$(TOOLS_GO_MOD) golangci-lint
850853

851854
lint: ## Fast lint vs default branch showing only new issues.
852855
GOGC=20 $(GOLANGCI_LINT) run --timeout 25m -v $(LINT_PKG)/...
@@ -882,7 +885,7 @@ test-all: test-azure-ipam test-azure-ip-masq-merger test-azure-iptables-monitor
882885

883886
test-main:
884887
go test -mod=readonly -buildvcs=false -tags "unit" --skip 'TestE2E*' -race -covermode atomic -coverprofile=coverage-main.out $(COVER_PKG)/...
885-
go tool cover -func=coverage-main.out
888+
go tool -modfile=$(TOOLS_GO_MOD) cover -func=coverage-main.out
886889

887890
test-integration: ## run all integration tests.
888891
AZURE_IPAM_VERSION=$(AZURE_IPAM_VERSION) \
@@ -913,13 +916,13 @@ test-extended-cyclonus: ## run the cyclonus test for npm.
913916
cd ..
914917

915918
test-azure-ipam: ## run the unit test for azure-ipam
916-
cd $(AZURE_IPAM_DIR) && go test -race -covermode atomic -coverprofile=../coverage-azure-ipam.out && go tool cover -func=../coverage-azure-ipam.out
919+
cd $(AZURE_IPAM_DIR) && go test -race -covermode atomic -coverprofile=../coverage-azure-ipam.out && go tool cover -modfile=$(TOOLS_GO_MOD) -func=../coverage-azure-ipam.out
917920

918921
test-azure-ip-masq-merger: ## run the unit test for azure-ip-masq-merger
919-
cd $(AZURE_IP_MASQ_MERGER_DIR) && go test -race -covermode atomic -coverprofile=../coverage-azure-ip-masq-merger.out && go tool cover -func=../coverage-azure-ip-masq-merger.out
922+
cd $(AZURE_IP_MASQ_MERGER_DIR) && go test -race -covermode atomic -coverprofile=../coverage-azure-ip-masq-merger.out && go tool cover -modfile=$(TOOLS_GO_MOD) -func=../coverage-azure-ip-masq-merger.out
920923

921924
test-azure-iptables-monitor: ## run the unit test for azure-iptables-monitor
922-
cd $(AZURE_IPTABLES_MONITOR_DIR) && go test -race -covermode atomic -coverprofile=../coverage-azure-iptables-monitor.out && go tool cover -func=../coverage-azure-iptables-monitor.out
925+
cd $(AZURE_IPTABLES_MONITOR_DIR) && go test -race -covermode atomic -coverprofile=../coverage-azure-iptables-monitor.out && go tool cover -modfile=$(TOOLS_GO_MOD) -func=../coverage-azure-iptables-monitor.out
923926

924927
kind:
925928
kind create cluster --config ./test/kind/kind.yaml
@@ -961,7 +964,7 @@ setup: install-hooks gitconfig ## performs common required repo setup
961964
tools: renderkit
962965

963966
renderkit: ## Install renderkit for rendering Dockerfile templates
964-
@go install -modfile=tools.go.mod github.com/orellazri/renderkit
967+
@go install -modfile=$(TOOLS_GO_MOD) github.com/orellazri/renderkit
965968

966969
##@ Help
967970

0 commit comments

Comments
 (0)