mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 18:11:35 +00:00
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 <ian.campbell@docker.com>
This commit is contained in:
parent
48f1dd042f
commit
5e75f8ca8b
2
Makefile
2
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)"
|
@test -z "$(shell find . -type f -name "*.go" -not -path "./vendor/*" -not -name "*.pb.*" -exec golint {} \; | tee /dev/stderr)"
|
||||||
# gofmt
|
# gofmt
|
||||||
@test -z "$$(gofmt -s -l .| grep -v .pb. | grep -v vendor/ | tee /dev/stderr)"
|
@test -z "$$(gofmt -s -l .| grep -v .pb. | grep -v vendor/ | tee /dev/stderr)"
|
||||||
|
ifeq ($(GOOS),)
|
||||||
# govet
|
# govet
|
||||||
@test -z "$$(go tool vet -printf=false . 2>&1 | grep -v vendor/ | tee /dev/stderr)"
|
@test -z "$$(go tool vet -printf=false . 2>&1 | grep -v vendor/ | tee /dev/stderr)"
|
||||||
# go test
|
# go test
|
||||||
@go test github.com/moby/tool/src/moby
|
@go test github.com/moby/tool/src/moby
|
||||||
|
endif
|
||||||
|
|
||||||
test: moby
|
test: moby
|
||||||
./moby build -output tar test/test.yml
|
./moby build -output tar test/test.yml
|
||||||
|
Loading…
Reference in New Issue
Block a user