From 486a03bff18d358ca38220b1be189e6efd7ee3c9 Mon Sep 17 00:00:00 2001 From: Luca Stocchi Date: Mon, 13 Jan 2025 14:44:28 +0100 Subject: [PATCH 1/2] add build tag to vfkit test files Signed-off-by: Luca Stocchi --- test-vfkit/basic_test.go | 2 ++ test-vfkit/vfkit_suite_test.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/test-vfkit/basic_test.go b/test-vfkit/basic_test.go index b46925b1..d442d3bf 100644 --- a/test-vfkit/basic_test.go +++ b/test-vfkit/basic_test.go @@ -1,3 +1,5 @@ +//go:build darwin + package e2evfkit import ( diff --git a/test-vfkit/vfkit_suite_test.go b/test-vfkit/vfkit_suite_test.go index 8c9a589e..627bcae4 100644 --- a/test-vfkit/vfkit_suite_test.go +++ b/test-vfkit/vfkit_suite_test.go @@ -1,3 +1,5 @@ +//go:build darwin + package e2evfkit import ( From 0f43aa9d75e2d3cea22c5e4b1098daf4e70e25c7 Mon Sep 17 00:00:00 2001 From: Luca Stocchi Date: Mon, 13 Jan 2025 14:45:30 +0100 Subject: [PATCH 2/2] add back the generic test command and use it on gh workflow Signed-off-by: Luca Stocchi --- .github/workflows/go.yml | 2 +- Makefile | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 0ac52811..7517b2a3 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -57,7 +57,7 @@ jobs: - name: Test run: | - sudo -s -u ${USER} bash -c 'make test-linux' + sudo -s -u ${USER} bash -c 'make test' - uses: actions/upload-artifact@v4 if: always() diff --git a/Makefile b/Makefile index ea0ca41d..9970224c 100644 --- a/Makefile +++ b/Makefile @@ -67,8 +67,12 @@ cross: $(TOOLS_BINDIR)/makefat test-companion: GOOS=linux go build -ldflags "$(LDFLAGS)" -o bin/test-companion ./cmd/test-companion -.PHONY: test-linux -test-linux: gvproxy test-companion +PHONY: test +test: gvproxy test-companion + go test -timeout 20m -v ./... + +.PHONY: test-qemu +test-qemu: gvproxy test-companion go test -timeout 20m -v ./test-qemu .PHONY: test-mac