2016-02-12 18:02:16 +00:00
|
|
|
.PHONY: \
|
|
|
|
all \
|
|
|
|
lint \
|
|
|
|
vet \
|
|
|
|
fmtcheck \
|
|
|
|
pretest \
|
|
|
|
test \
|
2018-11-29 22:08:16 +00:00
|
|
|
integration
|
2016-02-12 18:02:16 +00:00
|
|
|
|
|
|
|
all: test
|
|
|
|
|
|
|
|
lint:
|
2018-11-29 22:08:16 +00:00
|
|
|
@ go get -v golang.org/x/lint/golint
|
2017-02-15 01:34:05 +00:00
|
|
|
[ -z "$$(golint . | grep -v 'type name will be used as docker.DockerInfo' | grep -v 'context.Context should be the first' | tee /dev/stderr)" ]
|
2016-02-12 18:02:16 +00:00
|
|
|
|
|
|
|
vet:
|
2018-11-29 22:08:16 +00:00
|
|
|
go vet ./...
|
2016-02-12 18:02:16 +00:00
|
|
|
|
|
|
|
fmtcheck:
|
2018-11-29 22:08:16 +00:00
|
|
|
if [ -z "$${SKIP_FMT_CHECK}" ]; then [ -z "$$(gofmt -s -d *.go ./testing | tee /dev/stderr)" ]; fi
|
2016-09-23 20:43:03 +00:00
|
|
|
|
2016-05-28 08:25:24 +00:00
|
|
|
testdeps:
|
2017-11-14 23:27:57 +00:00
|
|
|
go get -u github.com/golang/dep/cmd/dep
|
|
|
|
dep ensure -v
|
2016-02-12 18:02:16 +00:00
|
|
|
|
2016-05-28 08:25:24 +00:00
|
|
|
pretest: testdeps lint vet fmtcheck
|
2016-02-12 18:02:16 +00:00
|
|
|
|
2016-03-25 00:42:00 +00:00
|
|
|
gotest:
|
2018-11-29 22:08:16 +00:00
|
|
|
go test -race ./...
|
2016-02-12 18:02:16 +00:00
|
|
|
|
2016-03-25 00:42:00 +00:00
|
|
|
test: pretest gotest
|
|
|
|
|
2016-02-12 18:02:16 +00:00
|
|
|
integration:
|
|
|
|
go test -tags docker_integration -run TestIntegration -v
|