1
- TEST_CMD =go test
1
+ TEST_CMD =$( GO ) test
2
2
TEST_ARGS =$(IMPORT_PATH ) /pkg/...
3
3
SUDO =$(shell [ $$(id -u ) -eq 0 ] && echo env || echo sudo)
4
4
5
5
.PHONY : vet
6
6
test : vet
7
- go vet $(IMPORT_PATH ) /pkg/...
7
+ $( GO ) vet $(IMPORT_PATH ) /pkg/...
8
8
9
9
# Check resp. fix formatting.
10
10
.PHONY : test_fmt fmt
@@ -60,7 +60,7 @@ RUNTIME_DEPS =
60
60
# We use "go list" because it is readily available. A good replacement
61
61
# would be godeps. We list dependencies recursively, not just the
62
62
# direct dependencies.
63
- RUNTIME_DEPS += go list -f '{{ join .Deps "\n" }}' ./cmd/pmem-csi-driver |
63
+ RUNTIME_DEPS += $( GO ) list -f '{{ join .Deps "\n" }}' ./cmd/pmem-csi-driver |
64
64
65
65
# This focuses on packages that are not in Golang core.
66
66
RUNTIME_DEPS += grep '^github.com/intel/pmem-csi/vendor/' |
@@ -120,7 +120,7 @@ RUN_E2E = KUBECONFIG=`pwd`/_work/$(CLUSTER)/kube.config \
120
120
CLUSTER=$(CLUSTER ) \
121
121
TEST_DEPLOYMENTMODE=$(shell source test/test-config.sh; echo $$TEST_DEPLOYMENTMODE) \
122
122
TEST_DEVICEMODE=$(shell source test/test-config.sh; echo $$TEST_DEVICEMODE) \
123
- go test -count=1 -timeout 0 -v ./test/e2e \
123
+ $( GO ) test -count=1 -timeout 0 -v ./test/e2e \
124
124
-ginkgo.skip='$(subst $(space ) ,|,$(TEST_E2E_SKIP ) ) ' \
125
125
-ginkgo.focus='$(subst $(space ) ,|,$(TEST_E2E_FOCUS ) ) ' \
126
126
-report-dir=$(TEST_E2E_REPORT_DIR )
@@ -131,7 +131,7 @@ test_e2e: start
131
131
.PHONY : run_tests
132
132
test : run_tests run_device_manager_tests
133
133
RUN_TESTS = TEST_WORK=$(abspath _work) \
134
- $(TEST_CMD ) $(shell go list $(TEST_ARGS ) | grep -v pmem-device-manager | sed -e 's;$(IMPORT_PATH ) ;.;')
134
+ $(TEST_CMD ) $(shell $( GO ) list $(TEST_ARGS ) | grep -v pmem-device-manager | sed -e 's;$(IMPORT_PATH ) ;.;')
135
135
RUN_DM_TESTS = \
136
136
$(TEST_CMD ) ./pkg/pmem-device-manager -exec $(SUDO )
137
137
run_tests : _work/pmem-ca/.ca-stamp _work/evil-ca/.ca-stamp
@@ -161,7 +161,7 @@ _work/gocovmerge-$(GOCOVMERGE_VERSION):
161
161
cd $$ tmpdir && \
162
162
echo " module foo" > go.mod && \
163
163
go get github.com/wadey/gocovmerge@$(GOCOVMERGE_VERSION ) && \
164
- go build -o $(abspath $@ ) github.com/wadey/gocovmerge
164
+ $( GO ) build -o $(abspath $@ ) github.com/wadey/gocovmerge
165
165
ln -sf $(@F ) _work/gocovmerge
166
166
167
167
# This is a special target that runs unit and E2E testing and
@@ -189,10 +189,10 @@ _work/coverage.out: _work/gocovmerge-$(GOCOVMERGE_VERSION)
189
189
$< _work/coverage/* > $@
190
190
191
191
_work/coverage.html : _work/coverage.out
192
- go tool cover -html $< -o $@
192
+ $( G0 ) tool cover -html $< -o $@
193
193
194
194
_work/coverage.txt : _work/coverage.out
195
- go tool cover -func $< -o $@
195
+ $( GO ) tool cover -func $< -o $@
196
196
197
197
.PHONY : coverage
198
198
coverage :
0 commit comments