1- GINKGO?=$(shell which ginkgo 2> /dev/null)
2- ifeq ("$(GINKGO)","")
3- GINKGO="$(HOME)/go/bin/ginkgo"
4- endif
5-
6- GINKGO_ARGS?=-v --fail-fast -r --timeout=3h
1+ GINKGO ?= "github.com/onsi/ginkgo/v2/ginkgo"
2+ GINKGO_ARGS ?=-v --fail-fast -r --timeout=3h
73
84.PHONY: prepare-test
95prepare-test:
@@ -13,7 +9,7 @@ ifeq ("$(DISK)","")
139endif
1410 @scripts/run_vm.sh start $(DISK)
1511 @echo "VM started from $(DISK)"
16- $(GINKGO) run $(GINKGO_ARGS) ./tests/wait-active
12+ go run $(GINKGO) run $(GINKGO_ARGS) ./tests/wait-active
1713
1814.PHONY: prepare-installer-test
1915prepare-installer-test:
@@ -31,27 +27,27 @@ test-clean:
3127
3228.PHONY: test-smoke
3329test-smoke: prepare-test
34- $(GINKGO) run $(GINKGO_ARGS) ./tests/smoke
30+ go run $(GINKGO) run $(GINKGO_ARGS) ./tests/smoke
3531
3632.PHONY: test-grubfallback
3733test-grubfallback: prepare-test
38- $(GINKGO) run $(GINKGO_ARGS) ./tests/grubfallback
34+ go run $(GINKGO) run $(GINKGO_ARGS) ./tests/grubfallback
3935
4036.PHONY: test-recovery
4137test-recovery: prepare-test
42- $(GINKGO) run $(GINKGO_ARGS) ./tests/recovery
38+ go run $(GINKGO) run $(GINKGO_ARGS) ./tests/recovery
4339
4440.PHONY: test-fallback
4541test-fallback: prepare-test
46- $(GINKGO) run $(GINKGO_ARGS) ./tests/fallback
42+ go run $(GINKGO) run $(GINKGO_ARGS) ./tests/fallback
4743
4844.PHONY: test-fsck
4945test-fsck: prepare-test
50- $(GINKGO) run $(GINKGO_ARGS) ./tests/fsck
46+ go run $(GINKGO) run $(GINKGO_ARGS) ./tests/fsck
5147
5248.PHONY: test-upgrade
5349test-upgrade: prepare-test
54- $(GINKGO) run $(GINKGO_ARGS) ./tests/upgrade
50+ go run $(GINKGO) run $(GINKGO_ARGS) ./tests/upgrade
5551
5652.PHONY: test-deps
5753test-deps:
@@ -60,16 +56,16 @@ test-deps:
6056 go install github.com/onsi/ginkgo/v2/ginkgo
6157
6258.PHONY: test-cli
63- test-cli: $(GINKGO)
64- $(GINKGO) run --label-filter '!root' --fail-fast --race --covermode=atomic --coverprofile=coverage.txt --coverpkg=github.com/rancher/elemental-toolkit/... -p -r ${PKG}
59+ test-cli:
60+ go run $(GINKGO) run --label-filter '!root' --fail-fast --race --covermode=atomic --coverprofile=coverage.txt --coverpkg=github.com/rancher/elemental-toolkit/... -p -r ${PKG}
6561
6662.PHONY: test-root
67- test-root: $(GINKGO)
63+ test-root:
6864ifneq ($(shell id -u), 0)
6965 @echo "This tests require root/sudo to run."
7066 @exit 1
7167else
72- $(GINKGO) run --label-filter root --fail-fast --race --covermode=atomic --coverprofile=coverage_root.txt --coverpkg=github.com/rancher/elemental-toolkit/... -procs=1 -r ${PKG}
68+ go run $(GINKGO) run --label-filter root --fail-fast --race --covermode=atomic --coverprofile=coverage_root.txt --coverpkg=github.com/rancher/elemental-toolkit/... -procs=1 -r ${PKG}
7369endif
7470
7571
0 commit comments