From 5e75f8ca8b3b5c87e43826cecacf7c3f48b43bc4 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 6 Jul 2017 18:36:23 +0100 Subject: [PATCH] Only run `go test` and `go vet` if not cross building (i.e. ${GOOS} unset) They will try to run things and hence cannot be done when cross building. Signed-off-by: Ian Campbell --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 50c65fb3a..b7cc10892 100644 --- a/Makefile +++ b/Makefile @@ -15,10 +15,12 @@ lint: @test -z "$(shell find . -type f -name "*.go" -not -path "./vendor/*" -not -name "*.pb.*" -exec golint {} \; | tee /dev/stderr)" # gofmt @test -z "$$(gofmt -s -l .| grep -v .pb. | grep -v vendor/ | tee /dev/stderr)" +ifeq ($(GOOS),) # govet @test -z "$$(go tool vet -printf=false . 2>&1 | grep -v vendor/ | tee /dev/stderr)" # go test @go test github.com/moby/tool/src/moby +endif test: moby ./moby build -output tar test/test.yml